/**
 * Tema storefront mengacu Shopwise (Bootstrap 5) — produk digital.
 * https://bestwebcreator.com/shopwise/demo/index-4.html
 */
:root {
    --shop-primary: #ff324d;
    --shop-dark: #1b1b28;
    --shop-text: #292b2c;
    /* Sesuai tinggi navbar Bootstrap (≈56px); jika lebih besar dari ini muncul strip kosong di bawah topbar */
    --shop-navbar-h: 56px;
}

body.shopwise-store {
    font-family: 'Poppins', 'Roboto', sans-serif;
    color: var(--shop-text);
    padding-top: var(--shop-navbar-h);
    background-color: #fff;
}

/* Kompatibilitas partial galeri (class .hidden tanpa Tailwind di storefront) */
.shopwise-store .hidden {
    display: none !important;
}

/* Navbar */
.shopwise-store .navbar-shopwise {
    background: #fff !important;
    border-bottom: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    min-height: var(--shop-navbar-h);
    align-items: center;
}
.shopwise-store .navbar-shopwise .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: #333 !important;
    padding: 0.5rem 0.85rem !important;
}
.shopwise-store .navbar-shopwise .nav-link:hover,
.shopwise-store .navbar-shopwise .nav-link.active {
    color: var(--shop-primary) !important;
}
.shopwise-store .cart-count-badge-sw {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1rem;
    color: #fff;
    background: var(--shop-primary);
    border-radius: 50px;
}

/* Banner / carousel — default (bukan hero beranda) */
.banner_section_sw:not(.hero-tall) .carousel-item {
    min-height: 420px;
    background-size: cover;
    background-position: center;
}

/* Beranda: rapat ke topbar (hilangkan strip kosong dari padding body > tinggi navbar) */
.shopwise-store main {
    margin-top: 0;
    padding-top: 0;
}

/* Beranda: slider lebih tinggi — !important agar menang atas Bootstrap CDN & cache */
.banner_section_sw.hero-tall {
    margin-top: 0;
    min-height: clamp(40.5rem, 81vh, 62rem) !important;
}
.banner_section_sw.hero-tall #heroCarousel,
.banner_section_sw.hero-tall .carousel-inner {
    min-height: clamp(40.5rem, 81vh, 62rem) !important;
    height: auto;
}
.banner_section_sw.hero-tall .carousel-item {
    min-height: clamp(40.5rem, 81vh, 62rem) !important;
    position: relative;
    background-size: cover !important;
    /* Atas gambar sejajar tepi atas area slide (tepat di bawah topbar); tinggi slide tidak diubah */
    background-position: center top !important;
}

/* Pencarian mengambang — dinaikkan agar kartu kategori bisa overlap -3rem seperti semula */
.banner_section_sw.hero-tall .hero-search-floating {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(5.75rem, 13vw, 9rem);
    z-index: 15;
    padding: 0 0.75rem 0;
    pointer-events: none;
}
@media (min-width: 768px) {
    .banner_section_sw.hero-tall .hero-search-floating {
        padding: 0 1rem 0;
    }
}
.banner_section_sw.hero-tall .hero-search-floating .container {
    pointer-events: auto;
}
.banner_section_sw.hero-tall .hero-search-floating .hero-search-form .form-control {
    border-radius: 5px 0 0 5px;
    border-color: #dee2e6;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.banner_section_sw.hero-tall .hero-search-floating .hero-search-form .btn-primary {
    border-radius: 0 5px 5px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.banner_section_sw.hero-tall .hero-search-floating .hero-search-hint {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.hero-search-dropdown {
    top: calc(100% + 0.35rem);
    max-height: 20rem;
    overflow-y: auto;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}
.hero-search-dropdown .list-group-item {
    cursor: pointer;
    border-left: 0;
    border-right: 0;
}
.hero-search-dropdown .list-group-item:first-child {
    border-top: 0;
}
.hero-search-dropdown .list-group-item:hover,
.hero-search-dropdown .list-group-item:focus {
    background: #fff5f6;
}
.hero-search-dropdown .search-item-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.35rem;
    flex-shrink: 0;
}

.banner_section_sw .carousel-caption-sw {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    padding: 2rem;
}
.banner_section_sw .banner_content_inner h5.bg_strip {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255,255,255,.2);
    border-radius: 4px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}
.banner_section_sw .banner_content_inner h2 {
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}
.banner_section_sw .btn-white {
    background: #fff;
    color: #333;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    border: none;
}
.banner_section_sw .btn-white:hover {
    background: var(--shop-primary);
    color: #fff;
}

/* Kategori overlap box */
.cat_overlap_sw {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,.08);
    padding: 1.5rem;
    margin-top: -3rem;
    position: relative;
    z-index: 2;
}
/* Beranda: overlap lebih dalam (+1.5rem dari -3rem) */
.cat_overlap_sw.cat_overlap_home {
    margin-top: -4.5rem;
}
.categories_box_sw a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: border-color .2s, color .2s;
}
.categories_box_sw a:hover {
    border-color: var(--shop-primary);
    color: var(--shop-primary);
}
.categories_box_sw .cat-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Heading section */
.heading_s4_sw h2,
.heading_s1_sw h2 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Product box (Shopwise) */
.product_box_sw {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .25s;
    height: 100%;
}
.product_box_sw:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.1);
}
.product_box_sw .product_img_sw {
    position: relative;
    background: #f7f7f7;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.product_box_sw .product_img_sw img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product_box_sw .product_info_sw {
    padding: 1rem;
}
.product_box_sw .product_title_sw {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.product_box_sw .product_title_sw a {
    color: #333;
    text-decoration: none;
}
.product_box_sw .product_title_sw a:hover {
    color: var(--shop-primary);
}
.product_box_sw .product_price_sw .price {
    font-weight: 700;
    color: var(--shop-primary);
    font-size: 1.05rem;
}
.product_box_sw .product_price_sw del {
    color: #999;
    font-size: 0.85rem;
    margin-left: 0.35rem;
}
.product_box_sw .pr_desc_sw {
    font-size: 0.8rem;
    color: #666;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product_box_sw .badge-cat-sw {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border-radius: 4px;
}

/* Buttons */
.btn-fill-out-sw {
    border: 2px solid var(--shop-primary);
    color: var(--shop-primary);
    background: transparent;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 0.45rem 1rem;
}
.btn-fill-out-sw:hover {
    background: var(--shop-primary);
    color: #fff;
}
.btn-fill-line-sw {
    border: 2px solid #333;
    color: #333;
    background: transparent;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 4px;
    padding: 0.35rem 0.9rem;
}
.btn-fill-line-sw:hover {
    background: #333;
    color: #fff;
}

/* Section spacing */
.section_sw {
    padding: 3rem 0;
}
.section_sw.small_pt {
    padding-top: 1.5rem;
}

/* Promo banner strip */
.banner_deal_sw {
    min-height: 280px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}
.banner_deal_sw .inner {
    background: rgba(255,255,255,.92);
    padding: 2rem;
    border-radius: 8px;
    max-width: 420px;
}

/* Footer dark */
.footer_dark_sw {
    background: var(--shop-dark);
    color: #c6c6c6;
    font-size: 0.875rem;
}
.footer_dark_sw .footer_top_sw {
    padding: 3rem 0 2rem;
}
.footer_dark_sw h6.widget_title_sw {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.footer_dark_sw a {
    color: #c6c6c6;
    text-decoration: none;
}
.footer_dark_sw a:hover {
    color: var(--shop-primary);
}
.footer_dark_sw .bottom_footer_sw {
    background: #12121a;
    padding: 1rem 0;
    font-size: 0.8rem;
}
.footer_dark_sw .border_bottom_tran {
    border-bottom: 1px solid rgba(255,255,255,.1);
}

/* Breadcrumb */
.breadcrumb_sw {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    padding: 0.65rem 0;
    font-size: 0.8rem;
}

/* Utilities */
.text_shop_primary {
    color: var(--shop-primary) !important;
}
.bg_shop_light {
    background: #f8f8f8;
}

/* Halaman produk: judul + tag satu baris (tag rata kanan, pola seperti kategori | counter) */
.shopwise-store .product-detail-title-row {
    flex-wrap: nowrap;
}
.shopwise-store .product-detail-title-row .product-detail-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 45%;
}
@media (max-width: 575.98px) {
    .shopwise-store .product-detail-title-row {
        flex-wrap: wrap;
    }
    .shopwise-store .product-detail-title-row .product-detail-tags {
        max-width: 100%;
        justify-content: flex-end !important;
    }
}
