:root {
    --primary: #0f2942;
    --primary-light: #1a3d5c;
    --accent: #0d9488;
    --accent-dark: #0f766e;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(15, 41, 66, 0.06);
    --shadow-lg: 0 10px 25px rgba(15, 41, 66, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

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

/* Topbar */
.topbar {
    background: var(--primary);
    color: #e2e8f0;
    font-size: 13px;
    padding: 7px 0;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.topbar-info { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar-info a { color: #f8fafc; font-weight: 500; }
.topbar-info a:hover { color: #5eead4; }
.topbar-addr { color: #cbd5e1; font-size: 12.5px; }
.wa-pill {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.wa-pill:hover { background: #15803d; color: #fff; }

/* Header & Navigation */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}
.brand-logo { max-height: 54px; width: auto; }
.brand-text { font-size: 20px; font-weight: 700; color: var(--primary); }

.header-search {
    display: flex;
    flex: 1 1 240px;
    max-width: 340px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
}
.header-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}
.header-search button {
    border: 0;
    background: var(--primary);
    color: #fff;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.header-search button:hover { background: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 10px;
    cursor: pointer;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--primary);
    display: block;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-item { position: relative; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--primary);
    border-radius: 6px;
    white-space: nowrap;
}
.nav-link:hover { background: var(--bg); color: var(--accent); }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 200;
}
.nav-item.has-dropdown:hover > .dropdown-menu,
.nav-item.has-dropdown:focus-within > .dropdown-menu {
    display: block;
}
.dropdown-menu a {
    display: block;
    padding: 9px 16px;
    font-size: 13.5px;
    color: var(--text);
}
.dropdown-menu a:hover { background: var(--bg); color: var(--accent); }

/* Hero Slider */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: var(--primary);
    color: #fff;
}
.hero-slide {
    display: none;
    position: relative;
    min-height: 360px;
    align-items: center;
    background-size: cover;
    background-position: center;
}
.hero-slide.active { display: flex; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15,41,66,0.88) 0%, rgba(15,41,66,0.55) 60%, rgba(15,41,66,0.25) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 56px 16px;
    max-width: 680px;
}
.hero-content h1, .hero-content h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.2;
    color: #fff;
}
.hero-content p { margin: 0 0 20px; color: #e2e8f0; font-size: 16px; }
.hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 0;
}
.hero-dot.active { background: #fff; width: 24px; border-radius: 999px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-whatsapp { background: #16a34a; color: #fff; }
.btn-whatsapp:hover { background: #15803d; color: #fff; }

/* Sections & Page Banner */
.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.section-title { margin: 0; font-size: clamp(20px, 3vw, 28px); color: var(--primary); }
.section-sub { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 34px 0;
}
.page-banner h1 { margin: 0 0 6px; font-size: clamp(22px, 3.2vw, 32px); }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #cbd5e1;
    flex-wrap: wrap;
}
.breadcrumb a { color: #f8fafc; }
.breadcrumb a:hover { color: #5eead4; }

/* Grids */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow);
    font-weight: 600;
    color: var(--primary);
    transition: transform 0.15s, border-color 0.15s;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-thumb {
    aspect-ratio: 1 / 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.product-thumb img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.product-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.product-code {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}
.product-title {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .btn { margin-top: auto; width: 100%; padding: 8px 12px; font-size: 13px; }

/* Layout with Sidebar */
.layout-sidebar {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 28px;
    align-items: start;
}
.sidebar-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.sidebar-box h3 { margin: 0 0 12px; font-size: 16px; color: var(--primary); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.sidebar-links { list-style: none; margin: 0; padding: 0; }
.sidebar-links li + li { border-top: 1px solid var(--bg); }
.sidebar-links a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
}
.sidebar-links a:hover, .sidebar-links a.active {
    background: var(--primary);
    color: #fff;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.gallery-main {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #fff;
}
.gallery-main img { max-height: 100%; max-width: 100%; object-fit: contain; }
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.gallery-thumb {
    width: 68px;
    height: 68px;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    background: #fff;
    cursor: pointer;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

.detail-info h2 { margin: 0 0 12px; font-size: 24px; color: var(--primary); }
.detail-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    border-top: 1px solid var(--border);
}
.detail-meta li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    font-size: 14px;
}
.detail-meta span { color: var(--muted); min-width: 110px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.detail-desc { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
}
.pagination span.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Forms & Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.form-grid { display: grid; gap: 14px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 13.5px; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.form-control:focus { outline: 2px solid var(--accent); border-color: transparent; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* News & Bank */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.news-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.news-card img { width: 100%; height: 190px; object-fit: cover; }
.news-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.news-date { font-size: 12px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--primary); color: #cbd5e1; padding-top: 48px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer-logo { max-height: 56px; margin-bottom: 14px; }
.footer-title { color: #fff; margin: 0 0 14px; font-size: 16px; }
.footer-contact, .footer-links { list-style: none; padding: 0; margin: 0; }
.footer-contact li, .footer-links li { margin-bottom: 8px; font-size: 14px; }
.footer-links a, .footer-contact a { color: #cbd5e1; }
.footer-links a:hover, .footer-contact a:hover { color: #5eead4; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; font-size: 13px; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: #e2e8f0; }

.wa-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: #16a34a;
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 90;
}
.wa-float:hover { background: #15803d; color: #fff; }

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .hide-md { display: none; }
    .layout-sidebar { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        width: 100%;
        border-top: 1px solid var(--border);
        padding-top: 10px;
    }
    .main-nav.open { display: block; }
    .nav-list { flex-direction: column; align-items: stretch; }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: 0;
        background: var(--bg);
        padding-left: 14px;
    }
    .nav-item.has-dropdown.open > .dropdown-menu { display: block; }
}

@media (max-width: 640px) {
    .hide-sm { display: none; }
    .header-search { order: 3; max-width: 100%; flex-basis: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
