/* ==========================================================
   VANILLA CSS UTAMA FASTBIKE INDONESIA (PHP NATIVE)
   ========================================================== */

:root {
    /* DEFAULT DARK MODE (Elegan & Nyaman) */
    --bg-dark: #0b0b0f;
    --bg-card: #14141b;
    --bg-card-hover: #1c1c26;
    --border-color: #262633;
    --primary: #990000;
    --primary-hover: #cc0000;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
    
    --header-bg: rgba(11, 11, 15, 0.85);
    --header-border: rgba(255, 255, 255, 0.08);
    --footer-bg: #07070a;
    --input-bg: #14141b;
    --input-border: #262633;
    --input-text: #ffffff;
    --table-th-bg: rgba(255, 255, 255, 0.03);
    --sidebar-bg: #14141b;
    --sidebar-link-active: rgba(153, 0, 0, 0.2);
    --sidebar-link-text: #ffffff;
    --modal-bg: #14141b;
    --card-shadow: 0 10px 25px rgba(0,0,0,0.5);
    --hero-overlay: linear-gradient(to right, rgba(11, 11, 15, 0.95) 0%, rgba(11, 11, 15, 0.7) 50%, rgba(11, 11, 15, 0.3) 100%);
    --hero-text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    --product-img-bg: #1a1a24;
}

[data-theme="light"] {
    /* LIGHT MODE (Bersih, Modern, Profesional) */
    --bg-dark: #f4f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --border-color: #e2e8f0;
    --primary: #990000;
    --primary-hover: #cc0000;
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-border: rgba(0, 0, 0, 0.08);
    --footer-bg: #e2e8f0;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --input-text: #0f172a;
    --table-th-bg: rgba(0, 0, 0, 0.03);
    --sidebar-bg: #ffffff;
    --sidebar-link-active: rgba(153, 0, 0, 0.12);
    --sidebar-link-text: #0f172a;
    --modal-bg: #ffffff;
    --card-shadow: 0 10px 25px rgba(0,0,0,0.06);
    --hero-overlay: linear-gradient(to right, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0.3) 100%);
    --hero-text-shadow: none;
    --product-img-bg: #e2e8f0;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

/* --- UTILITIES --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(153, 0, 0, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.6);
    color: #fff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: transparent;
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-danger:hover { background-color: #bd2130; }

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(90deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1rem;
}

/* --- HEADER & NAVBAR --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5.5rem;
    gap: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.navbar-brand img {
    height: 2.25rem;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.navbar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.5rem;
}

.btn-navbar {
    border-radius: 2rem !important;
    padding: 0.6rem 1.25rem !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(15deg);
}
[data-theme="light"] .icon-sun { display: none !important; }
[data-theme="light"] .icon-moon { display: inline-block !important; }
:root:not([data-theme="light"]) .icon-moon { display: none !important; }
:root:not([data-theme="light"]) .icon-sun { display: inline-block !important; }

/* --- HERO BANNER --- */
.hero-section {
    position: relative;
    padding: 6rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: var(--hero-text-shadow);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

/* --- CATEGORIES GRID --- */
.categories-section {
    padding: 5rem 0;
    background-color: var(--bg-dark);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: var(--card-shadow);
}

.category-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(153, 0, 0, 0.15);
    color: var(--primary);
    border-radius: 1rem;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.category-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- PRODUCTS GRID --- */
.products-section {
    padding: 5rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--card-shadow);
}

.product-img-wrapper {
    position: relative;
    padding-top: 65%;
    overflow: hidden;
    background: var(--product-img-bg);
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.08);
}

.product-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.product-specs-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    margin-bottom: 1.5rem;
    text-align: center;
}

.spec-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.spec-item strong {
    font-size: 0.9rem;
    font-weight: 700;
}

/* --- PRODUCT DETAIL --- */
.product-detail-section {
    padding: 4rem 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.gallery-main {
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    background: var(--bg-card);
}

.gallery-thumbs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
}

.gallery-thumb-item {
    width: 100px;
    height: 70px;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}
.gallery-thumb-item:hover, .gallery-thumb-item.active {
    border-color: var(--primary);
}
.gallery-thumb-item img { width: 100%; height: 100%; object-fit: cover; }

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

.specs-table td {
    padding: 1rem 0;
    font-size: 0.95rem;
}

.specs-table td:first-child {
    color: var(--text-muted);
    width: 40%;
    font-weight: 600;
}

.specs-table td:last-child {
    font-weight: 700;
    text-align: right;
}

/* --- CONTACT FORM --- */
.contact-section { padding: 5rem 0; }
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-muted); }
.form-control { width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 0.75rem; padding: 0.85rem 1.25rem; color: var(--input-text); font-family: var(--font-sans); font-size: 0.95rem; transition: border 0.3s; }
.form-control:focus { outline: none; border-color: var(--primary); background: var(--bg-card); }
textarea.form-control { min-height: 150px; resize: vertical; }

/* --- FOOTER --- */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem 0;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--text-main); }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- FLOATING WHATSAPP --- */
.floating-wa {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: #fff;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
    z-index: 99;
    transition: all 0.3s ease;
}
.floating-wa:hover {
    transform: scale(1.1);
    background-color: #20ba5c;
    color: #fff;
}

/* --- ADMIN PANEL LAYOUT --- */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg-dark); }
.admin-sidebar { width: 260px; background: var(--sidebar-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 2rem 1.5rem; flex-shrink: 0; }
.admin-main { flex-grow: 1; padding: 3rem; overflow-y: auto; }
.sidebar-menu { list-style: none; margin-top: 2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.25rem; border-radius: 0.75rem; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: all 0.3s; }
.sidebar-link:hover, .sidebar-link.active { background: var(--sidebar-link-active); color: var(--sidebar-link-text); }
.sidebar-link.danger:hover { background: rgba(220, 53, 69, 0.2); color: #dc3545; }

/* Admin Tables */
.admin-table-wrapper { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1.25rem; overflow: hidden; margin-top: 2rem; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { background: var(--table-th-bg); padding: 1.25rem 1.5rem; font-weight: 700; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--border-color); }
.admin-table td { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; vertical-align: middle; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 991px) {
    .product-detail-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .navbar-toggle { display: block; }
    .hero-title { font-size: 2.5rem; }
    .hero-section { padding: 4rem 0; min-height: 60vh; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); padding: 1.5rem; }
    .admin-main { padding: 1.5rem; }
}
