/* =========================================
   PRODUCT SECTION
========================================= */

.produk {
    position: relative;
    isolation: isolate;
    padding: 110px 0;
    overflow: hidden;
    background-color: #201c16;
}

/* Background foto pabrik */

.produk::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: -20px;

    /* Ganti dengan lokasi gambar background milik Anda */
    background-image: url("Asset/FotoPabrik.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    filter: blur(5px);
    transform: scale(1.04);
}

/* Overlay agar tulisan tetap terbaca */

.produk::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(23, 21, 17, 0.82) 0%,
            rgba(23, 21, 17, 0.68) 48%,
            rgba(23, 21, 17, 0.88) 100%);
}

/* Container utama */

.product-shell {
    padding: 48px;
    background: rgba(250, 248, 243, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

/* Heading */

.produk .sec-head {
    max-width: 760px;
    margin-bottom: 36px;
}

.produk .sec-head .eyebrow {
    margin-bottom: 14px;
    color: var(--sage, #66705b);
}

.produk .sec-head h2 {
    margin: 0;
    color: var(--dark, #201c16);
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.produk .sec-head p {
    max-width: 62ch;
    margin: 18px 0 0;
    color: rgba(32, 28, 22, 0.7);
    font-size: 1rem;
    line-height: 1.8;
}

/* =========================================
   CATEGORY FILTER
========================================= */

.product-filter-wrapper {
    position: relative;
    margin-bottom: 34px;
    border-bottom: 1px solid var(--line, rgba(32, 28, 22, 0.14));
}

.product-filter {
    display: flex;
    gap: 10px;
    padding-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.product-filter::-webkit-scrollbar {
    height: 4px;
}

.product-filter::-webkit-scrollbar-thumb {
    background: rgba(102, 112, 91, 0.4);
    border-radius: 20px;
}

.product-filter-btn {
    margin-top: 5px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 11px 20px;
    border: 1px solid var(--line, rgba(32, 28, 22, 0.15));
    border-radius: 100px;
    background: transparent;
    color: rgba(32, 28, 22, 0.7);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.product-filter-btn:hover {
    color: var(--dark, #201c16);
    border-color: var(--gold, #b89348);
    transform: translateY(-2px);
}

.product-filter-btn.active,
.product-filter-btn[aria-selected="true"] {
    color: #ffffff;
    background: var(--sage, #66705b);
    border-color: var(--sage, #66705b);
}

.product-filter-btn:focus-visible {
    outline: 3px solid rgba(184, 147, 72, 0.3);
    outline-offset: 3px;
}

/* =========================================
   PRODUCT GRID
========================================= */

.prod-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.prod-card {
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line, rgba(32, 28, 22, 0.12));
    box-shadow: 0 8px 24px rgba(32, 28, 22, 0.06);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;

    animation: productFadeIn 0.4s ease both;
}

.prod-card:hover {
    transform: translateY(-6px);
    border-color: rgba(184, 147, 72, 0.55);
    box-shadow: 0 22px 38px -20px rgba(32, 28, 22, 0.42);
}

.prod-card[hidden] {
    display: none !important;
}

/* Gambar produk */

.prod-img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background:
        linear-gradient(145deg,
            var(--ivory-2, #f4f0e7),
            #ffffff);
}

.prod-img img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 14px;
    object-fit: contain;

    transition:
        transform 0.45s ease,
        filter 0.45s ease;
}

.prod-card:hover .prod-img img {
    transform: scale(1.05);
}

/* Label kategori pada gambar */

.prod-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 7px 10px;
    border-radius: 100px;
    background: rgba(32, 28, 22, 0.78);
    color: #ffffff;
    font-family: "Space Mono", monospace;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
}

/* Informasi produk */

.prod-info {
    padding: 18px 18px 21px;
}

.prod-info h4 {
    margin: 0;
    color: var(--dark, #201c16);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.prod-info p {
    margin: 7px 0 0;
    color: var(--sage, #66705b);
    font-family: "Space Mono", monospace;
    font-size: 0.74rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* Animasi saat kategori dipilih */

@keyframes productFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px) {
    .prod-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .produk {
        padding: 90px 0;
    }

    .product-shell {
        padding: 38px 32px;
    }

    .prod-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .produk {
        padding: 64px 0;
    }

    .produk::before {
        filter: blur(3px);
    }

    .product-shell {
        padding: 30px 20px;
    }

    .produk .sec-head {
        margin-bottom: 28px;
    }

    .produk .sec-head p {
        font-size: 0.92rem;
        line-height: 1.7;
    }

    .product-filter-wrapper {
        margin-right: -20px;
        margin-bottom: 26px;
    }

    .product-filter {
        padding-right: 20px;
        padding-bottom: 15px;
    }

    .product-filter-btn {
        min-height: 40px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .prod-grid {
        gap: 14px;
    }

    .prod-info {
        padding: 15px 14px 17px;
    }

    .prod-info h4 {
        font-size: 0.92rem;
    }

    .prod-info p {
        font-size: 0.67rem;
    }

    .prod-img img {
        padding: 9px;
    }
}

@media (max-width: 430px) {
    .product-shell {
        padding: 28px 16px;
    }

    .product-filter-wrapper {
        margin-right: -16px;
    }

    .product-filter {
        padding-right: 16px;
    }

    .prod-grid {
        grid-template-columns: 1fr;
    }

    .prod-img {
        aspect-ratio: 16 / 10;
    }

    .prod-info h4 {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .prod-card,
    .prod-img img,
    .product-filter-btn {
        animation: none;
        transition: none;
    }
}