/* ==========================================================================
   Collection Page Styles
   ValidCoupon-style coupon cards with dashed dividers, tag pills, code reveal
   ========================================================================== */

/* Collection Header */
.collection-premium-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: var(--radius-xl);
    padding: 48px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.collection-premium-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -5%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.collection-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.collection-header-icon {
    background: rgba(255,255,255,0.1);
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.collection-header-icon svg {
    width: 36px;
    height: 36px;
    stroke: #ffffff;
}

.collection-header-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.collection-header-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

.collection-deal-count {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

/* ==========================================================================
   Coupon Card — Exact ValidCoupon Match
   ========================================================================== */
.collection-deals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.coupon-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.coupon-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-color: #dee2e6;
}

/* Main Row */
.coupon-card-main {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 0;
}

/* Left: Discount */
.coupon-card-discount {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    flex-shrink: 0;
    padding-right: 24px;
    margin-top: 4px; /* Aligns with content top */
}

.discount-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
    letter-spacing: -0.03em;
}

.discount-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Dashed Divider */
.coupon-card-divider {
    width: 0;
    align-self: stretch;
    border-left: 1px dashed var(--border-color);
    flex-shrink: 0;
    margin: -8px 0;
}

/* Center: Content */
.coupon-card-content {
    flex: 1;
    padding: 0 24px;
    min-width: 0;
}

.coupon-card-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
}

.badge-verified {
    background: transparent;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.coupon-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.coupon-card-title a {
    color: inherit;
    text-decoration: none;
}

.coupon-card-title a:hover {
    color: #e74c3c;
}

/* Tag Pills */
.coupon-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.tag-views {
    background: #fee2e2;
    color: #dc2626;
}

.tag-neutral {
    background: #f1f5f9;
    color: #475569;
}

/* Right: Coupon Action */
.coupon-card-action {
    flex-shrink: 0;
    margin-left: auto;
    margin-top: 4px; /* Aligns with content top */
}

.coupon-reveal-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    height: 42px;
}

.coupon-partial-code {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px 0 16px;
    height: 100%;
    background: #fff0f0;
    border: 2px dashed #fca5a5;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 2px;
    min-width: 80px;
    text-align: center;
}

.coupon-show-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    color: #ffffff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 24px;
    height: 100%;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.coupon-show-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

.coupon-getdeal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 24px;
    height: 42px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.coupon-getdeal-btn:hover {
    background: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Bottom Footer Bar */
.coupon-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    border-top: 1px solid var(--border-color);
    background: transparent;
    font-size: 0.75rem;
    color: #64748b;
}

.coupon-footer-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-dot {
    color: #cbd5e1;
}

.coupon-see-details {
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.coupon-see-details:hover {
    color: #ef4444;
}

/* ==========================================================================
   Collection FAQ Section
   ========================================================================== */
.collection-faq-section {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.collection-faq-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 24px 0;
    letter-spacing: -0.02em;
}

.collection-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.collection-faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.collection-faq-item[open] {
    border-color: #ef4444;
}

.collection-faq-item summary {
    padding: 18px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.collection-faq-item summary:hover {
    background: var(--bg-tertiary);
}

.collection-faq-item summary::-webkit-details-marker {
    display: none;
}

.collection-faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.collection-faq-item[open] summary::after {
    content: '−';
}

.collection-faq-answer {
    padding: 0 24px 18px 24px;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.collection-empty-state {
    padding: 60px 40px;
    text-align: center;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.collection-empty-state .empty-icon {
    color: var(--text-light);
    margin-bottom: 8px;
}

.collection-empty-state h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.collection-empty-state p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.collection-empty-state .btn-browse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ef4444;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.collection-empty-state .btn-browse:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .collection-premium-header {
        padding: 32px 24px;
    }

    .collection-header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .collection-header-desc {
        max-width: 100%;
    }

    /* Coupon Card Mobile */
    .coupon-card-main {
        flex-wrap: wrap;
        padding: 20px 16px;
        gap: 16px;
    }

    .coupon-card-discount {
        min-width: 70px;
        padding-right: 16px;
    }

    .discount-value {
        font-size: 1.5rem;
    }

    .coupon-card-divider {
        align-self: stretch;
    }

    .coupon-card-content {
        flex: 1;
        padding: 0 0 0 16px;
        min-width: calc(100% - 110px);
    }

    .coupon-card-title {
        font-size: 1rem;
    }

    .coupon-card-tags {
        flex-wrap: wrap;
    }

    .coupon-card-action {
        width: 100%;
        margin-left: 0;
    }

    .coupon-reveal-wrapper {
        width: 100%;
    }

    .coupon-partial-code {
        flex: 1;
    }

    .coupon-show-btn {
        flex-shrink: 0;
    }

    .coupon-getdeal-btn {
        width: 100%;
        justify-content: center;
    }

    .coupon-card-footer {
        padding: 10px 16px;
        font-size: 0.75rem;
    }

    .collection-faq-item summary {
        padding: 14px 18px;
        font-size: 0.9375rem;
    }

    .collection-faq-answer {
        padding: 0 18px 14px 18px;
    }
}

/* ==========================================================================
   Dark Mode Overrides — Collection & Coupon Cards
   ========================================================================== */
.dark-mode .coupon-card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .coupon-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .discount-value {
    color: var(--text-main) !important;
}

.dark-mode .discount-label {
    color: var(--text-muted) !important;
}

.dark-mode .coupon-card-divider {
    border-left-color: var(--border-color) !important;
}

.dark-mode .badge-verified {
    border-color: var(--border-color) !important;
    color: var(--text-muted) !important;
    background: transparent !important;
}

.dark-mode .coupon-card-title {
    color: var(--text-main) !important;
}

.dark-mode .coupon-card-title a {
    color: var(--text-main) !important;
}

.dark-mode .coupon-card-title a:hover {
    color: var(--color-primary) !important;
}

.dark-mode .tag-neutral {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
}

.dark-mode .coupon-partial-code {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-muted) !important;
}

.dark-mode .coupon-card-footer {
    background: var(--bg-tertiary) !important;
    border-top-color: var(--border-color) !important;
    color: var(--text-muted) !important;
}

.dark-mode .coupon-see-details {
    color: var(--text-main) !important;
}

.dark-mode .coupon-see-details:hover {
    color: var(--color-primary) !important;
}

.dark-mode .collection-premium-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%) !important;
    color: var(--text-main) !important;
}

.dark-mode .collection-header-text h1 {
    color: var(--text-main) !important;
}

.dark-mode .collection-header-desc {
    color: var(--text-muted) !important;
}

.dark-mode .collection-deal-count {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
}

/* Premium Standalone Coupon Card (validcoupon-coupon-box) styling */
.validcoupon-coupon-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px auto;
    max-width: 420px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: all 0.3s ease;
}

.validcoupon-coupon-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.validcoupon-coupon-box .coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.validcoupon-coupon-box .coupon-status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

.validcoupon-coupon-box .status-active {
    background: #dcfce7;
    color: #166534;
}

.validcoupon-coupon-box .status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.validcoupon-coupon-box .coupon-discount {
    font-size: 1.125rem;
    font-weight: 800;
    color: #dc2626;
}

.validcoupon-coupon-box .coupon-code-wrapper {
    margin-bottom: 16px;
}

.validcoupon-coupon-box .validcoupon-reveal-btn {
    width: 100%;
    display: block;
    background: #ffb703;
    color: #023047;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(255, 183, 3, 0.3);
    transition: all 0.2s ease;
}

.validcoupon-coupon-box .validcoupon-reveal-btn:hover {
    background: #fb8500;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(251, 133, 0, 0.4);
}

.validcoupon-coupon-box .validcoupon-code-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.validcoupon-coupon-box .actual-code {
    font-family: monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.05em;
}

.validcoupon-coupon-box .validcoupon-copy-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.validcoupon-coupon-box .validcoupon-copy-btn:hover {
    background: #1d4ed8;
}

.validcoupon-coupon-box .validcoupon-visit-btn {
    width: 100%;
    display: block;
    text-align: center;
    background: #023047;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.validcoupon-coupon-box .validcoupon-visit-btn:hover {
    background: #0f4c5c;
    color: #ffffff !important;
}

/* Dark Mode Overrides */
.dark-mode .validcoupon-coupon-box {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.dark-mode .validcoupon-coupon-box .validcoupon-code-display {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .validcoupon-coupon-box .actual-code {
    color: var(--text-main) !important;
}

.dark-mode .validcoupon-coupon-box .validcoupon-visit-btn {
    background: #ffffff;
    color: #0f172a !important;
}

.dark-mode .validcoupon-coupon-box .validcoupon-visit-btn:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

@keyframes fadeInReveal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Horizontal Card Code Display Layout styling */
.coupon-reveal-wrapper .validcoupon-code-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    background: #fdf2f2;
    border: 2px dashed #fca5a5;
    border-radius: 8px;
    padding: 0 12px;
    width: 170px;
    box-sizing: border-box;
    animation: fadeInReveal 0.2s ease-out forwards;
}

.coupon-reveal-wrapper .actual-code {
    font-family: monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #dc2626;
}

.coupon-reveal-wrapper .validcoupon-copy-btn {
    background: #dc2626;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coupon-reveal-wrapper .validcoupon-copy-btn:hover {
    background: #b91c1c;
}

/* Dark Mode horizontal card overrides */
.dark-mode .coupon-reveal-wrapper .validcoupon-code-display {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .coupon-reveal-wrapper .actual-code {
    color: var(--text-main) !important;
}

.dark-mode .coupon-reveal-wrapper .validcoupon-copy-btn {
    background: var(--color-primary) !important;
    color: #ffffff !important;
}

