
/* Tema e-commerce blue */

:root {
    --bg: #eaf3ff;
    --putih: #ffffff;
    --teks: #172554;
    --abu: #64748b;
    --abu-muda: #eff6ff;
    --garis: #bfdbfe;
    --aksen: #2563eb;
    --aksen-muda: #dbeafe;
    --radius: 12px;
    --bayangan: 0 2px 8px rgba(30, 64, 175, 0.06);
    --bayangan-hover: 0 10px 28px rgba(30, 64, 175, 0.14);
}

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

[hidden] {
    display: none !important;
}

body {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(96, 165, 250, 0.35), transparent 35%),
        radial-gradient(circle at 90% 25%, rgba(59, 130, 246, 0.2), transparent 30%),
        radial-gradient(circle at 50% 90%, rgba(147, 197, 253, 0.3), transparent 40%),
        linear-gradient(135deg, #dbeafe, #eff6ff 45%, #bfdbfe);
    background-attachment: fixed;
    color: var(--teks);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--aksen);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header stays visible while scrolling */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Navbar */

.navbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-height: 64px;
    padding: 0 24px;
    background: rgba(219, 234, 254, 0.85);
    border-bottom: 1px solid rgba(147, 197, 253, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.logo-web {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
}

.logo-web .logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-web .text {
    color: #1e3a8a;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.logo-web strong {
    font-weight: 700;
}

.pencarian-produk {
    position: relative;
    flex: 0 1 360px;
    width: min(360px, 42vw);
    margin-left: auto;
}

.pencarian-produk input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 42px;
    border: 1px solid rgba(147, 197, 253, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--teks);
    font-family: inherit;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.06);
}

.pencarian-produk input::placeholder {
    color: #94a3b8;
}

.ikon-pencarian {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: #64748b;
    pointer-events: none;
}

/* Kategori */

.kategori-container {
    position: relative;
    width: 100%;
    background: rgba(219, 234, 254, 0.75);
    border-bottom: 1px solid rgba(147, 197, 253, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.kategori-list,
.subkategori-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    padding: 0 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
    -webkit-overflow-scrolling: touch;
}

.kategori-list::-webkit-scrollbar,
.subkategori-list::-webkit-scrollbar {
    height: 4px;
}

.kategori-list::-webkit-scrollbar-thumb,
.subkategori-list::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.35);
    border-radius: 999px;
}

.kategori-item,
.subkategori-item {
    flex: 0 0 auto;
    padding: 14px 14px 12px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.kategori-item:hover,
.subkategori-item:hover {
    background: transparent;
    color: #1d4ed8;
}

.kategori-item.active,
.subkategori-item.active {
    background: transparent;
    color: #1d4ed8;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.subkategori-list {
    background: rgba(191, 219, 254, 0.65);
    border-top: 1px solid rgba(147, 197, 253, 0.4);
}

.subkategori-list[hidden] {
    display: none;
}

.subkategori-item {
    padding: 10px 12px 9px;
    font-size: 13px;
}

/* Produk */

.produk-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 40px;
}

.produk-card {
    min-width: 0;
    overflow: hidden;
    background: var(--putih);
    border: 1px solid rgba(191, 219, 254, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--bayangan);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.produk-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bayangan-hover);
}

.produk-card a {
    display: block;
    color: inherit;
}

.produk-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #eff6ff;
    transition: transform 0.35s ease;
}

.produk-card:hover img {
    transform: scale(1.04);
}

.produk-card h3 {
    display: -webkit-box;
    min-height: 3em;
    margin: 12px 14px 6px;
    overflow: hidden;
    color: var(--teks);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.produk-card p {
    padding: 0 14px 16px;
    color: #2563eb;
    font-size: 16px;
    font-weight: 700;
}

.produk-kosong {
    grid-column: 1 / -1;
    padding: 56px 20px;
    color: var(--abu);
    font-size: 15px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
}

/* Responsive */

@media (max-width: 900px) {
    .produk-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .navbar {
        min-height: 58px;
        padding: 0 16px;
    }

    .logo-web .logo {
        width: 32px;
        height: 32px;
    }

    .logo-web .text {
        font-size: 16px;
    }

    .pencarian-produk {
        flex-basis: min(300px, 48vw);
        width: min(300px, 48vw);
    }

    .kategori-list,
    .subkategori-list {
        padding: 0 12px;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 8px 12px;
    }

    .logo-web {
        gap: 7px;
    }

    .logo-web .text {
        max-width: 38vw;
        overflow: hidden;
        font-size: 15px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pencarian-produk {
        flex: 0 1 240px;
        width: min(240px, 52vw);
    }

    .pencarian-produk input {
        height: 38px;
        padding-left: 38px;
        font-size: 13px;
    }

    .produk-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 16px 12px 28px;
    }

    .produk-card {
        border-radius: 10px;
    }

    .produk-card h3 {
        margin: 10px 10px 4px;
        font-size: 13px;
    }

    .produk-card p {
        padding: 0 10px 12px;
        font-size: 14px;
    }

    .kategori-item,
    .subkategori-item {
        padding: 13px 11px 11px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .navbar {
        gap: 6px;
        padding: 8px;
    }

    .logo-web .text {
        max-width: 34vw;
        font-size: 14px;
    }

    .pencarian-produk {
        flex-basis: 145px;
        width: 48vw;
    }

    .produk-container {
        gap: 8px;
        padding: 12px 8px 24px;
    }
}
