/* ============================================================
   Benz Society — car-theme.css
   Design system ported from car.html (AUTOVOLT magazine style)
   Dark-first: :root = dark theme, [data-bs-theme="light"] = light.
   ============================================================ */
:root {
    --accent: #E11D48;
    --accent-hover: #BE123C;
    --accent-light: rgba(225,29,72,0.1);
    --accent-glow: rgba(225,29,72,0.35);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --bg-body: #0B0F1A;
    --bg-card: #141926;
    --bg-card-hover: #1A2035;
    --bg-nav: rgba(11,15,26,0.85);
    --bg-input: #1A2035;
    --border-color: rgba(255,255,255,0.08);
    --border-hover: rgba(225,29,72,0.4);
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --hero-overlay: linear-gradient(to top, #0B0F1A 0%, rgba(11,15,26,0.75) 45%, rgba(11,15,26,0.3) 100%);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 25px -5px var(--accent-glow);
    --ad-bg: #0E1220;
    --ad-border: rgba(255,255,255,0.06);
    --ad-label-bg: rgba(255,255,255,0.08);
    --ad-label-text: #64748B;
}
[data-bs-theme="light"] {
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFF1F3;
    --bg-nav: rgba(248,250,252,0.88);
    --bg-input: #F1F5F9;
    --border-color: #E2E8F0;
    --border-hover: rgba(225,29,72,0.4);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --hero-overlay: linear-gradient(to top, #F8FAFC 0%, rgba(248,250,252,0.75) 45%, rgba(248,250,252,0.2) 100%);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-glow: 0 0 25px -5px rgba(225,29,72,0.2);
    --ad-bg: #F1F5F9;
    --ad-border: #E2E8F0;
    --ad-label-bg: rgba(0,0,0,0.06);
    --ad-label-text: #94A3B8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--text-primary);
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
h1,h2,h3,h4,h5 { font-family: var(--font-heading); }

/* Gap / flex utilities (Bootstrap 5 gap-* fallback for Bootstrap 4 pages) */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1; }

/* NAVBAR */
.navbar-custom {
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s ease;
    padding: 0.75rem 0;
}
.navbar-custom.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.15); }
.navbar-custom .nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active { color: var(--accent); }
.navbar-brand-text { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; color: var(--text-primary) !important; text-decoration: none; }
.navbar-brand-text span { color: var(--accent); }

/* Cart badge on navbar */
.badge-cart {
    position: absolute; top: -6px; right: -9px;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--accent); color: #fff;
    border-radius: 9px; font-size: 0.65rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Mobile collapse fallback (works with or without Bootstrap) */
.navbar-collapse.collapse:not(.show) { display: none; }
@media (min-width: 992px) {
    .navbar-collapse.collapse { display: flex !important; flex-basis: auto; }
}

/* THEME TOGGLE */
.theme-toggle {
    width: 52px; height: 28px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.theme-toggle::after {
    content: '';
    width: 22px; height: 22px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}
[data-bs-theme="light"] .theme-toggle::after { transform: translateX(24px); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 0.75rem; z-index: 2; transition: opacity 0.3s;
}
.theme-toggle .icon-moon { left: 7px; color: #FCD34D; }
.theme-toggle .icon-sun { right: 7px; color: #F97316; }
[data-bs-theme="dark"] .theme-toggle .icon-sun { opacity: 0.3; }
[data-bs-theme="light"] .theme-toggle .icon-moon { opacity: 0.3; }

/* BUTTONS */
.btn-accent {
    background: var(--accent); color: #fff; border: none;
    font-weight: 600; font-size: 0.875rem; border-radius: 10px;
    padding: 0.65rem 1.5rem; transition: all 0.2s ease;
    box-shadow: var(--shadow-glow);
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 0 30px -5px var(--accent-glow); }
.btn-outline-custom {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--border-color); font-weight: 600;
    font-size: 0.875rem; border-radius: 10px; padding: 0.65rem 1.5rem; transition: all 0.2s ease;
}
.btn-outline-custom:hover { border-color: var(--border-hover); color: var(--accent); background: var(--accent-light); }

/* HERO */
.hero-section {
    position: relative; min-height: 100vh;
    display: flex; align-items: flex-end; padding-bottom: 5rem; overflow: hidden;
}
.hero-section .hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: brightness(0.5); transition: filter 0.4s;
}
[data-bs-theme="light"] .hero-section .hero-bg { filter: brightness(0.7); }
.hero-section .hero-overlay { position: absolute; inset: 0; background: var(--hero-overlay); }
.hero-glow {
    position: absolute; width: 400px; height: 400px;
    background: var(--accent); opacity: 0.06; border-radius: 50%;
    filter: blur(100px); top: 30%; left: 20%; pointer-events: none;
}

/* BADGE */
.badge-accent {
    background: var(--accent-light); border: 1px solid rgba(225,29,72,0.25);
    color: var(--accent); font-weight: 600; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 0.3rem 0.7rem; border-radius: 50px;
}

/* CARDS */
.card-custom {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; overflow: hidden; transition: all 0.4s ease;
    box-shadow: var(--shadow-card);
}
.card-custom:hover { border-color: var(--border-hover); transform: translateY(-5px); box-shadow: var(--shadow-glow); }
.card-custom .card-img-wrap { overflow: hidden; }
.card-custom .card-img-wrap img { transition: transform 0.7s ease; width: 100%; height: 100%; object-fit: cover; }
.card-custom:hover .card-img-wrap img { transform: scale(1.06); }

/* Product card price block */
.price-current { color: var(--accent); font-weight: 700; font-family: var(--font-heading); }
.price-old { color: var(--text-muted); text-decoration: line-through; font-size: 0.8rem; font-weight: 400; }
.product-badge {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    background: var(--accent); color: #fff;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 4px 10px; border-radius: 50px;
}

/* FEATURED */
.featured-card {
    position: relative; border-radius: 20px; overflow: hidden;
    border: 1px solid var(--border-color); background: var(--bg-card); transition: all 0.4s ease;
}
.featured-card:hover { border-color: var(--border-hover); }
.featured-card .featured-img { overflow: hidden; }
.featured-card .featured-img img { transition: transform 0.7s ease; width: 100%; height: 100%; object-fit: cover; }
.featured-card:hover .featured-img img { transform: scale(1.04); }
.featured-card .featured-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

/* CATEGORY PILLS */
.cat-pill {
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 0.78rem; font-weight: 600;
    padding: 0.4rem 1rem; border-radius: 50px; cursor: pointer;
    transition: all 0.25s ease; white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ARTICLE ITEM */
.article-item {
    display: flex; gap: 1.25rem; padding: 1rem;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 14px; transition: all 0.35s ease; cursor: pointer;
}
.article-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateX(4px); }
.article-item .article-thumb { width: 140px; min-height: 100px; flex-shrink: 0; border-radius: 10px; overflow: hidden; }
.article-item .article-thumb img { transition: transform 0.6s ease; width:100%; height:100%; object-fit:cover; }
.article-item:hover .article-thumb img { transform: scale(1.08); }

/* VARIETY CARD */
.variety-card {
    position: relative; border-radius: 18px; overflow: hidden;
    border: 1px solid var(--border-color); cursor: pointer; transition: all 0.4s ease;
}
.variety-card:hover { border-color: var(--border-hover); transform: translateY(-5px); }
.variety-card .vc-img { overflow: hidden; }
.variety-card .vc-img img { transition: transform 0.7s ease; width:100%; height:100%; object-fit:cover; }
.variety-card:hover .vc-img img { transform: scale(1.06); }
.variety-card .vc-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}
.variety-card .vc-arrow { opacity: 0; transition: opacity 0.3s; }
.variety-card:hover .vc-arrow { opacity: 1; }

/* REVIEW */
.review-card .play-btn {
    width: 56px; height: 56px; background: var(--accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 25px -5px var(--accent-glow); transition: transform 0.3s, box-shadow 0.3s;
}
.review-card:hover .play-btn { transform: scale(1.12); box-shadow: 0 0 35px -3px var(--accent-glow); }
.review-card .play-btn i { color: #fff; font-size: 1.2rem; margin-left: 3px; }
.stat-num { font-family: var(--font-heading); color: var(--accent); font-weight: 700; }
.input-custom {
    background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-primary); border-radius: 10px; padding: 0.75rem 1.25rem;
    font-size: 0.875rem; transition: border-color 0.3s;
}
.input-custom::placeholder { color: var(--text-muted); }
.input-custom:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); outline: none; background: var(--bg-input); color: var(--text-primary); }
.section-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.section-title { font-size: 2rem; font-weight: 600; margin-top: 0.4rem; }
@media (min-width:768px) { .section-title { font-size: 2.5rem; } }
.footer-link { color: var(--text-muted); font-size: 0.875rem; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--accent); }
.social-icon {
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-muted); transition: all 0.3s; text-decoration: none;
}
.social-icon:hover { color: var(--accent); border-color: var(--border-hover); background: var(--accent-light); }
.section-divider { border-color: var(--border-color); }
.star-rating { color: var(--accent); }
.line-clamp-2 { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.line-clamp-3 { display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden; }

/* ========== AD BANNERS ========== */
.ad-banner {
    background: var(--ad-bg);
    border: 1px dashed var(--ad-border);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}
.ad-banner:hover { border-color: var(--border-hover); }
.ad-label {
    position: absolute; top: 8px; left: 8px; z-index: 3;
    background: var(--ad-label-bg);
    color: var(--ad-label-text);
    font-size: 0.6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    padding: 3px 8px; border-radius: 4px;
    display: flex; align-items: center; gap: 4px;
}
.ad-label i { font-size: 0.55rem; }
.ad-leaderboard { max-width: 728px; margin: 0 auto; height: 90px; }
.ad-leaderboard .ad-inner {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; gap: 1rem; padding: 0 3rem;
}
.ad-leaderboard .ad-logo { width: 48px; height: 48px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ad-leaderboard .ad-logo i { color: #fff; font-size: 1.4rem; }
.ad-leaderboard .ad-text h6 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 2px; color: var(--text-primary); }
.ad-leaderboard .ad-text p { font-size: 0.75rem; color: var(--text-muted); margin: 0; font-weight: 300; }
.ad-leaderboard .ad-cta {
    flex-shrink: 0; padding: 0.5rem 1.2rem; border-radius: 8px;
    background: var(--accent); color: #fff; font-size: 0.78rem;
    font-weight: 600; text-decoration: none; transition: background 0.2s;
    white-space: nowrap;
}
.ad-leaderboard .ad-cta:hover { background: var(--accent-hover); color: #fff; }
.ad-mrect { height: 250px; }
.ad-mrect .ad-inner {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 0.75rem; text-align: center; padding: 2.5rem 1.5rem;
}
.ad-mrect .ad-icon { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), #F97316); display: flex; align-items: center; justify-content: center; }
.ad-mrect .ad-icon i { color: #fff; font-size: 1.8rem; }
.ad-mrect .ad-inner h5 { font-family: var(--font-heading); font-size: 1.1rem; margin-bottom: 0.25rem; color: var(--text-primary); }
.ad-mrect .ad-inner p { font-size: 0.8rem; color: var(--text-muted); margin: 0; font-weight: 300; line-height: 1.5; }
.ad-mrect .ad-inner .ad-cta { margin-top: 0.5rem; padding: 0.5rem 1.5rem; border-radius: 8px; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.ad-mrect .ad-inner .ad-cta:hover { background: var(--accent-hover); color: #fff; }
.ad-large { height: 120px; }
.ad-large .ad-inner {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; gap: 1.5rem; padding: 0 2rem;
    background: linear-gradient(135deg, rgba(225,29,72,0.06), rgba(249,115,22,0.06));
}
.ad-large .ad-icon-lg { width: 72px; height: 72px; border-radius: 18px; background: linear-gradient(135deg, var(--accent), #F97316); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ad-large .ad-icon-lg i { color: #fff; font-size: 2rem; }
.ad-large .ad-text h5 { font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 4px; color: var(--text-primary); }
.ad-large .ad-text p { font-size: 0.8rem; color: var(--text-muted); margin: 0; font-weight: 300; }
.ad-large .ad-cta {
    flex-shrink: 0; padding: 0.6rem 1.5rem; border-radius: 10px;
    background: var(--accent); color: #fff; font-size: 0.85rem;
    font-weight: 600; text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.ad-large .ad-cta:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.ad-inline { height: auto; min-height: 120px; }
.ad-sticky { position: sticky; top: 6rem; }

@keyframes fadeUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
.anim-fade-up { opacity: 0; }
.anim-fade-up.visible { animation: fadeUp 0.65s ease-out forwards; }
@keyframes bounce { 0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)} }
.anim-bounce { animation: bounce 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1}50%{opacity:.4} }
.pulse-dot { animation: pulse-dot 1.5s infinite; }

.toast-custom {
    position: fixed; top: 5.5rem; right: 1.5rem; z-index: 9999;
    background: var(--bg-card); border: 1px solid var(--border-hover);
    border-radius: 12px; padding: 1rem 1.5rem;
    display: flex; align-items: center; gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateX(120%); transition: transform 0.4s ease;
}
.toast-custom.show { transform: translateX(0); }
.back-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-muted); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s;
    opacity: 0; pointer-events: none; transform: translateY(10px);
}
.back-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { color: var(--accent); border-color: var(--border-hover); }

/* Empty state */
.empty-state {
    border: 1px dashed var(--border-color); border-radius: 16px;
    padding: 3rem 1.5rem; text-align: center; color: var(--text-muted);
    font-size: 0.9rem; font-weight: 300;
}
.empty-state i { font-size: 2rem; display: block; margin-bottom: 0.5rem; opacity: 0.4; }

@media (max-width:767px) {
    .article-item .article-thumb { width: 100px; min-height: 75px; }
    .hero-section { padding-bottom: 3rem; }
    .ad-leaderboard { height: auto; min-height: 70px; }
    .ad-leaderboard .ad-inner { flex-direction: column; padding: 2.5rem 1.5rem 1.5rem; gap: 0.5rem; }
    .ad-large .ad-inner { flex-direction: column; padding: 2.5rem 1.5rem 1.5rem; gap: 0.5rem; text-align: center; }
    .ad-mrect { height: 220px; }
}
@media (min-width: 992px) {
    .col-lg-5-custom {
        width: 20%;
        flex: 0 0 20%;
    }
}

/* ===== Maintenance popup ===== */
.maint-modal {
    position: fixed; inset: 0; z-index: 1080;
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem;
    background: rgba(5, 8, 15, 0.72);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
}
.maint-modal.show { opacity: 1; visibility: visible; }
.maint-box {
    width: 100%; max-width: 430px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 2.5rem 2rem 2rem;
    text-align: center; position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.maint-modal.show .maint-box { transform: translateY(0) scale(1); }
.maint-close {
    position: absolute; top: 0.9rem; right: 1rem;
    background: none; border: none; font-size: 1.35rem; line-height: 1;
    color: var(--text-muted); cursor: pointer; transition: color 0.25s; padding: 0.25rem;
}
.maint-close:hover { color: var(--accent); }
.maint-icon {
    position: relative;
    width: 74px; height: 74px; border-radius: 22px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--accent), #F97316);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 34px rgba(225, 29, 72, 0.35);
}
.maint-icon i { color: #fff; font-size: 2rem; position: relative; z-index: 1; }
.maint-box h3 {
    font-family: var(--font-heading); font-size: 1.35rem;
    margin-bottom: 0.65rem; color: var(--text-primary);
}
.maint-box p {
    font-size: 0.875rem; color: var(--text-muted); font-weight: 300;
    line-height: 1.7; margin-bottom: 1.75rem;
}
.maint-box .btn { width: 100%; }
.pulse-ring {
    position: absolute; inset: 0; border-radius: 22px;
    border: 2px solid rgba(225, 29, 72, 0.5);
    animation: maintPulse 1.8s ease-out infinite;
    pointer-events: none;
}
@keyframes maintPulse {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.45); opacity: 0; }
}
