/* ============================================
   DEALS SECTION
   ============================================ */

.deals-section {
    padding: 5rem 2rem 6rem;
    background: #f8f9fc;
    position: relative;
}

.section-title {
    font-size: 2.4rem;
    color: #2c3e50;
    margin-bottom: 2.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
}

/* ============================================
   CATEGORY FILTER TABS
   ============================================ */

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 4rem;
}

.cat-tab {
    padding: 0.55rem 1.4rem;
    border-radius: 50px;
    border: 1.5px solid #e0e0e8;
    background: #fff;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.cat-tab:hover {
    border-color: #c9a961;
    color: #c9a961;
    background: #fdf8ee;
}

.cat-tab.active {
    background: #c9a961;
    border-color: #c9a961;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(201, 169, 97, 0.35);
}

/* ============================================
   DEALS GRID
   ============================================ */

.deals-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    align-items: start;
}

/* ============================================
   DEAL CARDS
   ============================================ */

.deal-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid #e8e9ed;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s ease;
    animation: fadeInUp 0.55s ease-out both;
}

.deal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c9a961 0%, #e2c27d 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.deal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(201, 169, 97, 0.18);
    border-color: #c9a961;
}

/* Featured variant */
.deal-card--featured {
    border-color: #c9a961;
    box-shadow: 0 6px 28px rgba(201, 169, 97, 0.2);
}

/* ============================================
   FEATURED RIBBON
   ============================================ */

.featured-ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #c9a961 0%, #b4944d 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    box-shadow: 0 3px 12px rgba(180, 148, 77, 0.45);
    z-index: 2;
    white-space: nowrap;
}

.featured-ribbon::after {
    display: none;
}

/* Extra top padding on featured card header to make room for the straddling ribbon */
.deal-card--featured .deal-card-header {
    padding-top: 2rem;
}

/* ============================================
   CARD HEADER
   ============================================ */

.deal-card-header {
    padding: 1.5rem 1.75rem 1.25rem;
    background: linear-gradient(135deg, #f9fafc 0%, #fff 100%);
    border-bottom: 1px solid #eef0f4;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deal-tag {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #8892a0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.deal-tag svg {
    color: #c9a961;
    flex-shrink: 0;
}

/* ============================================
   CARD CONTENT
   ============================================ */

.deal-content {
    padding: 1.75rem 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.deal-title {
    font-size: 1.45rem;
    color: #1e2a38;
    margin-bottom: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
}

.deal-description {
    font-size: 0.97rem;
    color: #6c757d;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

/* ============================================
   BRAND TAGS
   ============================================ */

.deal-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.brand-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.75rem;
    background: #f0ece2;
    color: #8a6929;
    border: 1px solid #e2d5b5;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.brand-tag--link {
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
                box-shadow 0.2s ease, transform 0.2s ease;
}

.brand-tag--link:hover {
    background: #c9a961;
    border-color: #c9a961;
    color: #fff;
    box-shadow: 0 3px 10px rgba(201, 169, 97, 0.35);
    transform: translateY(-1px);
}

/* ============================================
   DEAL FOOTER & PRICING
   ============================================ */

.deal-footer {
    margin-top: auto;
}

.deal-pricing {
    background: #f8f9fc;
    padding: 1.25rem 1.4rem;
    border-radius: 12px;
    margin-bottom: 0.85rem;
    border: 1px solid #eef0f4;
}

.price-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.price-wrapper:first-child {
    padding-bottom: 0.85rem;
    border-bottom: 1.5px dashed #e0e4ea;
    margin-bottom: 0.5rem;
}

.price-label {
    font-size: 0.8rem;
    color: #99a4b0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.original-price {
    font-size: 1.25rem;
    color: #b0b8c4;
    text-decoration: line-through;
    font-weight: 500;
}

.price-wrapper.featured .price-label {
    color: #c9a961;
    font-weight: 700;
}

.deal-price {
    font-size: 2rem;
    color: #c9a961;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ============================================
   SAVINGS ROW
   ============================================ */

.deal-savings {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #f0ece2;
    border-radius: 8px;
    color: #8a6929;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #e2d5b5;
}

.deal-savings svg {
    flex-shrink: 0;
    color: #c9a961;
}

/* ============================================
   DEAL BUTTON
   ============================================ */

.deal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #c9a961 0%, #b4944d 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 14px rgba(201, 169, 97, 0.3);
    border: none;
    cursor: pointer;
    margin-top: 0.85rem;
}

.deal-btn svg { transition: transform 0.3s ease; }

.deal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(201, 169, 97, 0.4);
    background: linear-gradient(135deg, #b4944d 0%, #a38442 100%);
}

.deal-btn:hover svg { transform: translateX(4px); }
.deal-btn:active { transform: translateY(0); }

/* ============================================
   NO DEALS STATE
   ============================================ */

.no-deals {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    background: #fff;
    border-radius: 18px;
    border: 2px dashed #e8e9ed;
}

.no-deals-icon {
    margin-bottom: 1.5rem;
}

.no-deals-icon svg {
    color: #c9a961;
    opacity: 0.45;
}

.no-deals h3 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 0.85rem;
    font-weight: 700;
}

.no-deals p {
    font-size: 1.05rem;
    color: #6c757d;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   STAGGERED ANIMATION
   ============================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.deal-card:nth-child(1)  { animation-delay: 0.05s; }
.deal-card:nth-child(2)  { animation-delay: 0.12s; }
.deal-card:nth-child(3)  { animation-delay: 0.19s; }
.deal-card:nth-child(4)  { animation-delay: 0.26s; }
.deal-card:nth-child(5)  { animation-delay: 0.33s; }
.deal-card:nth-child(6)  { animation-delay: 0.40s; }
.deal-card:nth-child(7)  { animation-delay: 0.47s; }
.deal-card:nth-child(8)  { animation-delay: 0.54s; }

/* ============================================
   TABLET (max-width: 968px)
   ============================================ */

@media (max-width: 968px) {
    .section-title { font-size: 2rem; }

    .deals-container {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.75rem;
    }

    .deal-title { font-size: 1.3rem; }
}

/* ============================================
   MOBILE (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
    .deals-section { padding: 3.5rem 1.25rem 4rem; }

    .section-title { font-size: 1.8rem; margin-bottom: 2rem; }

    .category-tabs { gap: 0.4rem; }
    .cat-tab { font-size: 0.82rem; padding: 0.48rem 1.1rem; }

    .deals-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .deal-card-header { padding: 1.25rem 1.25rem 1rem; }

    .deal-content { padding: 1.5rem 1.25rem; }

    .deal-title { font-size: 1.25rem; }

    .deal-description { font-size: 0.93rem; }

    .deal-price { font-size: 1.75rem; }
}

/* ============================================
   SMALL MOBILE (max-width: 480px)
   ============================================ */

@media (max-width: 480px) {
    .deals-section { padding: 3rem 1rem 3.5rem; }

    .section-title { font-size: 1.6rem; }

    .category-tabs { gap: 0.35rem; }
    .cat-tab { font-size: 0.78rem; padding: 0.42rem 0.95rem; }

    .deal-card { border-radius: 14px; }

    .deal-card-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

    .deal-title { font-size: 1.15rem; }

    .deal-description { font-size: 0.9rem; }

    .deal-pricing { padding: 1rem 1.1rem; }

    .price-wrapper { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .price-wrapper:first-child { padding-bottom: 0.75rem; margin-bottom: 0.4rem; }

    .original-price { font-size: 1.1rem; }
    .deal-price { font-size: 1.65rem; }

    .deal-savings { font-size: 0.8rem; }

    .brand-tag { font-size: 0.73rem; padding: 0.23rem 0.65rem; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   FOCUS / ACCESSIBILITY
   ============================================ */

.deal-btn:focus-visible,
.cat-tab:focus-visible,
a:focus-visible {
    outline: 3px solid #c9a961;
    outline-offset: 3px;
}