/**
 * BatBargain.com - Premium Stylesheet
 * Dual Theme Support (Light & Dark)
 */

/* ========== CSS Variables ========== */
:root {
    /* Light Theme Colors */
    --primary-color: #1a237e;
    --primary-dark: #0d1642;
    --primary-light: #3949ab;
    --accent-color: #ffc107;
    --accent-dark: #ffa000;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e0e0e0;
    
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-muted: #9e9e9e;
    
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    
    --heat-cold: #2196f3;
    --heat-warm: #ff9800;
    --heat-hot: #f44336;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #3949ab;
    --primary-dark: #1a237e;
    --primary-light: #5c6bc0;
    --accent-color: #ffc107;
    --accent-dark: #ffb300;
    
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2a2a2a;
    
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #757575;
    
    --border-color: #333333;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.5);
}

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== Layout ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ========== Header & Navigation ========== */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo img {
    height: 68px;  /* 1.5x bigger (was 45px) */
    width: auto;
    background: none !important;
    padding: 0;
    border: none;
    box-shadow: none !important;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transition: all 0.3s ease;
}

/* Light theme: Dark blue logo with yellow border/glow - logo-dark.png */
[data-theme="light"] .logo img {
    filter: drop-shadow(0 0 2px #fbbf24) drop-shadow(0 0 3px #fbbf24) drop-shadow(0 0 1px #f59e0b);
    opacity: 1;
}

/* Dark theme: Yellow logo with white border/glow - logo-light.png */
[data-theme="dark"] .logo img {
    filter: drop-shadow(0 0 2px #ffffff) drop-shadow(0 0 3px #ffffff) drop-shadow(0 0 1px #e0e0e0);
    opacity: 1;
}


.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-menu a:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
}

/* ========== Search Bar ========== */
.search-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 80px 0;
    text-align: center;
    color: white;
}

.search-hero h1 {
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: 700;
}

.search-hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-box input {
    flex: 1;
    padding: 18px 30px;
    border: none;
    font-size: 16px;
    outline: none;
    color: var(--text-primary);
}

.search-box button {
    padding: 18px 40px;
    background: var(--accent-color);
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-box button:hover {
    background: var(--accent-dark);
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent-color);
    color: var(--primary-color);
}

.btn-accent:hover {
    background: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* ========== Cards ========== */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-image {
    width: 100%;
    height: 170px;  /* Smaller card image while still prominent */
    object-fit: cover;  /* Changed from contain to cover for better display */
    background: var(--bg-secondary);
    border-radius: 8px 8px 0 0;  /* Rounded top corners */
}

.card-body {
    padding: 16px;  /* Reduced from 20px */
}

.card-title {
    font-size: 16px;  /* Reduced from 18px */
    font-weight: 600;
    margin-bottom: 8px;  /* Reduced from 10px */
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;  /* Tighter line height */
}

.card-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== Deal Cards ========== */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 40px 0;
}

.deal-card {
    position: relative;
    max-width: 250px;  /* Smaller card size (requested ~65%) */
    margin: 0 auto;  /* Center cards */
}

/* Tighten deal card spacing (reduce empty gaps) */
.deal-card .card-body {
    padding: 12px 12px 10px;
}
.deal-card .card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: var(--bg-secondary);
}
.deal-card .deal-price { margin: 6px 0; }
.deal-card .deal-price-section {
    margin: 10px 0;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.deal-card .card-footer {
    padding: 10px 0 0;
    border-top: none;
}
.deal-card .deal-actions { margin-top: 10px; }
.deal-card .deal-retailer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 10px;
    color: var(--text-secondary);
    font-size: 14px;
}
.deal-card .deal-category { font-size: 12px; margin-bottom: 6px; color: var(--text-muted); }

.deal-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

.deal-badge.hot {
    background: var(--heat-hot);
    color: white;
}

.deal-badge.featured {
    background: var(--primary-color);
    color: white;
}

.deal-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

.deal-original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 16px;
    margin-right: 10px;
}

.deal-discount {
    background: var(--error-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.deal-retailer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.deal-retailer img {
    height: 20px;
    width: auto;
}

.deal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.deal-heat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.deal-heat.cold {
    color: var(--heat-cold);
}

.deal-heat.warm {
    color: var(--heat-warm);
}

.deal-heat.hot {
    color: var(--heat-hot);
}

/* ========== Vote Buttons ========== */
.vote-buttons {
    display: flex;
    gap: 8px;
}

.vote-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vote-btn:hover {
    background: var(--bg-secondary);
}

.vote-btn.voted-up {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.vote-btn.voted-down {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

/* ========== Category Navigation ========== */
.category-nav {
    background: var(--bg-secondary);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.category-list {
    display: flex;
    gap: 15px;
    list-style: none;
    overflow-x: auto;
    padding: 10px 0;
}

.category-list::-webkit-scrollbar {
    height: 6px;
}

.category-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.category-item {
    flex-shrink: 0;
}

.category-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-item a:hover,
.category-item a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========== Comparison Table ========== */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin: 20px 0;
}

.comparison-table thead th {
    background: var(--bg-secondary);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.comparison-table tbody tr {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.comparison-table tbody tr:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.comparison-table td {
    padding: 15px;
    vertical-align: middle;
}

.comparison-table .retailer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comparison-table .retailer-logo {
    height: 30px;
    width: auto;
}

.comparison-table .price-cell {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-error {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 5px;
}

.form-success {
    color: var(--success-color);
    font-size: 13px;
    margin-top: 5px;
}

/* ========== Alerts ========== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid var(--info-color);
    color: var(--info-color);
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-secondary);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== Responsive Design ========== */

/* Mobile-first improvements */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

.container {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 1200px) {
    .deals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .deals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .navbar {
        flex-wrap: wrap;
        padding: 12px 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .nav-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .search-hero {
        padding: 40px 20px;
    }
    
    .search-hero h1 {
        font-size: 28px;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-bar input {
        border-radius: 8px;
    }
    
    .search-bar button {
        width: 100%;
        border-radius: 8px;
    }
    
    .deal-card {
        font-size: 14px;
    }
    
    .card {
        padding: 16px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    table {
        font-size: 14px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .deals-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 40px; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ========== Deal Detail Page Layout ========== */
.deal-detail-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.deal-image-container {
    flex: 0 0 320px;
    max-width: 320px;
}

.deal-detail-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.deal-info-container {
    flex: 1;
    min-width: 0;
}

.deal-info-container h1 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.deal-price-section {
    margin: 10px 0;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .deal-detail-layout {
        flex-direction: column;
        gap: 24px;
    }
    
    .deal-image-container {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }
    
    .deal-info-container h1 {
        font-size: 24px;
    }
}


/* Mobile navigation */
.mobile-menu-toggle {
    display: none !important;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 18px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        padding: 10px 0;
        z-index: 999;
    }
    .nav-menu.open { display: flex; }
    .nav-menu li { padding: 10px 20px; }
    .navbar { position: relative; }
}


/* Mobile nav fine-tuning */
@media (max-width: 480px) {
    .navbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }
    .logo {
        gap: 10px;
        font-size: 20px;
    }
    .logo img {
        height: 70px;
    }
    .mobile-menu-toggle {
        margin-left: auto;
        order: 2;
    }
    .nav-actions {
        width: 100%;
        justify-content: flex-end;
        order: 3;
        gap: 10px;
    }
    .nav-menu {
        font-size: 18px;
    }
    .nav-menu li {
        padding: 12px 20px;
    }
}

/* Professional modal (replaces browser alert/confirm) */
.bb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
}
.bb-modal-overlay.open { display: flex; }

.bb-modal {
    width: 100%;
    max-width: 520px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.bb-modal-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bb-modal-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0;
}

.bb-modal-body {
    padding: 18px;
    color: var(--text-primary);
    line-height: 1.5;
}

.bb-modal-actions {
    padding: 14px 18px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.bb-modal-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 6px 10px;
}


/* --- V7 FIX 3: Category nav styling --- */
.category-nav { padding: 18px 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.category-list {
    list-style: none;
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-list::-webkit-scrollbar { display: none; }
.category-item a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.category-item a .cat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255,255,255,0.2));
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    font-size: 20px;
    flex: 0 0 auto;
}
.category-item a .cat-name { font-weight: 600; }
.category-item a:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: rgba(0,0,0,0.08); }
.category-item a:focus { outline: 2px solid rgba(43,86,255,.25); outline-offset: 2px; }

/* --- V7 FIX 3: Deal cards tooltip --- */
.deal-card .card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin: 6px 0 6px;
}
.deal-card .card-title .card-title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.deal-card .card-title .bb-tooltip {
    position: absolute;
    left: 0;
    top: -38px;
    background: rgba(0,0,0,0.78);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease;
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.deal-card:hover .card-title .bb-tooltip { opacity: 1; transform: translateY(0); }

/* --- V7 FIX 3: Deal detail sizing --- */
.deal-detail-container { max-width: 980px; margin: 0 auto; }
.deal-detail-hero .deal-image { max-height: 520px; }
@media (min-width: 992px) {
  .deal-detail-container { transform: scale(0.9); transform-origin: top center; }
}
/* Keep image strong even when scaled */
.deal-detail-hero .deal-image img,
.deal-card .card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: var(--bg-secondary);
}

/* Force hamburger hidden on desktop (extra safety) */
@media (min-width: 769px) { #mobile-menu-toggle { display: none !important; } }
@media (max-width: 768px) { #mobile-menu-toggle { display: inline-flex !important; } }


/* Home category strip: stretch full width and look more premium */
.category-nav .container{
    max-width: 100%;
}
.category-list{
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: nowrap;
}
.category-item{
    flex: 1 1 0;
}
.category-item a{
    width: 100%;
    padding: 14px 10px;
    border-radius: 16px;
}
.category-item .cat-icon{
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    font-size: 22px;
}
@media (max-width: 900px){
  .category-list{
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 6px;
  }
  .category-item{
    flex: 0 0 auto;
    min-width: 140px;
  }
}
