/* AMAZON PRODUCT DISPLAY PRO - CLEAN NO-BOX DESIGN */
/* ================================================ */

:root {
    --apd-primary: #ff9900;
    --apd-secondary: #146eb4;
    --apd-success: #00a650;
    --apd-danger: #b12704;
    --apd-light: #f8f9fa;
    --apd-dark: #232f3e;
    --apd-border: #e1e1e1;
    --apd-shadow: rgba(0, 0, 0, 0.1);
}

/* BASE PRODUCT STYLES */
.apd-product {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    box-sizing: border-box;
}

.apd-product * {
    box-sizing: border-box;
}

.apd-product-box {
    max-width: 900px;
    margin: 0 auto 25px !important; /* INCREASED FROM 10px */
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--apd-shadow);
    overflow: visible !important;
    border: 1px solid var(--apd-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.apd-product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* PRODUCT CONTAINER - STACKED LAYOUT */
.apd-product-container {
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* ============================================
   PRODUCT IMAGE - COMPLETELY CLEAN NO BOX
   ============================================ */
.apd-product-image {
    width: 100%;
    padding: 30px 30px 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    background: none !important;
}

.apd-product-image img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    display: block;
    margin: 0 auto;
}

.apd-product-image img:hover {
    transform: scale(1.02);
}

/* PRIME BADGE */
.apd-prime-badge {
    position: absolute;
    top: 40px;
    left: 40px;
    background: linear-gradient(135deg, #ff9900 0%, #ff8800 100%);
    color: black;
    font-weight: 800;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(255, 153, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    border: 1px solid #e68a00;
}

.apd-image-placeholder {
    width: 100%;
    max-width: 300px;
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    margin: 0 auto;
}

/* ============================================
   PRODUCT DETAILS - NO BOXES
   ============================================ */
.apd-product-details {
    padding: 10px 30px 10px 30px;
    text-align: center;
}

/* PRODUCT TITLE - BOLD AND STYLED */
.apd-product-title {
    font-size: 22px;
    font-weight: 700 !important;
    line-height: 1.3;
    margin: 0 0 15px 0;
    color: var(--apd-dark);
    padding: 0;
}

/* Title links - bold and no underline */
.apd-product-title a {
    text-decoration: none !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

/* RATING */
.apd-product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px; /* ← REDUCED: was 20px */
    justify-content: center;
    padding: 5px 0; /* ← ADD minimal padding if needed */
}

/* FOR SIMPLE TEMPLATE SPECIFICALLY */
.apd-style-simple .apd-product-rating {
    margin-bottom: 10px; /* ← EVEN LESS for simple template */
    gap: 8px;
}


.apd-stars {
    display: flex;
    gap: 2px;
}

.apd-star-full {
    color: #ffa41c;
    font-size: 20px;
}

.apd-star-half {
    color: #ffa41c;
    font-size: 20px;
    position: relative;
    display: inline-block;
    overflow: hidden;
    width: 20px;
}

.apd-star-half:after {
    content: '☆';
    position: absolute;
    left: 0;
    color: #ddd;
}

.apd-star-empty {
    color: #ddd;
    font-size: 20px;
}

.apd-rating-text {
    font-size: 14px;
    color: #666;
}

/* FEATURES */
.apd-product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.apd-product-features li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    text-align: left;
}

.apd-product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--apd-success);
    font-weight: bold;
    font-size: 16px;
}

/* PRICE SECTION - FIXED: REMOVE DUPLICATE RULES */
.apd-price-section {
    margin: 10px 0;
    padding: 0;
}

.apd-price-main {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 10px;
    justify-content: center;
}

/* PRICE COLOR - BLACK (SINGLE DEFINITION) */
.apd-currency-symbol {
    font-size: 21px; /* Smaller dollar sign */
    font-weight: 700;
    color: #000000;
}

.apd-price-amount {
    font-size: 24px;
    font-weight: 800;
    color: #000000;
    letter-spacing: -1px;
}

/* PRICE INFO */
.apd-price-info {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
    justify-content: center;
}

.apd-was-price {
    color: #666;
}

.apd-strikethrough {
    text-decoration: line-through;
}

.apd-save-amount {
    color: var(--apd-success);
    font-weight: 600;
}

/* ACTION BUTTONS */
.apd-product-action {
    margin-top: 20px;
    text-align: center;
}

/* ACTION BUTTONS - NO UNDERLINE */
.apd-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(145deg, #ffd814 0%, #f7ca00 100%);
    border: 1px solid #f2c200;
    border-radius: 50px;
    color: #0f1111;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 17px;
    padding: 10px 45px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(242, 194, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 500px;
    text-align: center;
}

.apd-buy-button:hover {
    background: linear-gradient(145deg, #f7ca00 0%, #e6b800 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(242, 194, 0, 0.4);
    color: #0f1111;
    text-decoration: none !important;
    border: 1px solid #e6b800;
}

.apd-buy-button:active {
    transform: translateY(-1px) scale(1.02);
}

.apd-button-icon {
    font-size: 20px;
    display: inline-block !important;
    text-decoration: none !important;
}

.apd-button-text {
    flex-grow: 1;
    text-align: center;
    text-decoration: none !important;
}

/* AFFILIATE NOTICE */
.apd-affiliate-notice {
    display: block;
    font-size: 11px;
    color: #767676;
    margin-top: 15px;
    font-style: italic;
    line-height: 1.4;
    padding: 5px 0;
}

/* ============================================
   CLICKABLE IMAGE AND TITLE STYLES - FIXED
   ============================================ */

/* Image link styling */
.apd-image-link {
    display: block;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s ease;
}

.apd-image-link:hover {
    transform: scale(1.02);
}

.apd-image-link .apd-prime-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

/* TITLE LINK - FIX UNDERLINE AND HOVER MOVEMENT */
.apd-title-link {
    color: #0066c0;
    text-decoration: none !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    display: inline-block;
}

/* SPECIFIC HOVER RULES - FIXED */
.apd-product-title a.apd-title-link:hover,
.apd-product-title a.apd-title-link:focus,
.apd-product-title a.apd-title-link:active {
    color: #c45500 !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
}

/* ============================================
   HORIZONTAL LINE - FIXED FULL WIDTH
   ============================================ */
.apd-horizontal-line {
    height: 1px;
    background: #e1e1e1;
    margin: 15px 0; /* ← Keep vertical spacing */
    width: 100%; /* ← CHANGE: was width: 100% */
    max-width: none; /* ← CHANGE: Remove max-width limitation */
}

/* Remove the alignment-specific margin rules since width is now 100% */
.apd-align-left .apd-horizontal-line,
.apd-align-center .apd-horizontal-line,
.apd-align-right .apd-horizontal-line {
    margin: 15px 0; /* ← Keep consistent vertical spacing */
    width: 100%; /* ← Full width */
}

/* Template-specific adjustments */
.apd-style-compact .apd-horizontal-line {
    margin: 15px 0;
}

.apd-style-simple .apd-horizontal-line {
    margin: 20px 0;
}

/* ============================================
   STYLE VARIATIONS
   ============================================ */
.apd-style-compact .apd-product-box {
    max-width: 600px;
    margin: 0 auto 20px !important; /* ADDED MARGIN */
    box-shadow: 0 5px 20px var(--apd-shadow);
}

.apd-style-compact .apd-product-image {
    padding: 5px 20px 0 20px;
}

.apd-style-compact .apd-product-image img {
    max-height: 200px;
}

.apd-style-compact .apd-product-details {
    padding: 15px 20px 20px 20px;
}

.apd-style-compact .apd-product-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.apd-style-compact .apd-product-features {
    display: none;
}

.apd-style-compact .apd-product-rating {
    margin-bottom: 10px;
}

.apd-style-compact .apd-currency-symbol {
    font-size: 20px;
}

.apd-style-compact .apd-price-amount {
    font-size: 20px;
}

.apd-style-compact .apd-buy-button {
    padding: 12px 25px;
    font-size: 15px;
    min-width: 180px;
}

/* SIMPLE TEMPLATE - FIXED BLENDING ISSUE */
.apd-style-simple .apd-product-box {
    box-shadow: 0 10px 40px var(--apd-shadow) !important; /* Stronger shadow */
    border-radius: 12px;
    margin: 0 auto 25px !important; /* Added margin */
    border: 1px solid var(--apd-border) !important; /* Ensure border */
}

.apd-style-simple .apd-product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
}

.apd-style-simple .apd-product-image {
    padding: 20px 20px 0 20px;
    max-width: 400px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .apd-product-image {
        padding: 20px 20px 0 20px;
    }
    
    .apd-product-image img {
        max-height: 250px;
    }
    
    .apd-product-details {
        padding: 15px 20px 20px 20px;
    }
    
    .apd-product-title {
        font-size: 20px;
    }
    
    .apd-price-main {
        flex-wrap: wrap;
    }
    
    .apd-currency-symbol {
        font-size: 20px;
    }
    
    .apd-price-amount {
        font-size: 24px;
    }
    
    .apd-buy-button {
        width: 100%;
        min-width: auto;
        padding: 14px 25px;
    }
    
    .apd-horizontal-line {
        margin: 20px auto;
        max-width: 300px;
    }
    
    .apd-image-link:hover {
        transform: scale(1.01);
    }
    
    /* Responsive margins */
    .apd-product-box {
        margin: 0 auto 20px !important;
    }
    
    .apd-style-simple .apd-product-box {
        margin: 0 auto 20px !important;
    }
    
    .apd-style-compact .apd-product-box {
        margin: 0 auto 15px !important;
    }
}

@media (max-width: 480px) {
    .apd-product-title {
        font-size: 18px;
    }
    
    .apd-price-amount {
        font-size: 24px;
    }
    
    .apd-buy-button {
        padding: 14px 25px;
        font-size: 15px;
    }
    
    .apd-price-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .apd-prime-badge {
        top: 25px;
        left: 25px;
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* ============================================
   TOP PRODUCT BADGE - CLEAN & ALWAYS VISIBLE
   ============================================ */

.apd-top-product-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    font-weight: 800;
    font-size: 12px;
    padding: 8px 18px;
    border-radius: 0 0 10px 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 20;
    border: none;
    animation: apd-badge-pulse 2s infinite;
    text-align: center;
    line-height: 1;
    min-width: 140px;
    max-width: 200px;
    width: auto !important;
    height: auto;
    overflow: visible;
}

/* Pulse animation for badge */
@keyframes apd-badge-pulse {
    0% { box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(76, 175, 80, 0.6); }
    100% { box-shadow: 0 4x 15px rgba(76, 175, 80, 0.4); }
}

/* Icon float animation */
@keyframes apd-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}



/* Enhanced hover for JS */
.apd-hover-active {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.apd-hover-active .apd-buy-button {
    box-shadow: 0 8px 30px rgba(242, 194, 0, 0.5) !important;
}

/* Buy button click animation */
.apd-buy-button {
    transition: transform 0.1s ease !important;
}



/* ============================================
   PRIME ELIGIBLE BADGE - MINIMAL VERSION
   (Only adds badge, doesn't change button style)
   ============================================ */

/* Button wrapper for positioning */
.apd-button-wrapper {
    position: relative;
    display: inline-block;
}

/* Prime badge on BUTTON */
.apd-prime-button-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #146eb4; /* Amazon Prime blue */
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    white-space: nowrap;
    border: 2px solid #fff;
    line-height: 1;
}

/* Mobile */
@media (max-width: 768px) {
    .apd-prime-button-badge {
        font-size: 9px;
        padding: 2px 6px;
        top: -8px;
        right: -8px;
    }
}

/* ============================================
   CRITICAL: REMOVE THESE IF THEY EXIST
   ============================================ */
/* DELETE these if they're in your CSS: */
.apd-buy-button {
    /* Remove any padding-right, overflow, etc. that were added */
}

.apd-button-wrapper:hover .apd-prime-badge {
    /* Remove any hover effects */
}

/* Remove any animations */
@keyframes apd-prime-pulse {
    /* Delete this entire animation */
}


/* ============================================
   ADMIN LICENSE DEBUG BAR STYLES
   ============================================ */

.apd-license-debug {
    padding: 10px !important;
    background: #e8f5e8 !important;
    border-radius: 4px !important;
    margin-bottom: 15px !important;
    border: 1px solid #4CAF50 !important;
    font-size: 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.apd-license-debug small {
    font-size: 12px !important;
}

.apd-license-debug .admin-view {
    color: #666 !important;
    font-style: italic !important;
    font-size: 11px !important;
}

/* Premium Badge Styles */
.business-badge {
    background: #9C27B0 !important;
    color: white !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    margin-left: 10px !important;
    white-space: nowrap !important;
}

.personal-badge {
    background: #FF9800 !important;
    color: white !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    margin-left: 10px !important;
    white-space: nowrap !important;
}

/* Badge Container */
.badge-container {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

/* Admin view text */
.admin-view {
    color: #666 !important;
    font-style: italic !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}

css

/* Compact template affiliate notice */
.apd-style-compact .apd-affiliate-notice {
    font-size: 10px !important;
    margin-top: 8px !important;
    line-height: 1.3 !important;
}

.apd-compact-notice {
    font-size: 10px !important;
}

/* Space Saver price styling */
.apd-price-main-v2 {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: 28px;
    font-weight: bold;
    color: #B12704;
    line-height: 1;
}

.apd-price-main-v2 .apd-currency-symbol {
    font-size: 24px; /* Smaller for space saver */
    font-weight: 700;
}

.apd-price-main-v2 .apd-price-amount {
    font-size: 28px;
    font-weight: bold;
    color: #B12704;
}