/* Safe Area Support untuk Capacitor Mobile Apps */
@supports (padding: max(0px)) {
    body {
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

.hidden {
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.img-featured {
    height: 212;
    width: 200px;
    overflow: hidden;
}

.img-deals {
    height: 350px;
    width: 380px;
}

.img-selected-category {
    height: 200px;
    width: 212px;
}

#wa-floating-btn {
    position: fixed;
    bottom: 3px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

#wa-floating-btn img {
    width: 35px;
    height: 35px;
}

#wa-floating-btn:hover {
    transform: scale(1.1);
}

/* tampilan cart shopee style */
.cart-item-mobile {
    background: #fff;
}

.cart-item-mobile input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.cart-mobile .btn-light {
    border: 1px solid #ddd;
}

.cart-checkout-mobile {
    z-index: 1030;
}

div.text-sm.d-md-flex.justify-content-md-center.align-items-md-center {
    font-size: small;
}

.floating-cart {
    display: none;
}

.floating-home {
    display: none;
}

.hero-main {
    background-image: url("/static/assets/img/1920X422/img1.jpg");
    background-size: cover;
    background-position: center;
}

@media (max-width: 767.98px) {
    .hero-main {
        background-image: url("/static/assets/img/768x600/img-mobile.webp");
        background-size: cover;
        background-position: center;
        min-height: 360px;
    }

    .hero-main .row {
        flex-direction: column;
    }

    .hero-main img {
        max-width: 80%;
        margin: 0 auto;
    }

    .badge {
        font-size: 90%;
        padding: 6px 10px;
    }

    .floating-cart {
        display: flex;
        position: fixed;
        left: 13px;
        bottom: 85px;
        z-index: 1000;
        background: #fff;
        padding: 12px 14px;
        border-radius: 999px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        align-items: center;
        gap: 10px;
    }

    .floating-home {
        display: flex;
        position: fixed;
        left: 13px;
        bottom: 24px;
        /* DI BAWAH CART */
        z-index: 1000;
        background: #fff;
        padding: 12px 14px;
        border-radius: 999px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        align-items: center;
        gap: 8px;
    }

    .floating-cart .cart-badge {
        width: 22px;
        height: 22px;
        background: #000;
        color: #fff;
        border-radius: 50%;
        font-size: 12px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.custom-font-detail {
    font-size: 12px;
    font-weight: bolder;
}

.rating-wrapper {
    background: #f0eacc;
    border-color: orange;
    border-width: 2px;
}

#currency {
    font-weight: 700;
    color: orange;
    font-size: small;
}

.text-2xs {
    font-size: 11px;
}

#nominal {
    font-weight: 700;
    color: orange;
    font-size: medium;
}

.price-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.price-current {
    font-size: 16px;
    font-weight: 600;
}

.price-old {
    font-size: 12px;
    color: #9ca3af;
}

.discount-badge {
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    /* red-600 */
    background: #fee2e2;
    /* red-100 */
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.btn-blue {
    color: 0066fe;
}

.hide-component {
    display: none !important;
}

.product-item__title {
    max-width: 100%;
}

#sidebarNavCustom .dropdown-item,
#sidebarNavCustom .dropdown-toggle {
    white-space: normal;
    /* boleh multiline */
    word-break: break-word;
    /* pecah kata panjang */
    line-height: 1.4;
}

#sidebarNavCustom .dropdown-list {
    padding-left: 16px;
}

#sidebarNavCustom .dropdown-item {
    padding-left: 12px;
}

.table-xs {
    font-size: 0.75rem;
}

.order-table th,
.order-table td {
    vertical-align: middle;
}

/* Kolom spesifik */
.col-order {
    white-space: nowrap;
    min-width: 160px;
}

.col-date {
    white-space: nowrap;
    min-width: 90px;
}

.col-status {
    white-space: nowrap;
    min-width: 170px;
}

.col-total {
    white-space: nowrap;
    min-width: 110px;
}

/* Badge status */
.order-table .badge {
    font-size: 0.7rem;
    padding: 0.35em 0.6em;
}

/* Sticky only on large screens (desktop) */
@media (min-width: 992px) {
    .sticky-lg-top {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

}

/* Custom Badge controlled by our JS */
.custom-cart-badge {
    position: absolute;
    top: 0px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-color: #000 !important;
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 100;
    line-height: 1;
}

/* Position adjustment for specific parents if needed */
.header .custom-cart-badge {
    top: -5px;
    right: -8px;
}

.floating-cart .custom-cart-badge {
    top: -5px;
    right: -5px;
    background-color: #000;
}

/* Bottom Sheet for Mobile */
@media (max-width: 767.98px) {
    .modal-bottom-sheet .modal-dialog {
        position: fixed;
        bottom: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: flex-end;
    }

    .modal-bottom-sheet .modal-content {
        border-radius: 20px 20px 0 0;
        border: none;
        width: 100%;
    }

    .modal-bottom-sheet.fade .modal-dialog {
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    .modal-bottom-sheet.show .modal-dialog {
        transform: translateY(0);
    }
}

.shipping-item:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.shipping-item.active {
    background-color: #e9ecef;
    border-left: 4px solid #333e48;
}

/* Shopee Header */
* {
    box-sizing: border-box;
}

.shopee-header {
    background: linear-gradient(180deg, #ee4d2d 0%, #ff7337 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 999;
}

.logo-text {
    font-weight: bold;
    font-size: 22px;
    color: #fff;
    text-decoration: none;
}

.shopee-search {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.shopee-search input {
    height: 45px;
    font-size: 14px;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #fff;
    color: #ee4d2d;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trending-links a {
    color: #fff;
    font-size: 13px;
    margin-right: 15px;
    text-decoration: none;
}

.trending-links a:hover {
    text-decoration: underline;
}

.hero-slider img {
    height: 320px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .hero-slider img {
        height: 200px;
    }
}

/* Hero Section */

.hero-section {
    background: #f5f5f5;
}

.image-carousel {
    position: relative;
    background: #fff;
    overflow: visible;
}

.image-carousel__item-list-wrapper {
    overflow: hidden;
}

.image-carousel__item-list {
    display: flex;
    transition: transform 0.4s ease;
}

.carousel-page {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: repeat(10, 10%);
}

.image-carousel__item {
    list-style: none;
    box-sizing: border-box;
    border-right: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    width: 100%;
    height: 170px;
    transition: all 0.2s ease;
}

.home-category-grid {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #555;
}

.category-box {
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.category-img {
    width: 84px;
    height: 84px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-img img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.category-text {
    font-size: 12px;
    margin-top: 8px;
    text-align: center;
}

.image-carousel__item:hover {
    z-index: 10;
}

.image-carousel__item:hover .category-box {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.image-carousel__item:hover .category-text {
    color: #ee4d2d;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    z-index: 50;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
}

.carousel-arrow--prev {
    left: -16px;
}

.carousel-arrow--next {
    right: -16px;
}

@media (max-width: 768px) {
    .carousel-arrow--prev {
        left: -4px;
    }

    .carousel-arrow--next {
        right: -4px;
    }
}


@media (max-width: 768px) {
    .carousel-page {
        grid-template-columns: repeat(5, 20%);
    }

    .image-carousel__item {
        height: 120px;
    }

    .category-img {
        width: 50px;
        height: 50px;
    }

    .category-text {
        font-size: 10px;
    }
}


/* Center wrapper */
.col-wd-auto.max-width-1130 {
    max-width: 1130px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* Center nav wrapper */
#pills-tab {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Nav item spacing */
#pills-tab .nav-item {
    margin: 4px 6px;
}

/* Nav link style refinement */
#pills-tab .nav-link {
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 500;
    white-space: nowrap;
}

/* Active tab look more centered visually */
#pills-tab .nav-link.active {
    font-weight: 600;
}

/* Make tab content centered */
.tab-content {
    width: 100%;
}

/* ========================= */
/* Responsive Adjustments */
/* ========================= */

@media (max-width: 768px) {

    .col-wd-auto.max-width-1130 {
        padding-left: 12px;
        padding-right: 12px;
    }

    #pills-tab {
        justify-content: center;
        flex-wrap: wrap;
    }

    #pills-tab .nav-link {
        font-size: 13px;
        padding: 6px 14px;
    }
}

@media (max-width: 480px) {

    #pills-tab {
        gap: 6px;
    }

    #pills-tab .nav-link {
        font-size: 12px;
        padding: 6px 12px;
    }
}

body {
    padding-top: 0 !important;
}

body>*:first-child {
    margin-top: 0 !important;
}

/* ===================================================
   HERO SLIDER (Universal)
   =================================================== */
.hero-slider-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero-slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.hero-slider-slide {
    flex: 0 0 100%;
    width: 100%;
}

.hero-slider-slide img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .hero-slider-slide img {
        height: 380px;
    }
}

@media (min-width: 1200px) {
    .hero-slider-slide img {
        height: 420px;
    }
}

/* Tombol panah */
.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    transition: all 0.3s ease;
    opacity: 0;
}

.hero-slider-wrap:hover .hero-slider-arrow {
    opacity: 1;
}

.hero-slider-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.hero-slider-arrow--prev {
    left: 20px;
}

.hero-slider-arrow--next {
    right: 20px;
}

@media (max-width: 767.98px) {
    .hero-slider-arrow {
        width: 32px;
        height: 32px;
        opacity: 1;
        /* Always show on mobile */
    }

    .hero-slider-arrow--prev {
        left: 10px;
    }

    .hero-slider-arrow--next {
        right: 10px;
    }
}

/* Dots */
.hero-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.hero-slider-dot.active {
    background: #333;
    width: 24px;
    border-radius: 4px;
}

/* ===================================================
   HALAMAN PAYMENT / CHECKOUT - Premium Redesign
   =================================================== */

/* Container utama checkout */
.checkout-table {
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
    padding: 28px !important;
    border: 1px solid #e8ecf0 !important;
}

/* ---- Alamat Pengiriman ---- */
.checkout-table .border-bottom.border-color-1.mb-5:first-child .p-3 h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e !important;
    letter-spacing: 0.3px;
}

/* Card alamat terpilih */
.checkout-table #userAddress {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkout-table .d-flex.justify-content-between.align-items-end.border.p-3.rounded.bg-light {
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%) !important;
    border: 1.5px solid #d0d8ff !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    transition: box-shadow 0.2s;
}

.checkout-table .d-flex.justify-content-between.align-items-end.border.p-3.rounded.bg-light:hover {
    box-shadow: 0 2px 12px rgba(100, 116, 255, 0.12);
}

/* Label & teks alamat */
.checkout-table .text-dark.small {
    color: #444 !important;
    font-size: 13px !important;
}

.checkout-table #receiver-name {
    color: #1a1a2e !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.checkout-table #receiver-address {
    color: #555 !important;
    font-size: 13px;
    line-height: 1.5;
}

/* Tombol "Ganti" */
.checkout-table #btnChangeAddress,
.checkout-table #btnChangeShipping {
    border: 1.5px solid #333e48 !important;
    color: #333e48 !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    padding: 4px 14px !important;
    font-weight: 600;
    transition: all 0.2s;
}

.checkout-table #btnChangeAddress:hover,
.checkout-table #btnChangeShipping:hover {
    background: #333e48 !important;
    color: #fff !important;
}

/* ---- Section Title "Pesanan Anda" ---- */
.checkout-table h3.section-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
}

/* ---- Item Produk di tabel ---- */
#checkout-items td,
#checkout-items th,
#checkout-items span,
#checkout-items strong {
    color: #222 !important;
    vertical-align: middle;
}

#checkout-items tr {
    border-bottom: 1px solid #f0f0f0 !important;
}

#checkout-items td:last-child {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a2e !important;
    white-space: nowrap;
}

/* ---- Section Pengiriman (JNE) ---- */
.checkout-table .border-bottom.border-color-1.border-dotted-bottom .p-3 a {
    color: #1a1a2e !important;
    font-size: 15px;
    font-weight: 600;
}

/* Card opsi shipping terpilih */
.checkout-table #selected-shipping .d-flex {
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%) !important;
    border: 1.5px solid #a5d6a7 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
}

.checkout-table #selected-shipping-name {
    color: #1a1a2e !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.checkout-table #selected-shipping-etd {
    color: #555 !important;
    font-size: 12px !important;
}

.checkout-table #selected-shipping-price,
.checkout-table .text-primary {
    color: #1a1a2e !important;
    font-weight: 700 !important;
}

/* Placeholder shipping */
#shipping-options-placeholder p {
    color: #778 !important;
    font-size: 13px;
    font-style: italic;
    background: #f8f9ff;
    border-radius: 8px;
    padding: 12px;
    border: 1px dashed #c5c8e8;
}

/* ---- Total Bayar ---- */
.checkout-table .border-bottom.border-color-1.mb-3 .d-flex {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d52 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 4px 0;
}

.checkout-table .border-bottom.border-color-1.mb-3 h4 {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

#checkout-total-display {
    color: #ffd700 !important;
    font-weight: 800 !important;
    font-size: 20px !important;
}

/* ---- Tombol "Buat Pesanan" ---- */
#btnBuatPesanan {
    background: #fed700 !important;
    border: none !important;
    color: #333e48 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: 0.5px;
    border-radius: 50px !important;
    padding: 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(254, 215, 0, 0.4) !important;
    margin-top: 8px !important;
}

#btnBuatPesanan:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(51, 62, 72, 0.35) !important;
    background: #333e48 !important;
    color: #fff !important;
}

#btnBuatPesanan:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Tombol Tambah Alamat */
#btnAddAddressCO {
    border-radius: 50px !important;
    font-size: 14px !important;
}

/* ---- Override text-muted umum di checkout ---- */
.checkout-table .text-muted,
.checkout-table p.text-muted,
.checkout-table small.text-muted,
.checkout-table div.text-muted {
    color: #778 !important;
    opacity: 1 !important;
}

/* Background area checkout */
.checkout-table .bg-light {
    background-color: #f8f9fa !important;
}