/* =====================================================
   HedwigPost — Deals & Recommendations Page
   Premium product cards, badges, responsive grid
   ===================================================== */

/* ==================== DEALS HERO ==================== */
.deals-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 48px 24px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.deals-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(227,38,45,.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(59,130,246,.1) 0%, transparent 50%);
    animation: heroPulse 8s ease-in-out infinite;
}
@keyframes heroPulse {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.05); opacity: 1; }
}
.deals-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.deals-hero p {
    font-size: .95rem;
    opacity: .8;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

/* ==================== DEAL CATEGORIES NAV ==================== */
.deals-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 20px 24px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: var(--header-h);
    z-index: 50;
}
.deals-cats a {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text-body);
    font-size: .82rem;
    font-weight: 500;
    transition: all .2s;
    white-space: nowrap;
}
.deals-cats a:hover,
.deals-cats a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    transform: translateY(-1px);
}

/* ==================== SORT & FILTER BAR ==================== */
.deals-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 12px;
}
.deals-toolbar .result-count {
    font-size: .85rem;
    color: var(--text-secondary);
}
.deals-toolbar select {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-body);
    font-size: .82rem;
    font-family: var(--font-primary);
    cursor: pointer;
}

/* ==================== CATEGORY INTRO ==================== */
.deals-intro {
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    line-height: 1.7;
    color: var(--text-body);
    font-size: .92rem;
}
.deals-intro p { margin: 0; }

/* ==================== PRODUCT GRID ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--red);
}

/* Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    z-index: 2;
    color: #fff;
}
.product-badge.best-pick { background: linear-gradient(135deg, #f59e0b, #d97706); }
.product-badge.top-rated { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.product-badge.trending {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: trendPulse 2s ease-in-out infinite;
}
.product-badge.limited-offer { background: linear-gradient(135deg, #f97316, #ea580c); }
@keyframes trendPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .75; transform: scale(1.05); }
}

/* Image */
.product-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.product-card:hover .product-card-image img {
    transform: scale(1.05);
}
.product-card-image .placeholder-icon {
    font-size: 2.5rem;
    opacity: .25;
}

/* Body */
.product-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card-body h3 {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 4px;
    line-height: 1.3;
}
.product-card-body .product-desc {
    font-size: .75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: .7rem;
}
.product-rating .stars {
    color: #f59e0b;
    letter-spacing: 1px;
}
.product-rating .rating-num {
    color: var(--text-muted);
    font-weight: 500;
}

/* Price Row */
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}
.product-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--red);
}
.product-original-price {
    font-size: .75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* CTA Button */
.product-cta {
    display: block;
    text-align: center;
    padding: 8px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: .75rem;
    font-weight: 600;
    transition: background .2s, transform .2s;
    letter-spacing: .3px;
}
.product-cta:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

/* ==================== SHARE BUTTONS ==================== */
.deals-share {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    margin-top: 32px;
}
.deals-share span {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 4px;
}
.deals-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    text-decoration: none;
    font-size: .85rem;
    color: var(--text-body);
    transition: all .2s;
}
.deals-share a:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    transform: translateY(-2px);
}

/* ==================== SIDEBAR DEAL CATS ==================== */
.deal-cats-sidebar {
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}
.deal-cats-sidebar h3 {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-black);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--red);
}
.deal-cats-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.deal-cats-sidebar li a {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    text-decoration: none;
    color: var(--text-body);
    font-size: .82rem;
    border-radius: var(--radius);
    transition: all .2s;
}
.deal-cats-sidebar li a:hover {
    background: rgba(227,38,45,.06);
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: 6px;
}
.deal-cats-sidebar .cat-count {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==================== DEALS LAYOUT ==================== */
.deals-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px;
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 24px;
    align-items: start;
}
.deals-main {
    min-width: 0;
}

/* ==================== EMPTY STATE ==================== */
.deals-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.deals-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: .4;
}
.deals-empty p {
    font-size: .95rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 950px) {
    .deals-content {
        grid-template-columns: 1fr;
    }
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 750px) {
    .deals-hero { padding: 32px 16px; }
    .deals-hero h1 { font-size: 1.4rem; }
    .deals-cats { gap: 6px; padding: 12px 16px; }
    .deals-cats a { padding: 5px 12px; font-size: .75rem; }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .product-card-image { aspect-ratio: 16/10; }
}
@media (max-width: 550px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
    .products-grid { grid-template-columns: 1fr; }
}
