/* ============================================
   SUZUKI TEGAL - PUBLIC STYLES
   Mobile-first, lightweight, custom CSS
   ============================================ */

:root {
    --suzuki-red: #b71c1c;
    --suzuki-dark: #1a1a1a;
    --suzuki-gray: #6b7280;
    --suzuki-light: #f5f5f5;
    --suzuki-white: #ffffff;
    --suzuki-green: #25d366;
    --border-radius: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--suzuki-dark);
    background: var(--suzuki-white);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--suzuki-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--suzuki-red); color: #fff; }
.btn-outline { border-color: var(--suzuki-red); color: var(--suzuki-red); background: transparent; }
.btn-outline:hover { background: var(--suzuki-red); color: #fff; }
.btn-outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--suzuki-dark); }
.btn-link { padding: 6px 0; color: var(--suzuki-red); font-weight: 600; }
.btn-link::after { content: " \2192"; }
.btn-block { display: block; width: 100%; }
.btn-whatsapp-cta { background: var(--suzuki-green); color: #fff; }
.btn-whatsapp-cta:hover { background: #1eb85a; color: #fff; }

/* ---------- Header ---------- */
.site-header {
    background: var(--suzuki-dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.site-logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.site-logo:hover { text-decoration: none; }
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; background: var(--suzuki-red);
    color: #fff; font-weight: 800; font-size: 20px; border-radius: 8px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-size: 17px; letter-spacing: 1px; }
.logo-text small { font-size: 11px; color: #ccc; text-transform: uppercase; letter-spacing: 2px; }

.main-nav { display: none; }
.nav-list { list-style: none; display: flex; gap: 4px; }
.nav-list li a {
    color: #ddd; padding: 8px 12px; border-radius: 6px;
    font-size: 14px; font-weight: 500;
}
.nav-list li a:hover { color: #fff; background: rgba(255,255,255,0.1); text-decoration: none; }

.nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: #fff; border-radius: 2px; transition: 0.3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.main-nav.open {
    display: block;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--suzuki-dark);
    padding: 8px 0 16px;
    z-index: 99;
}
.main-nav.open .nav-list { flex-direction: column; gap: 0; }
.main-nav.open .nav-list li a { display: block; padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background-color: #1a1a1a;
    background-image: linear-gradient(rgba(10,10,10,0.72), rgba(10,10,10,0.72)), var(--hero-bg, none);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 60px 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero-title { font-size: 42px; font-weight: 800; margin-bottom: 16px; }
.hero-subtitle { font-size: 18px; color: #ddd; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px;}
.section-header h2 { font-size: 26px; }
section.section-promo { background: var(--suzuki-light); }
section.section-article { background: var(--suzuki-white); }

/* ---------- Grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

/* ---------- Cards ---------- */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    height: 100%;
}
.card-media img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; gap: 6px; }
.card-title { font-size: 17px; line-height: 1.35; }
.card-title a { color: var(--suzuki-dark); font-weight: 700; }
.card-title a:hover { color: var(--suzuki-red); }
.card-desc { font-size: 14px; color: var(--suzuki-gray); flex-grow: 1; }
.card-date { font-size: 12px; color: var(--suzuki-gray); text-transform: uppercase; letter-spacing: 0.5px; }
.card-price { font-size: 13px; color: var(--suzuki-gray); }
.card-price-value { font-size: 18px; font-weight: 800; color: var(--suzuki-red); }

/* ---------- Dealer card ---------- */
.dealer-card {
    background: #fff; border-radius: var(--border-radius); overflow: hidden;
    box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr; gap: 0;
}
.dealer-card-media img { width: 100%; height: 220px; object-fit: cover; }
.dealer-card-body { padding: 24px; }
.dealer-card-body h2 { font-size: 24px; margin-bottom: 10px; }
.dealer-card-body p { margin-bottom: 10px; color: var(--suzuki-gray); }
.dealer-address { font-weight: 600; color: var(--suzuki-dark) !important; }
.dealer-card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Page hero (internal pages) ---------- */
.page-hero { background: #2d2d2d; color: #fff; padding: 36px 0; }
.page-hero h1 { font-size: 30px; margin-bottom: 6px; }
.page-hero p { color: #ccc; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--suzuki-light); padding: 10px 0; font-size: 13px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #999; }
.breadcrumb a { color: var(--suzuki-gray); }
.breadcrumb span { color: var(--suzuki-dark); font-weight: 600; }

/* ---------- Product detail ---------- */
.product-detail-header h1 { font-size: 30px; margin-bottom: 16px; }
.product-detail-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
.product-gallery-main { border-radius: var(--border-radius); width: 100%; height: 340px; object-fit: cover; }
.product-gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.product-gallery-thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.price-block { background: var(--suzuki-light); border-radius: var(--border-radius); padding: 20px; margin-bottom: 16px; }
.price-label { display: block; font-size: 14px; color: var(--suzuki-gray); }
.price-value { font-size: 30px; font-weight: 800; color: var(--suzuki-red); }
.product-description, .product-specs, .product-content { margin-bottom: 24px; }
.product-description h2, .product-specs h2, .product-content h2 { font-size: 22px; margin-bottom: 12px; }

/* ---------- Price table ---------- */
.price-variants { background: var(--suzuki-light); border-radius: var(--border-radius); padding: 16px; }
.price-variants h2 { font-size: 18px; margin-bottom: 10px; }
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th, .price-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e0e0e0; }
.price-table th { font-weight: 700; }
.price-group { margin-bottom: 32px; }
.price-group h2 { font-size: 22px; margin-bottom: 10px; }
.price-note { font-size: 13px; color: #999; margin-top: 8px; }

/* ---------- Content HTML (article/promo rendered) ---------- */
.content-html { font-size: 17px; line-height: 1.8; }
.content-html h1, .content-html h2, .content-html h3, .content-html h4 { margin: 20px 0 10px; }
.content-html h2 { font-size: 26px; }
.content-html h3 { font-size: 21px; }
.content-html h4 { font-size: 18px; }
.content-html p { margin-bottom: 16px; }
.content-html ul, .content-html ol { margin: 0 0 16px 24px; }
.content-html li { margin-bottom: 6px; }
.content-html blockquote { border-left: 4px solid var(--suzuki-red); padding: 8px 16px; background: var(--suzuki-light); margin: 16px 0; }
.content-html img { border-radius: var(--border-radius); margin: 16px 0; }
.content-html table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.content-html th, .content-html td { border: 1px solid #ddd; padding: 8px 10px; font-size: 15px; }
.content-html th { background: var(--suzuki-light); }
.content-html a { color: var(--suzuki-red); text-decoration: underline; }

/* ---------- Detail page ---------- */
.detail-page .detail-header { margin-bottom: 16px; }
.detail-header h1 { font-size: 30px; margin-bottom: 8px; }
.detail-date { color: var(--suzuki-gray); font-size: 14px; }
.detail-hero-image { margin-bottom: 20px; }
.detail-hero-image img { border-radius: var(--border-radius); width: 100%; max-height: 420px; object-fit: cover; }
.detail-cta-box {
    text-align: center; padding: 32px; margin-top: 32px;
    background: var(--suzuki-light); border-radius: var(--border-radius);
}
.detail-cta-box h2 { margin-bottom: 8px; }
.detail-cta-box p { margin-bottom: 16px; color: var(--suzuki-gray); }
.related-section { margin-top: 32px; }
.related-section h2 { font-size: 22px; margin-bottom: 16px; }

/* ---------- About & Contact ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.about-grid h2 { font-size: 24px; margin-bottom: 10px; }
.about-body p { margin-bottom: 10px; color: var(--suzuki-gray); }
.about-info h3 { font-size: 16px; margin: 12px 0 4px; }
.about-sales-card, .contact-sales { display: flex; align-items: center; gap: 12px; background: var(--suzuki-light); padding: 12px; border-radius: var(--border-radius); margin: 8px 0 16px; max-width: 340px; }
.about-sales-card img, .contact-sales img { border-radius: 50%; width: 56px; height: 56px; object-fit: cover; }
.about-sales-card strong, .contact-sales strong { display: block; }
.about-sales-card span, .contact-sales span { font-size: 13px; color: var(--suzuki-gray); }
.about-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.contact-item { margin-bottom: 16px; }
.contact-item h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--suzuki-gray); margin-bottom: 4px; }
.map-embed { margin-top: 24px; border-radius: var(--border-radius); overflow: hidden; }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.page-link {
    padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px;
    color: var(--suzuki-dark); font-size: 14px;
}
.page-link:hover { background: var(--suzuki-light); text-decoration: none; }
.page-link.active { background: var(--suzuki-red); color: #fff; border-color: var(--suzuki-red); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 16px; }
.empty-state p { margin-bottom: 16px; color: var(--suzuki-gray); }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 80px 16px; }
.error-page h1 { font-size: 72px; color: var(--suzuki-red); }
.error-page h2 { font-size: 28px; margin-bottom: 12px; }
.error-page p { color: var(--suzuki-gray); margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--suzuki-dark); color: #ccc; padding: 40px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
.footer-brand p { margin-top: 12px; font-size: 14px; }
.footer-col h3 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: #ccc; font-size: 14px; }
.footer-col ul a:hover { color: #fff; }
.footer-col p { font-size: 14px; margin-bottom: 6px; }
.footer-col a { color: #ccc; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 14px 0; text-align: center; font-size: 13px; }

/* ---------- Sticky Sales ---------- */
.sticky-sales {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.98);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
}
.sticky-sales-card {
    max-width: 100%;
    display: flex; align-items: center; gap: 12px;
    background: #fff; border-radius: 12px;
}
.sticky-sales-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--suzuki-red); flex-shrink: 0; }
.sticky-sales-info { flex: 1; min-width: 0; }
.sticky-sales-name { display: block; font-size: 14px; font-weight: 700; color: var(--suzuki-dark); }
.sticky-sales-title { font-size: 12px; color: var(--suzuki-gray); }
.btn-whatsapp {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--suzuki-green); color: #fff;
    border-radius: 50px; padding: 10px 16px;
    font-size: 13px; font-weight: 700; white-space: nowrap;
    flex-shrink: 0;
}
.btn-whatsapp:hover { background: #1eb85a; color: #fff; text-decoration: none; }
.wa-icon::before { content: ""; }

/* Sticky sales adds body padding on mobile so it doesn't cover content */
body { padding-bottom: 76px; }

/* Sticky header anchors */
main { display: block; }

/* ---------- Galeri Serah Terima ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.gallery-item {
    margin: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}
.gallery-item:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.gallery-item img { display: block; width: 100%; height: 230px; object-fit: cover; }
.gallery-item figcaption { padding: 14px 16px; }
.gallery-item strong { display: block; font-size: 15px; color: var(--suzuki-dark); margin-bottom: 4px; }
.gallery-item p { margin: 0; font-size: 13px; color: var(--suzuki-gray); }
.gallery-cta {
    margin-top: 36px; text-align: center;
    background: #f4f4f4; border-radius: 12px; padding: 32px 20px;
}
.gallery-cta h2 { margin-bottom: 6px; font-size: 24px; }
.gallery-cta p { margin: 0 0 16px; color: var(--suzuki-gray); }
.empty-state { text-align: center; color: var(--suzuki-gray); padding: 40px 0; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.88);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 20px;
}
.lightbox img { max-width: 92vw; max-height: 78vh; border-radius: 8px; }
.lightbox-caption { color: #fff; margin-top: 12px; font-size: 14px; text-align: center; }
.lightbox-close {
    position: absolute; top: 16px; right: 20px;
    background: none; border: none; color: #fff;
    font-size: 40px; line-height: 1; cursor: pointer;
}

/* ---------- Tablet (768+) ---------- */
@media (min-width: 768px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .main-nav { display: block; }
    .nav-toggle { display: none; }
    body { padding-bottom: 0; }
    .sticky-sales { padding-bottom: 12px; }
    .dealer-card { grid-template-columns: 5fr 7fr; }
    .dealer-card-media img { height: 100%; }
    .product-detail-grid { grid-template-columns: 3fr 2fr; }
    .about-grid { grid-template-columns: 5fr 7fr; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding: 90px 0; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Desktop (1024+) ---------- */
@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
    .hero-title { font-size: 52px; }

    /* Desktop sticky sales - right bottom card */
    .sticky-sales {
        left: auto; right: 20px;
        top: auto; bottom: 20px;
        width: 300px;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    .sticky-sales-card {
        background: #fff;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        border: 1px solid #e8e8e8;
        padding: 14px;
        flex-direction: column;
        text-align: center;
        border-radius: 12px;
    }
    .sticky-sales-photo { width: 64px; height: 64px; }
    .sticky-sales-name { font-size: 16px; }
    .btn-whatsapp { width: 100%; margin-top: 8px; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Focus states / accessibility ---------- */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(183,28,28,0.4);
    outline-offset: 1px;
}
.btn-whatsapp:focus { outline: 3px solid rgba(37,211,102,0.5); }

/* Hide horizontal overflow */
html, body { overflow-x: hidden; }