/* =============================================
   COUPON SECTION & SLIDER
   ============================================= */

/* General section */
.coupon-section {
    padding: 40px 0;
}

.coupon-section.bg-light {
    background: var(--light-bg, #f8f9fa);
}

.coupon-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.coupon-section .section-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--heading-color, #1c1e21);
    margin: 0;
}

.coupon-section .section-header p {
    color: var(--gray-600, #6b7280);
    margin: 4px 0 0;
    font-size: 14px;
}

.coupon-section .section-link {
    color: var(--primary, #7d3cff);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

/* Coupon grid (public / my coupons pages) */
.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Coupon slider wrapper */
.coupon-slider-wrapper {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.coupon-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 0 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

/* Coupon card - shared */
.coupon-card {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
    border: 1px dashed var(--primary, #7d3cff);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.coupon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(125, 60, 255, 0.12);
}

/* Slider-specific card width */
.coupon-slider .coupon-card {
    flex: 0 0 260px;
    min-width: 260px;
    max-width: 260px;
    scroll-snap-align: start;
}

.coupon-header {
    background: rgba(125, 60, 255, 0.08);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.coupon-code-display {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary, #7d3cff);
    letter-spacing: 1px;
    text-transform: uppercase;
    word-break: break-all;
}

.btn-copy-code {
    background: var(--primary, #7d3cff);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-copy-code:hover {
    background: #5e2bcc;
}

.coupon-body {
    padding: 14px;
    flex: 1;
}

.coupon-description {
    margin: 0 0 10px;
    color: var(--gray-700, #374151);
    font-size: 13px;
    line-height: 1.5;
}

.coupon-value strong {
    font-size: 18px;
    color: var(--accent, #ff7f32);
}

.coupon-min,
.coupon-max,
.coupon-expiry {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--gray-600, #6b7280);
}

/* Footer & claim button */
.coupon-footer {
    padding: 10px 14px 14px;
    border-top: 1px dashed rgba(125, 60, 255, 0.15);
}

.btn-coupon-claim {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-coupon-claim-action {
    background: linear-gradient(135deg, #7d3cff, #a855f7);
    color: #fff;
}

.btn-coupon-claim-action:hover {
    background: linear-gradient(135deg, #6b2be0, #9333ea);
}

.btn-coupon-unclaim {
    background: #10b981;
    color: #fff;
}

.btn-coupon-unclaim:hover {
    background: #059669;
}

.btn-coupon-unclaim .btn-sub {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 500;
}

.btn-coupon-login {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-coupon-login:hover {
    background: #e5e7eb;
}

.coupon-claimed {
    border-color: #10b981;
}

.coupon-claimed .coupon-header {
    background: rgba(16, 185, 129, 0.08);
}

/* Slider controls */
.coupon-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--primary, #7d3cff);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coupon-slider-wrapper:hover .coupon-slider-nav {
    opacity: 1;
    visibility: visible;
}

.coupon-slider-nav:hover {
    background: var(--primary, #7d3cff);
    color: #fff;
}

.coupon-slider-prev {
    left: 10px;
}

.coupon-slider-next {
    right: 10px;
}

/* Empty state */
.coupon-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg, #fff);
    border-radius: 16px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}

.coupon-empty .empty-icon {
    font-size: 48px;
    color: var(--primary, #7d3cff);
    margin-bottom: 16px;
}

.coupon-empty h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--heading-color, #1c1e21);
}

.coupon-empty p {
    color: var(--gray-600, #6b7280);
    margin: 0;
}

/* Page banner */
.page-banner {
    background: linear-gradient(135deg, #7d3cff, #a855f7);
    color: #fff;
    padding: 50px 0 30px;
    text-align: center;
}

.page-banner h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.page-banner .breadcrumbs {
    font-size: 14px;
    opacity: 0.9;
}

.page-banner .breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.page-banner-sm {
    padding: 40px 0 25px;
}

.page-banner-sm h1 {
    font-size: 26px;
}

/* Coupon page intro */
.coupons-intro {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}

.coupons-intro p {
    margin: 0;
    color: var(--gray-700, #374151);
    font-size: 15px;
}

.coupons-intro i {
    color: var(--primary, #7d3cff);
    margin-right: 8px;
}

/* Dark mode */
[data-theme="dark"] .coupon-section,
[data-theme="dark"] .coupon-empty,
[data-theme="dark"] .coupons-intro,
[data-theme="dark"] .coupon-card {
    background: var(--dark-card, #1f2940);
    border-color: var(--dark-border, #2d3a4f);
}

[data-theme="dark"] .coupon-section .section-header h2,
[data-theme="dark"] .coupon-empty h3 {
    color: #ffffff;
}

[data-theme="dark"] .coupon-section .section-header p,
[data-theme="dark"] .coupon-description,
[data-theme="dark"] .coupons-intro p,
[data-theme="dark"] .coupon-min,
[data-theme="dark"] .coupon-max,
[data-theme="dark"] .coupon-expiry,
[data-theme="dark"] .coupon-empty p {
    color: var(--dark-text-secondary, #b0b3b8);
}

[data-theme="dark"] .coupon-header {
    background: rgba(125, 60, 255, 0.15);
}

[data-theme="dark"] .coupon-value strong,
[data-theme="dark"] .coupon-code-display {
    color: var(--primary, #7d3cff);
}

[data-theme="dark"] .btn-coupon-login {
    background: #2d3a4f;
    color: #e4e6eb;
    border-color: #3d4a5f;
}

[data-theme="dark"] .btn-coupon-login:hover {
    background: #3d4a5f;
}

[data-theme="dark"] .coupon-slider-nav {
    background: var(--dark-card, #1f2940);
    border-color: #2d3a4f;
}

/* Flash message */
.coupon-flash-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 999999;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    min-width: 280px;
    justify-content: center;
}

.coupon-flash-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.coupon-flash-success {
    background: #10b981;
    color: #fff;
}

.coupon-flash-error {
    background: #ef4444;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .coupon-section {
        padding: 30px 0;
    }

    .coupon-section .section-header h2 {
        font-size: 20px;
    }

    .coupon-section .section-header p {
        font-size: 13px;
    }

    .coupon-slider .coupon-card {
        flex: 0 0 230px;
        min-width: 230px;
        max-width: 230px;
    }

    .coupon-code-display {
        font-size: 14px;
    }

    .coupon-value strong {
        font-size: 17px;
    }
}

@media (max-width: 576px) {
    .coupon-section {
        padding: 20px 0;
    }

    .coupon-section .section-header {
        margin-bottom: 14px;
    }

    .coupon-section .section-header h2 {
        font-size: 18px;
    }

    .coupon-section .section-header p {
        font-size: 12px;
    }

    .coupon-slider .coupon-card {
        flex: 0 0 200px;
        min-width: 200px;
        max-width: 200px;
    }

    .coupon-slider {
        gap: 10px;
        padding: 8px 4px 16px;
    }

    .coupon-header {
        padding: 10px 12px;
    }

    .coupon-body {
        padding: 12px;
    }

    .coupon-footer {
        padding: 8px 12px 12px;
    }

    .btn-coupon-claim {
        padding: 7px 12px;
        font-size: 12px;
    }

    .coupons-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .coupon-code-display {
        font-size: 13px;
    }

    .coupon-value strong {
        font-size: 16px;
    }

    .coupon-min,
    .coupon-max,
    .coupon-expiry {
        font-size: 11px;
    }

    .coupon-slider-nav {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .coupon-slider-prev {
        left: 4px;
    }

    .coupon-slider-next {
        right: 4px;
    }
}
