.hero-carousel {
    margin-top: 15px;
    overflow: hidden;
}

.carousel-box {
    position: relative;
    width: 100%;
    height: 220px; /* lebih pendek */
    overflow: hidden;
    padding: 0 50px; /* ini margin kiri kanan seperti Blibli */
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 220px;
}

/* slide */
.carousel-item {
    position: absolute;
    top: 0;
    left: 50%;
    width: 78%;
    height: 220px;

    border-radius: 22px;
    overflow: hidden;
    background: #f3f4f6;

    opacity: 0;
    z-index: 1;
    transform: translateX(-50%) scale(0.8);
    transition: all 0.35s ease;

    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.carousel-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* active */
.carousel-item.active {
    opacity: 1;
    z-index: 5;
    transform: translateX(-50%) scale(1);
    filter: none;
}

/* left preview */
.carousel-item.prev {
    opacity: 1;
    z-index: 3;
    transform: translateX(-145%) scale(0.85);
    filter: blur(1.2px) brightness(0.85);
}

/* right preview */
.carousel-item.next {
    opacity: 1;
    z-index: 3;
    transform: translateX(45%) scale(0.85);
    filter: blur(1.2px) brightness(0.85);
}

/* others hidden */
.carousel-item.hide {
    opacity: 0;
    z-index: 0;
    transform: translateX(-50%) scale(0.7);
}

/* prev next button (nempel slider tengah) */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    cursor: pointer;

    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.18);

    z-index: 20;
    transition: 0.2s ease;
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(255,255,255,0.98);
}

.carousel-btn.prev {
    left: 80px;
}

.carousel-btn.next {
    right: 80px;
}

/* dots indicator (pojok kanan bawah seperti blibli) */
.carousel-dots {
    position: absolute;
    bottom: 14px;
    right: 90px;
    display: flex;
    gap: 6px;
    z-index: 20;

    background: rgba(0,0,0,0.28);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 999px;
}

.carousel-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: 0.2s ease;
}

.carousel-dots span.active {
    width: 22px;
    background: #fff;
}


/* Category =================================== */
.mini-category {
    margin: 20px 0;
}

.cat-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cat-scroll {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 12px 45px;
    border-radius: 16px;
    background: #fff;
}

/* hide scrollbar */
.cat-scroll::-webkit-scrollbar {
    height: 0;
}

/* category pill */
.cat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #111827;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: 0.2s ease;
}

.cat-pill:hover {
    border-color: rgba(0, 114, 255, 0.35);
    background: rgba(0, 114, 255, 0.05);
    color: #0072FF;
}

/* icon */
.cat-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(0, 114, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cat-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* arrow button */
.cat-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 20;
    transition: 0.2s ease;
}

.cat-arrow:hover {
    transform: translateY(-50%) scale(1.08);
}

.cat-arrow.left {
    left: 0;
}

.cat-arrow.right {
    right: 0;
}

.product-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 25px;
    margin-bottom: 18px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.product-filter {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* custom select */
.custom-select {
    position: relative;
    width: 180px;
    user-select: none;
}

.custom-select .select-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 999px;

    background: #f9fafb; /* background bisa kamu ganti */
    border: 1px solid rgba(0, 0, 0, 0.08);

    font-size: 13px;
    font-weight: 600;
    color: #111827;
    cursor: pointer;

    transition: 0.2s ease;
}

.custom-select .select-head:hover {
    border-color: rgba(0, 114, 255, 0.4);
}

.custom-select.active .select-head {
    background: #fff;
    border-color: rgba(0, 114, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(0, 114, 255, 0.15);
}

.custom-select .select-head i {
    font-size: 12px;
    transition: 0.2s ease;
}

.custom-select.active .select-head i {
    transform: rotate(180deg);
}

/* dropdown list */
.custom-select .select-list {
    position: absolute;
    top: 120%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);

    list-style: none;
    padding: 6px;
    margin: 0;

    display: none;
    z-index: 999;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.custom-select.active .select-list {
    display: block;
    animation: fadeDown 0.15s ease;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select .select-list li {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

.custom-select .select-list li:hover {
    background: rgba(0, 114, 255, 0.08);
    color: #0072FF;
}

.custom-select .select-list li.active {
    background: #0072FF;
    color: #fff;
}

/* filter button */
.btn-filter {
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: #0072FF;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;

    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-filter:hover {
    background: #005ad1;
}

.btn-filter:active {
    transform: scale(0.97);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 15px;
}

.product-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: 0.25s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.product-image {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    background: #f3f4f6;
}

.product-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: 0.25s ease;
}

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

.product-body {
    padding: 14px;
}

.product-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #0072FF;
    background: rgba(0, 114, 255, 0.08);
    padding: 5px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.product-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 10px;

    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-name:hover {
    color: #0072FF;
}

.product-price {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 14px;
}

.btn-detail {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    background: #0072FF;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 14px;
    transition: 0.2s ease;
}

.btn-detail:hover {
    background: #005ad1;
}

/* Tablet ========================= */
@media(max-width:780px){
    .carousel-box,
    .carousel-item img{
        height: 200px;
    }
    .product-grid{
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile ======================= */
@media(max-width:580px){
    .product-grid{
        grid-template-columns: 1fr;
    }
    .product-card{
        margin-bottom: 1rem;
    }

    /* Slider */
    .hero-carousel {
        margin-top: 10px;
    }

    .carousel-box {
        height: 180px;
        padding: 0 15px;
    }

    .carousel-track {
        height: 180px;
    }

    .carousel-item {
        width: 92%;
        height: 180px;
        border-radius: 16px;
    }

    .carousel-item img {
        height: 180px;
    }

    /* active */
    .carousel-item.active {
        transform: translateX(-50%) scale(1);
    }

    /* left preview */
    .carousel-item.prev {
        transform: translateX(-125%) scale(0.85);
        filter: blur(1px) brightness(0.88);
    }

    /* right preview */
    .carousel-item.next {
        transform: translateX(25%) scale(0.85);
        filter: blur(1px) brightness(0.88);
    }

    /* tombol prev/next */
    .carousel-btn {
        width: 36px;
        height: 36px;
        box-shadow: 0 8px 18px rgba(0,0,0,0.15);
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    /* dots */
    .carousel-dots {
        bottom: 10px;
        right: 18px;
        gap: 5px;
        padding: 5px 8px;
    }

    .carousel-dots span {
        width: 7px;
        height: 7px;
    }

    .carousel-dots span.active {
        width: 18px;
    }
}