/* Coupons Section */
.coupons-section {
    padding: 0;
    /* Background is set dynamically via PHP inline styles */
    background-size: 100% 100%;
    background-position: center ;
    background-repeat: no-repeat;
    margin: 20px 0;
    overflow: visible;
    width: 100%;
    position: relative;
    min-height: 500px;
    z-index: 0;
}

.coupons-section .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    display: block;
    position: relative;
    background: transparent !important;
    min-height: 400px;
    margin: 0;
    z-index: 1;
}

.coupons-content-wrapper {
    display: block;
    width: 100%;
    position: relative;
    min-height: 400px;
    background: transparent !important;
    margin-top: 0;
    padding-top: 0;
}

.coupons-promo-banner {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    min-height: 450px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 40px 20px;
    background: transparent;
}

.coupons-products-area {
    margin-left: 0;
    width: 100%;
    position: relative;
    z-index: 2;
    min-height: 400px;
    overflow: visible;
    padding: 0;
    background: transparent !important;
}

.coupons-wrapper {
    position: relative;
    width: 100%;
    min-height: 450px;
    padding: 0;
    background: transparent !important;
}

.coupons-header {
    text-align: center;
    margin-bottom: 30px;
}

.coupons-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
}

.coupons-header p {
    font-size: 16px;
    color: #6b7280;
}

/* Coupon Tabs */
.coupon-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    margin-top: 0;
    padding: 0;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
}

.coupon-tabs::-webkit-scrollbar {
    display: none;
}

.coupon-tab {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: #9ca3af;
    color: #ffffff;
    position: relative;
}

.coupon-tab.active {
    background: #ef4444;
    color: #ffffff;
}

.coupon-tab-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.coupon-tab-subtitle {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
}

.coupons-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 20px 50px 20px 280px;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    background: transparent !important;
    min-height: 370px;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: 20px;
    margin-top: 0;
    scroll-padding-left: 0px;
    scroll-padding-right: 60px;
    scroll-snap-type: x mandatory;
}

.coupons-container::-webkit-scrollbar {
    display: none;
}

.coupon-deal-card {
    min-width: 220px;
    max-width: 220px;
    width: 220px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.coupon-deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.coupon-product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f3f4f6;
    padding: 20px;
}

.coupon-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

.sale-badge {
    background: #ef4444;
    color: white;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
}

.new-badge {
    background: #fbbf24;
    color: #1f2937;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sale-badge-svg {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    display: block;
}

.new-badge-svg {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    display: block;
}

.coupon-deal-body {
    padding: 16px;
    background: white;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.coupon-deal-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    padding: 0;
}

.coupon-deal-subtitle {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
    padding: 0 16px;
}

.coupon-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.coupon-price {
    font-size: 20px;
    font-weight: 800;
    color: #ef4444;
}

.coupon-original-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.coupon-discount {
    font-size: 12px;
    color: #10b981;
    font-weight: 700;
}

.coupon-countdown-box {
    background: transparent;
    border: 1.5px solid #ef4444;
    border-radius: 12px;
    padding: 16px 12px 10px;
    margin-bottom: 0;
    margin-top: auto;
    position: relative;
    width: 100%;
}

.countdown-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 12px;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1;
}

.countdown-label::before,
.countdown-label::after {
    content: '';
    width: 20px;
    height: 1.5px;
    background: #ef4444;
    border-radius: 2px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 6px;
}

.countdown-unit {
    text-align: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
}

.countdown-separator {
    font-size: 24px;
    font-weight: 800;
    color: #ef4444;
    line-height: 1;
    margin: 0 2px;
}

.countdown-value {
    font-size: 24px;
    font-weight: 800;
    color: #ef4444;
    line-height: 1;
    display: block;
}

.countdown-labels {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 4px;
}

.countdown-text {
    font-size: 7px;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    display: block;
    min-width: 28px;
    text-align: center;
}

/* Coupon Navigation Arrows */
.coupons-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.coupon-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #ef4444;
    width: 30px;
    height: 55px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transition: all 0.3s;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.coupon-nav-arrow:hover {
    background: white;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.coupon-nav-arrow.left {
    left: 270px;
}

.coupon-nav-arrow.right {
    right: 10px;
}

.coupon-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.coupon-nav-arrow i {
    color: #1f2937;
    font-size: 20px;
    font-weight: 900;
}

/* Dropdown for mobile */
.coupon-dropdown {
    display: none;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #ef4444;
    font-weight: 600;
    margin-bottom: 15px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ef4444' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .coupons-section {
        padding: 0;
        margin: 15px 0;
        min-height: 400px;
        overflow: hidden;
    }
    
    .coupons-header h2 {
        font-size: 24px;
    }
    
    /* Hide tabs, show dropdown */
    .coupon-tabs {
        display: none;
    }
    
    .coupon-dropdown {
        display: block;
    }
    
    .coupons-container {
        padding: 20px 60px 20px 60px !important;
        gap: 15px !important;
        background: transparent !important;
        position: relative;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: visible;
        min-height: 320px !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        scroll-padding-left: 60px;
    }
    
    .coupon-nav-arrow {
        display: flex;
        width: 40px;
        height: 40px;
    }
    
    .coupon-nav-arrow.left {
        left: 10px;
    }
    
    .coupon-nav-arrow.right {
        right: 10px;
    }
    
    .coupon-deal-card {
        min-width: 220px;
        max-width: 220px;
        width: 220px;
        flex-shrink: 0;
        margin: 0;
    }
    
    .coupon-product-image {
        height: 280px;
        padding: 20px;
    }
    
    .sale-badge {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .new-badge {
        width: 36px;
        height: 36px;
        font-size: 10px;
    }
    
    .sale-badge-svg {
        width: 50px;
    }
    
    .new-badge-svg {
        width: 42px;
    }
    
    .coupon-deal-title {
        font-size: 15px;
        padding: 0;
    }
    
    .coupon-deal-body {
        padding: 16px 20px;
    }
    
    .coupon-price {
        font-size: 20px;
    }
    
    .coupon-original-price {
        font-size: 13px;
    }
    
    .coupon-discount {
        font-size: 11px;
    }
    
    .coupon-countdown-box {
        padding: 12px 10px 8px;
        margin-bottom: 0;
        margin-top: auto;
    }
    
    .countdown-label {
        font-size: 9px;
        top: -7px;
        padding: 0 10px;
        gap: 6px;
        justify-content: center;
    }
    
    .countdown-label::before,
    .countdown-label::after {
        width: 15px;
    }
    
    .countdown-timer {
        gap: 0;
        margin-bottom: 5px;
    }
    
    .countdown-unit {
        min-width: 24px;
    }
    
    .countdown-separator {
        font-size: 20px;
        margin: 0 1px;
    }
    
    .countdown-value {
        font-size: 18px;
    }
    
    .countdown-labels {
        gap: 20px;
    }
    
    .countdown-text {
        font-size: 6px;
        min-width: 24px;
        letter-spacing: 0.6px;
    }
}

@media (max-width: 480px) {
    .coupon-tab {
        min-width: 120px;
        padding: 10px 12px;
    }
    
    .coupon-tab-title {
        font-size: 11px;
    }
    
    .coupon-tab-subtitle {
        font-size: 9px;
    }
    
    .coupons-container {
        padding: 15px 10px !important;
    }
    
    .coupon-deal-card {
        min-width: 200px;
        max-width: 200px;
    }
    
    .coupon-product-image {
        height: 140px;
    }
    
    .countdown-unit {
        min-width: 20px;
    }
    
    .countdown-separator {
        font-size: 18px;
    }
    
    .countdown-value {
        font-size: 16px;
    }
    
    .countdown-text {
        font-size: 5px;
        min-width: 20px;
        letter-spacing: 0.4px;
    }
    
    .countdown-label {
        font-size: 8px;
        gap: 4px;
    }
    
    .countdown-label::before,
    .countdown-label::after {
        width: 12px;
    }
    
    .countdown-labels {
        gap: 16px;
    }
}

