:root {
    --font-sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei",
        "Source Han Sans TC", -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

html,
body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Pastikan semua elemen UI ikut mewarisi */
*,
*::before,
*::after {
    font-family: inherit;
}
button,
input,
select,
textarea {
    font-family: inherit;
}

#footer.footer-texts-more-lighten p,
#footer.footer-texts-more-lighten span,
#footer.footer-texts-more-lighten a:not(.btn):not(.no-footer-css),
#footer.footer-texts-more-lighten li {
    color: var(--light);
}

h2,
p,
h1,
h3,
h5,
h4 {
    color: var(--dark--300);
}

.text-color-dark,
.text-dark {
    color: var(--dark--300);
}

#footer {
    background: var(--bg-magenta-gradient);
    border-top: none;
    font-size: 0.9em;
    margin-top: 50px;
    padding: 2px 0 0 0;
    position: relative;
    clear: both;
}

#footer form {
    opacity: 0.85;
}

.main {
    min-height: 600px;
}

#footer input {
    color: var(--light);
}

#footer form label.error {
    line-height: 16px;
    margin: 5px 0 -5px;
    display: block;
    clear: both;
}

#footer form .alert {
    padding: 6px;
    text-align: center;
}

#footer .logo img {
    position: relative;
    top: 2px;
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}

#footer .footer-bg-color-2 {
    background: var(--primary-rgba-90);
}

#footer .footer-copyright {
    background: var(--primary-rgba-90);
}

#footer .footer-copyright.footer-copyright-style-2 {
    background: none;
    /* border-top: 1px solid rgba(255, 255, 255, 0.05); */
}

/* Hindari padding-top berbasis persen (karena relatif ke lebar parent, bukan tinggi) */
.select2 {
    padding-top: 0 !important;
}

/* Styling field pencarian dalam dropdown Select2 */
.select2-search__field {
    padding: 6px 8px;
    /* font-size: 13px; */
    border-radius: 4px;
    border: 1px solid #ccc;
    outline: none;
}

/* Perbaiki posisi vertical Select2 agar sejajar dengan input text */
.select2-container--default .select2-selection--single {
    height: 42px; /* pastikan height tetap */
    display: flex;
    align-items: center;
    padding: 6px 12px;
    box-sizing: border-box;
    min-height: 42px;
}

/* Atur teks agar rata tengah juga */
.select2-selection__rendered {
    padding-left: 8px !important;
    padding-right: 20px !important;
    /* font-size: 14px; */
    line-height: 42px !important; /* ⬅️ ini kunci kestabilan vertikal */
    height: auto !important;
    display: block; /* ⬅️ jangan flex */
    box-sizing: border-box;
}

.select2-selection__clear {
    line-height: 2.3;
    /* font-size: 14px; */
    margin-left: 6px;
    position: relative;
    top: 0;
    vertical-align: middle; /* ⬅️ membantu sejajarkan dengan teks */
}

/* Sembunyikan arrow default Select2 (optional, tergantung desainmu) */
.select2-selection__arrow {
    display: none;
}

.search-form-select-wrapper .select2-container {
    height: 100%;
}

.search-form-select-wrapper .select2-selection--single {
    height: 100%;
    display: flex;
    align-items: center;
}

.select2-selection--single {
    position: relative;
}

.select2-selection--single::after {
    content: "▾"; /* atau gunakan ikon dari font-awesome/feather */
    position: absolute;
    right: 10px;
    top: 49%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #888;
    pointer-events: none;
}

.select2-selection__rendered {
    color: #212529; /* atau #212529 */
    cursor: pointer;
}

@media (max-width: 768px) {
    .product .product-thumb-info .addtocart-btn-wrapper {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .product .product-thumb-info .addtocart-btn-wrapper .addtocart-btn {
        opacity: 1 !important;
        visibility: visible !important;
        /* display: block !important; */
    }
}

.product-image-rata {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-rata img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* isi area penuh, crop kalau perlu */
}

/* make heart red when wished */
.wishlist-btn i {
    transition: color 0.15s ease;
}

.wishlist-btn.wished {
    color: #e63946 !important;
    background-color: #e63946 !important;
} /* merah */

.wishlist-btn.wished i {
    color: #e63946 !important;
    background-color: #e63946 !important;
} /* merah */

.wishlist-btn.wished i .fas .fa-heart {
    color: #e63946 !important;
} /* merah */

/* Make the wrapper take full width; we'll set its height via JS */
.recaptcha-wrap {
    width: 100%;
    position: relative;
    overflow: hidden; /* hide any overflow when scaled */
}

/* Scale from the top-left corner */
.recaptcha-wrap .g-recaptcha {
    transform-origin: 0 0;
}

.toggle-pass {
    color: var(--light-inverse);
    border-color: var(--grey-200);
}

.main .container {
    width: 100%;
}

/* Overlay penuh layar */
.gl-spinner {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}
body.is-loading .gl-spinner {
    display: block;
}

/* Backdrop + blur belakang */
.gl-spinner .gl-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35); /* sedikit gelap */
    backdrop-filter: blur(4px); /* Chrome/Safari */
    -webkit-backdrop-filter: blur(4px);
}

/* Pusatkan spinner */
.gl-spinner .gl-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Blur & lock interaksi di konten utama */
body.is-loading .body {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}
body.is-loading {
    overflow: hidden;
} /* opsional: kunci scroll */

.quantity {
    /* margin: 0 15px 25px 0; */
    overflow: hidden;
    position: relative;
    width: 125px;
    height: 40px;
    float: left;
}

.quantity .minus {
    background: transparent;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    box-shadow: none;
    color: #5e5e5e;
    cursor: pointer;
    display: block;
    font-size: 12px;
    font-weight: bold;
    height: 40px;
    line-height: 13px;
    margin: 0;
    overflow: visible;
    outline: 0;
    padding: 0;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 40px;
    border-radius: 0.25rem 0 0 0.25rem;
}

.quantity .plus {
    background: transparent;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    box-shadow: none;
    color: #5e5e5e;
    cursor: pointer;
    display: block;
    font-size: 12px;
    font-weight: bold;
    height: 40px;
    line-height: 13px;
    margin: 0;
    overflow: visible;
    outline: 0;
    padding: 0;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 40px;
    border-radius: 0 0.25rem 0.25rem 0;
    right: 0;
    top: 0;
}

.quantity .qty {
    border: 1px solid #f0f0f0;
    box-shadow: none;
    float: left;
    height: 40px;
    padding: 0 39px;
    text-align: center;
    width: 125px;
    font-weight: bold;
    font-size: 1em;
    outline: 0;
    border-radius: 0.25rem;
}

.quantity .qty::-webkit-inner-spin-button,
.quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* OTHER QUANTITY STYLE */

.quantity .qty-dec {
    background: transparent;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    box-shadow: none;
    color: #5e5e5e;
    cursor: pointer;
    display: block;
    font-size: 12px;
    font-weight: bold;
    height: 40px;
    line-height: 13px;
    margin: 0;
    overflow: visible;
    outline: 0;
    padding: 0;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 40px;
    border-radius: 0.25rem 0 0 0.25rem;
}

.quantity .qty-inc {
    background: transparent;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    box-shadow: none;
    color: #5e5e5e;
    cursor: pointer;
    display: block;
    font-size: 12px;
    font-weight: bold;
    height: 40px;
    line-height: 13px;
    margin: 0;
    overflow: visible;
    outline: 0;
    padding: 0;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 40px;
    border-radius: 0 0.25rem 0.25rem 0;
    right: 0;
    top: 0;
}

.quantity .qty-input {
    border: 1px solid #f0f0f0;
    box-shadow: none;
    float: left;
    height: 40px;
    padding: 0 39px;
    text-align: center;
    width: 125px;
    font-weight: bold;
    font-size: 1em;
    outline: 0;
    border-radius: 0.25rem;
}

.quantity .qty-input::-webkit-inner-spin-button,
.quantity .qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* JS QUANTITY */

.js-qty-minus {
    background: transparent;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    box-shadow: none;
    color: #5e5e5e;
    cursor: pointer;
    display: block;
    font-size: 12px;
    font-weight: bold;
    height: 40px;
    line-height: 13px;
    margin: 0;
    overflow: visible;
    outline: 0;
    padding: 0;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 40px;
    border-radius: 0.25rem 0 0 0.25rem;
}

.js-qty-plus {
    background: transparent;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    box-shadow: none;
    color: #5e5e5e;
    cursor: pointer;
    display: block;
    font-size: 12px;
    font-weight: bold;
    height: 40px;
    line-height: 13px;
    margin: 0;
    overflow: visible;
    outline: 0;
    padding: 0;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 40px;
    border-radius: 0 0.25rem 0.25rem 0;
    right: 0;
    top: 0;
}

.js-qty-view {
    border: 1px solid #f0f0f0;
    box-shadow: none;
    float: left;
    height: 40px;
    padding: 0 39px;
    text-align: center;
    width: 125px;
    font-weight: bold;
    font-size: 1em;
    outline: 0;
    border-radius: 0.25rem;
}

.js-qty-view::-webkit-inner-spin-button,
.js-qty-view::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity .qty::-ms-clear {
    display: none;
}

.quantity.quantity-lg {
    height: 45px;
}

.quantity.quantity-lg .minus {
    height: 45px;
    width: 45px;
}

.quantity.quantity-lg .plus {
    height: 45px;
    width: 45px;
}

.quantity.quantity-lg .qty {
    height: 45px;
}

.qty-input {
    width: 50px;
    max-width: 100%;
    font-weight: 700;
}

#qv-title.modal-title {
    font-size: clamp(1.28rem, 2.3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.qv-gallery {
    max-width: 860px;
    margin-inline: auto;
}

.qv-hero {
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: clamp(240px, 46vh, 440px);
    background: #f8f9fa;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

#qv-hero-video {
    width: 100%;
    height: 100%;
}

.qv-hero img {
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.15s;
}

.qv-hero iframe,
.qv-hero video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.qv-hero video {
    object-fit: cover;
}

.qv-thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.15rem 0 0.35rem;
}

.qv-thumb {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
    background: #fff;
    cursor: pointer;
    opacity: 0.9;
    transition: transform 0.1s, opacity 0.1s, border-color 0.1s, box-shadow 0.1s;
}

.qv-thumb:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.qv-thumb.active {
    border-color: #212529;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qv-thumb.qv-thumb-video {
    background: #000;
}

.qv-thumb .qv-thumb-video-body {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qv-thumb .qv-thumb-video-body::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 18px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    opacity: 0.95;
}

.qv-side .qv-variants {
    max-height: 260px;
    overflow: auto;
    border-radius: 0.5rem;
    border: 1px solid #eee;
}

.qv-side .list-group-item {
    border: 0;
    border-bottom: 1px solid #f1f3f5;
}

.qv-side .list-group-item:last-child {
    border-bottom: 0;
}

.qv-side .price {
    font-weight: 700;
}

#qv-tabs .nav-link {
    padding: 0.55rem 1rem;
}

#qv-tabs .nav-link.active {
    font-weight: 600;
}

#qv-tab-faq .accordion-item {
    border: 1px solid #eee;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

#qv-tab-faq .accordion-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.96rem;
}

#qv-tab-faq .accordion-body {
    padding: 0.5rem 0.75rem;
}

.list-group .qv-variants .list-group-item {
    cursor: pointer;
}

.header-extra-info-icon {
    position: relative;
}
.header-extra-info-icon .wish-qty {
    position: absolute;
    top: -4px;
    right: -10px;
    width: 15px;
    height: 15px;
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: var(--light);
    background-color: #ed5348;
    text-align: center;
    line-height: 15px;
    border-radius: 20px;
    box-shadow: -1px 1px 2px 0 rgba(0, 0, 0, 0.3);
}

@media (min-width: 576px) {
    #footer {
        font-size: 14px;
    }
    #footer h5,
    #footer .widget-title {
        font-size: 16px;
    }
    #footer small,
    #footer .text-muted {
        font-size: 12px;
    }
}

@media (min-width: 768px) {
    #footer {
        font-size: 15px;
    }
    #footer h5,
    #footer .widget-title {
        font-size: 17px;
    }
    #footer small,
    #footer .text-muted {
        font-size: 12px;
    }
}

@media (min-width: 992px) {
    #footer {
        font-size: 16px;
    }
    #footer h5,
    #footer .widget-title {
        font-size: 18px;
    }
    #footer small,
    #footer .text-muted {
        font-size: 13px;
    }
}

@media (min-width: 1200px) {
    #footer {
        font-size: 16px;
    }
    #footer h5,
    #footer .widget-title {
        font-size: 19px;
    }
    #footer small,
    #footer .text-muted {
        font-size: 13px;
    }
}

@media (min-width: 1400px) {
    #footer {
        font-size: 17px;
    }
    #footer h5,
    #footer .widget-title {
        font-size: 20px;
    }
    #footer small,
    #footer .text-muted {
        font-size: 13px;
    }
}

section .section {
    background-color: transparent !important;
}

#currencyMenu .dropdown-item.currency-item.active {
    color: #fffafa !important;
}

.header-nav.ml-105 .dropdown-menu .dropdown-item {
    padding-top: 3%;
}

.style-switcher-open-loader {
    display: none !important;
}

.strike-pr {
    text-decoration: line-through;
    opacity: 0.8;
    margin-right: 0.35rem;
    font-weight: 0.9rem;
}

.price-main {
    font-size: 1rem;
}

.badge-member {
    margin-left: 0.35rem;
    /* padding: 0.15rem 0.4rem; */
    border-radius: 0.35rem;
    font-size: 0.9rem;
    background: #eaf5ff;
    color: #135b99;
    border: 1px solid #cfe9ff;
}

#qv-price-text .price-old {
    text-decoration: line-through;
    opacity: 0.65;
}
#qv-price-text .badge-member {
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.125rem 0.4rem;
    border: 1px solid #cfe3ff;
    background: #eaf3ff;
    border-radius: 0.25rem;
}

.profile-badge {
    position: absolute;
    left: 20%;
    bottom: 1%;
    transform: translateX(-50%);
    padding: 2px 8px;
    font-size: 0.7rem;
    line-height: 1.2;
    border-radius: 999px;
    background-color: #0d6efd;
    color: #fff;
    border: 1px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

.profile-badge.badge-tier {
    background-color: #0d6efd;
}

.profile-badge.badge-btype {
    background-color: #198754;
}

.header-global-search .form-control {
    border-radius: 999px;
}

.global-search-dropdown .global-search-item:hover,
.global-search-dropdown .global-search-item.active {
    background: #f3f4f6;
}

#globalSearchPanel .gsp-item a.gsp-focused {
    background-color: rgba(0, 0, 0, 0.03);
}

#globalSearchPanel .gsp-item a {
    font-size: 0.95rem; /* naik dari small (~0.875rem) */
    line-height: 1.4;
}

#globalSearchPanel .gsp-label {
    font-size: 0.95rem;
    font-weight: 600;
}

#globalSearchPanel .gsp-meta {
    font-size: 0.85rem;
    opacity: 0.9;
}

#globalSearchPanel .gsp-title {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

@media (min-width: 992px) and (max-width: 1116px) {
    #header .header-nav-main-inner {
        flex-wrap: nowrap;
    }

    #header .header-nav-main-inner nav {
        flex: 1 1 auto;
    }
    /* Pastikan menu tidak wrap */
    #header .header-nav-main-inner .nav.nav-pills {
        flex-wrap: nowrap;
        justify-content: center;
    }
}

@media (max-width: 1116px) {
    /* Sembunyikan search bar di header pada range ini */
    #header .header-nav-main-inner .header-global-search.d-none.d-lg-block {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    /* Sidebar links bigger & easier to tap on mobile */
    #sidebar .nav-link {
        font-size: 1.5rem !important; /* perbesar teks */
        padding-top: 0.7rem !important; /* tambah area klik */
        padding-bottom: 0.7rem !important;
    }

    #sidebar .nav-list {
        margin-bottom: 1.5rem !important;
    }
}
