/* public/css/rc-header-megamart.css
   =========================================================
   FULL CSS (copas langsung)
   - Hamburger SUDAH DIHAPUS
   - Dropdown aman (no hover gap + z-index)
   - Tidak mengubah .container global (anti bentrok bootstrap)
   ========================================================= */

/* =========================
   ROOT TOKENS (GLOBAL THEME)
   ========================= */
:root {
    --font-body:
        "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
        sans-serif;

    --font-head:
        "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
        sans-serif;
}

html,
body {
    font-family: var(--font-body) !important;
}

/* Keep footer at bottom on short pages */
.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.rc-main-content {
    flex: 1 0 auto;
}

.rc-pdp-title,
.rc-card-title,
.rc-pdp-price .value,
.rc-btn {
    font-family: var(--font-head);
    letter-spacing: -0.2px; /* bikin kerasa “kotak/tegas” */
}
:root {
    /* FONT FAMILY */

    /* COLORS */
    --primary: #1b3c53;
    --primary-dark: #213c51;
    --text: #666666;
    --heading: #222222;
    --light: #888888;
    --border: #ededed;
    --backgorund-1: #f5f5f5;
    --background-2: #f6f6fc;
    /* --primary: #ee4d2d; */
    /* --yellow-2: #ee4d2d; */
    --white: #ffffff;
    --background-3: #f3f9fb;
    --line: #d9d9d9;

    /* Compatibility bridge */
    --rc-orange: var(--primary);
    --rc-orange-dark: var(--primary);
    --rc-orange-darker: #1b3c53;

    --rc-text: #111827;
    --rc-muted: #777777;

    --rc-r6: 6px;
    --rc-r10: 10px;
    --rc-r12: 12px;

    --rc-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.12);
    --rc-shadow-strong: 0 14px 38px rgba(0, 0, 0, 0.18);
}

/* =========================
   GLOBAL TYPOGRAPHY
   ========================= */

/* Apply IBM Plex Sans to body and all text elements */

/* Text elements */

img {
    max-width: 100%;
    height: auto;
}

/* Tables */

/* =========================
   PRESERVE ICON FONTS
   ========================= */

/* Font Awesome icons */
.fa,
.fas,
.far,
.fab,
.fal,
.fad,
.fass,
.fasr,
[class*="fa-"],
[class^="fa-"],
i[class*="fa"],
i[class^="fa"] {
    font-family:
        "Font Awesome 6 Free", "Font Awesome 5 Free", "Fontawesome",
        var(--fa-style-family, "Font Awesome 6 Free") !important;
}

/* Boxicons */
.bx,
[class*="bx-"],
[class^="bx"],
i[class*="bx"],
i[class^="bx"] {
    font-family: boxicons !important;
}

/* Feather icons */
.feather,
[class*="feather-"],
[class^="feather"],
i[class*="feather"],
i[class^="feather"] {
    font-family: "Feather" !important;
}

/* =========================================================
   DROPDOWN SAFETY (SCOPE ONLY HEADER)
   ========================= */
.rc-header,
.rc-header .rc-mainbar,
.rc-header .rc-mainbar__inner,
.rc-header .rc-utilitybar,
.rc-header .rc-utilitybar__inner {
    overflow: visible;
}

/* catbar needs overflow-x for scrollable pills on mobile */
.rc-header .rc-catbar {
    overflow: visible;
}

/* Desktop: hide both scrollbars completely */
@media (min-width: 992px) {
    .rc-header .rc-catbar__inner {
        overflow-x: visible;
        overflow-y: visible;
    }
}

/* Mobile: allow horizontal scroll only */
@media (max-width: 991.98px) {
    .rc-header .rc-catbar__inner {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

/* =========================================================
   HEADER WRAPPER
   ========================================================= */
.rc-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;

    background: var(--white);
    color: var(--heading);
    border-bottom: 1px solid var(--border);

    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.rc-header.is-stuck {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* compact behavior (dari JS lama kamu) */
.rc-header.is-compact .rc-mainbar {
    padding: 10px 0;
}
.rc-header.is-compact .rc-logo {
    max-height: 46px;
}
.rc-header.is-compact .rc-searchbar {
    height: 40px;
}

/* =========================================================
   ROW 1: UTILITY BAR
   ========================================================= */
.rc-utilitybar {
    background: var(--backgorund-1);
    border-bottom: 1px solid var(--border);
}

.rc-utilitybar__inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.rc-utilitybar__left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.rc-utilitybar__welcome {
    font-size: 14px;
    line-height: 14px;
    color: var(--text);
    white-space: nowrap;
}

.rc-utilitybar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rc-utilitybar__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    line-height: 18px;
    padding: 6px 8px;
    border-radius: 10px;
    transition:
        background 0.18s ease,
        color 0.18s ease;
    white-space: nowrap;
}

.rc-utilitybar__link i {
    color: var(--text);
}

.rc-utilitybar__link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--heading);
}

.rc-utilitybar__sep {
    width: 1px;
    height: 18px;
    background: var(--line);
}

/* =========================================================
   ROW 2: MAIN BAR
   ========================================================= */
.rc-mainbar {
    padding: 18px 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.rc-mainbar__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

/* brand area */
.rc-brandarea {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rc-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.rc-logo {
    max-height: 64px;
    width: auto;
    display: block;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.rc-logo--mobile {
    display: none;
}

/* =========================================================
   SEARCH
   ========================================================= */
.rc-search {
    min-width: 0;
}

.rc-searchbar {
    height: 48px;
    border-radius: 10px;
    background: var(--background-3);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--border);
}

.rc-searchbar__icon {
    color: var(--text);
    font-size: 14px;
    padding-left: 2px;
}

.rc-searchbar__input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 14px;
    line-height: 18px;
    color: var(--heading);
    background: transparent;
    padding: 0;
    min-width: 0;
}

.rc-searchbar__input::placeholder {
    color: var(--text);
}

.rc-searchbar__btn {
    border: 0;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
    transition:
        color 0.18s ease,
        background 0.18s ease;
    white-space: nowrap;
}

.rc-searchbar__btn:hover {
    color: var(--yellow-1);
}

.rc-searchbar__filter {
    width: 40px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* =========================================================
   ACTIONS
   ========================================================= */
.rc-actions {
    display: inline-flex;
    align-items: center;
    gap: 18px;
}

.rc-actions__sep {
    width: 1px;
    height: 24px;
    background: var(--line);
}

/* guest auth link */
.rc-authlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    line-height: 18px;
    padding: 6px 8px;
    border-radius: 10px;
    transition:
        background 0.18s ease,
        color 0.18s ease;
    white-space: nowrap;
}

.rc-authlink:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--heading);
}

/* user (auth) */
.rc-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 10px;
    transition:
        background 0.18s ease,
        color 0.18s ease;
    white-space: nowrap;
}

.rc-user:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--heading);
}

.rc-user__avatar {
    width: 26px !important;
    height: 26px !important;
    border-radius: 999px !important;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.rc-user__name {
    font-size: 16px;
    font-weight: 700;
}

/* cart */
.rc-cart-wrapper {
    position: relative;
}

.rc-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text) !important;
    padding: 6px 8px;
    border-radius: 10px;
    background: transparent;
    border: 0;
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.rc-cart:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--heading);
}

.rc-cart i {
    color: var(--text) !important;
}

.rc-cart__label {
    font-weight: 700;
    font-size: 16px;
    line-height: 18px;
}

/* badge angka */
/* =========================
   CART BADGE — PERFECT CIRCLE / PILL
   ========================= */
.rc-cart__badge {
    /* size */
    --badge-size: 18px;

    position: absolute;
    top: -6px;
    right: -10px;

    background: var(--primary) !important;
    color: var(--white) !important;

    height: var(--badge-size);
    min-width: var(--badge-size);

    /* default: circle */
    width: var(--badge-size);
    padding: 0; /* <- ini kunci circle */

    border-radius: 999px !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 11px;
    font-weight: 900;
    line-height: 1; /* <- biar text gak “naik turun” */
    box-sizing: border-box;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

/* kalau 2 digit atau lebih -> jadi pill (lebih lebar), tetap rounded */
.rc-cart__badge[data-count]:not([data-count="0"]) {
    /* optional: kalau mau hide ketika 0, nanti pakai JS set display none */
}
.rc-cart__badge.is-pill {
    width: auto; /* melebar */
    padding: 0 6px; /* pill padding */
    min-width: var(--badge-size);
}

/* Optional: kalau mau sembunyi saat 0 (tanpa JS) */
.rc-cart__badge.is-zero {
    display: none !important;
}

.text-muted {
    color: #6c757d !important;
}
/* =========================================================
   ROW 3: CATEGORY BAR
   ========================================================= */
.rc-catbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: relative;
    /* Pastikan z-index cukup tinggi untuk scroll */
    z-index: 10;
}

.rc-catbar__inner {
    min-height: 69px;
    display: flex;
    align-items: center;
    gap: 10px;
    scroll-behavior: smooth;
    /* Padding untuk scroll indicator dan space terakhir */
    padding-right: 30px;
    /* Pastikan scroll tidak terhalang */
    position: relative;
    z-index: 5;
    /* Pastikan elemen di dalam bisa di-interaksi */
    width: 100%;
}

/* Desktop: no scroll needed - pills fit in container */
@media (min-width: 992px) {
    .rc-catbar__inner {
        overflow-x: visible;
        overflow-y: visible;
        justify-content: flex-start;
    }
}

/* Mobile: horizontal scroll for pills */
@media (max-width: 991.98px) {
    .rc-catbar__inner {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
    }
}

/* Scroll indicator for mobile */
.rc-catbar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.98)
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 991px) {
    .rc-catbar::after {
        opacity: 1;
    }
}

/* Scrollbar styling for desktop */
.rc-catbar__inner::-webkit-scrollbar {
    height: 4px;
}

.rc-catbar__inner::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.rc-catbar__inner::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.rc-catbar__inner::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Hide scrollbar on mobile but keep functionality */
@media (max-width: 991px) {
    .rc-catbar .container {
        /* Override Bootstrap container untuk mobile scroll */
        max-width: none !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .rc-catbar__inner {
        -ms-overflow-style: none;
        scrollbar-width: none;
        width: auto;
        min-width: 100%;
    }

    .rc-catbar__inner::-webkit-scrollbar {
        display: none;
    }
}

.rc-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 18px;
    background: var(--background-3);
    border: 0;
    color: var(--heading);
    text-decoration: none;
    font-size: 14px;
    line-height: 18px;
    font-weight: 500;
    white-space: nowrap;
    transition:
        background 0.18s ease,
        transform 0.15s ease,
        color 0.18s ease;
}

.rc-cat i {
    font-size: 12px;
    color: rgba(34, 34, 34, 0.65);
}

.rc-cat:hover {
    background: rgba(243, 249, 251, 0.7);
    transform: translateY(-1px);
    color: var(--heading);
}

.rc-cat--active {
    background: var(--primary);
    color: var(--white);
}

.rc-cat--active i {
    color: rgba(255, 255, 255, 0.9);
}

/* Loading state */
.rc-cat--loading {
    background: var(--background-3);
    color: var(--text);
    pointer-events: none;
}

/* Error state */
.rc-cat--error {
    background: #fee;
    color: #c33;
    pointer-events: none;
}

/* =========================================================
   CATEGORY DROPDOWN (similar to cart dropdown)
   ========================================================= */
.rc-cat-wrapper {
    position: relative;
    flex-shrink: 0; /* Prevent shrinking for horizontal scroll */
}

.rc-cat-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    max-width: 90vw;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    z-index: 2000;
    /* Ensure dropdown doesn't interfere with scroll when hidden */
    pointer-events: none;
}

/* Desktop: show on hover/active */
.rc-cat-wrapper:hover .rc-cat-dropdown,
.rc-cat-wrapper.active .rc-cat-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Hover bridge for seamless dropdown */
.rc-cat-wrapper::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 8px;
    background: transparent;
}

/* Dropdown header */
.rc-cat-dropdown__header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
}

.rc-cat-dropdown__header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--heading);
}

/* Mobile close button */
.rc-cat-dropdown__close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--heading);
    transition: all 0.2s ease;
    z-index: 10;
}

.rc-cat-dropdown__close:hover {
    background: rgba(0, 0, 0, 0.15);
}

.rc-cat-count {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    background: rgba(27, 60, 83, 0.1);
    padding: 4px 12px;
    border-radius: 999px;
}

/* Dropdown body */
.rc-cat-dropdown__body {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}

/* Dropdown loading state */
.rc-cat-dropdown__loading {
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 60px;
}

.rc-cat-dropdown__loading i {
    font-size: 20px;
    color: var(--primary);
    opacity: 0.5;
    display: block;
}

.rc-cat-dropdown__loading p {
    font-size: 12px;
    color: var(--text);
    margin: 0;
    opacity: 0.6;
    display: none; /* Hide text by default - spinner only */
}

.rc-cat-dropdown__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--light);
}

.rc-cat-dropdown__empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 12px;
    display: block;
}

.rc-cat-dropdown__empty p {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

/* Category etalase item */
.rc-cat-etalase-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.rc-cat-etalase-item:hover {
    background: #fafafa;
}

.rc-cat-etalase-item:last-child {
    border-bottom: none;
}

.rc-cat-etalase__img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-cat-etalase__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rc-cat-etalase__info {
    flex: 1;
    min-width: 0;
}

.rc-cat-etalase__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--rc-text);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rc-cat-etalase__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.rc-cat-etalase__stock {
    font-size: 11px;
    color: var(--light);
}

/* Dropdown footer */
.rc-cat-dropdown__footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
}

.rc-cat-dropdown__footer a {
    display: block;
    text-align: center;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s ease;
}

.rc-cat-dropdown__footer a:hover {
    background: #022c4c;
    color: var(--white);
}

/* =========================================================
   CART DROPDOWN (desktop)
   ========================================================= */
.rc-cart-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    z-index: 2000;
}

.rc-cart-wrapper:hover .rc-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* hover bridge */
.rc-cart-wrapper::after {
    content: "";
    position: absolute;
    right: 0;
    top: 100%;
    width: 360px;
    height: 12px;
    background: transparent;
}

/* dropdown header */
.rc-cart-dropdown__header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 12px 12px 0 0;
}

.rc-cart-dropdown__header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--heading);
}

.rc-cart-count {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    background: rgba(22, 115, 162, 0.1);
    padding: 4px 12px;
    border-radius: 999px;
}

.rc-cart-dropdown__body {
    max-height: 200px;
    overflow-y: auto;
    padding: 0;
}

.rc-cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--light);
}

.rc-cart-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 12px;
    display: block;
}

.rc-cart-empty p {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

.rc-cart-empty small {
    font-size: 12px;
    color: var(--light);
}

/* Cart Item (copied from legacy styles to restore dropdown layout) */
.rc-cart-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    transition: background 0.2s ease;
}

.rc-cart-item:hover {
    background: #fafafa;
}

.rc-cart-item__img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-cart-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rc-cart-item__info {
    flex: 1;
    min-width: 0;
}

.rc-cart-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--rc-text);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rc-cart-item__meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 6px;
}

.rc-cart-item__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

/* Harga dengan Diskon (digunakan juga di cart dropdown dan category pills) */
.rc-reco-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rc-reco-price--original {
    color: #999;
    font-size: 11px;
    font-weight: 400;
    text-decoration: line-through;
}

.rc-reco-price--discounted {
    color: #dc3545;
    font-size: 14px;
    font-weight: 900;
}

.rc-cart-item__remove {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rc-cart-item__remove:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.rc-cart-dropdown__footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
}

.rc-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--heading);
}

.rc-cart-total-price {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
}

.rc-header.rc-btn.rc-btn--primary {
    background: var(--primary);
    border: 0;
    color: var(--white);
    border-radius: 12px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
}

.rc-header.rc-btn.rc-btn--primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
    .rc-utilitybar__right {
        display: none;
    }

    .rc-mainbar {
        padding: 12px 0;
    }

    .rc-mainbar__inner {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }

    .rc-logo--desktop {
        display: none;
    }
    .rc-logo--mobile {
        display: block;
        max-height: 40px;
    }

    .rc-user__name,
    .rc-cart__label {
        display: none;
    }

    /* dropdown off di mobile */
    .rc-cart-dropdown,
    .rc-cart-wrapper::after {
        display: none !important;
    }

    /* Category dropdowns work on mobile with click (not hover) */
    .rc-cat-wrapper::after {
        display: none !important;
    }

    /* Category dropdown styling elements */
    .rc-cat-dropdown__header h4 {
        font-size: 18px !important;
        font-weight: 800 !important;
        margin-top: 4px !important;
    }

    .rc-cat-count {
        font-size: 13px !important;
        padding: 5px 14px !important;
        background: rgba(27, 60, 83, 0.08) !important;
    }

    .rc-cat-etalase-item {
        padding: 16px 24px !important;
        border-bottom: 1px solid #f5f5f5 !important;
        transition: background 0.2s ease !important;
    }

    .rc-cat-etalase-item:active {
        background: #f8f9fa !important;
    }

    .rc-cat-etalase__img {
        width: 56px !important;
        height: 56px !important;
        border-radius: 10px !important;
        border: 1px solid #eee !important;
    }

    .rc-cat-etalase__name {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin-bottom: 6px !important;
    }

    .rc-cat-etalase__price {
        font-size: 15px !important;
        font-weight: 800 !important;
    }

    .rc-cat-etalase__stock {
        font-size: 12px !important;
        margin-top: 2px !important;
    }

    .rc-cat-dropdown__footer {
        border-radius: 0 0 24px 24px !important;
        border-top: 1px solid #f0f0f0 !important;
        padding: 18px 24px !important;
        background: #fafafa !important;
    }

    .rc-cat-dropdown__footer a {
        border-radius: 14px !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        font-weight: 800 !important;
    }

    /* Close button on mobile */
    .rc-cat-dropdown__close {
        display: flex !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: rgba(0, 0, 0, 0.06) !important;
        border: none !important;
        transition: all 0.2s ease !important;
    }

    .rc-cat-dropdown__close:active {
        background: rgba(0, 0, 0, 0.12) !important;
        transform: scale(0.95) !important;
    }

    /* Empty state on mobile */
    .rc-cat-dropdown__empty {
        padding: 60px 24px !important;
    }

    .rc-cat-dropdown__empty i {
        font-size: 56px !important;
        margin-bottom: 16px !important;
    }

    .rc-cat-dropdown__empty p {
        font-size: 16px !important;
        margin-bottom: 6px !important;
    }

    .rc-cat-dropdown__empty small {
        font-size: 13px !important;
    }

    .rc-search {
        min-width: 0;
        width: 100%;
    }

    .rc-searchbar {
        width: 100%;
    }

    .rc-searchbar__input {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .rc-mainbar {
        padding: 10px 0;
    }

    .rc-searchbar {
        height: 44px;
    }

    .rc-searchbar__btn {
        display: none;
    }

    .rc-actions {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
    }

    .rc-actions .rc-authlink {
        display: none !important;
    }

    /* Keep cart icon visible on very small screens, but hide the label */
    .rc-actions .rc-cart-wrapper {
        display: inline-flex !important;
        align-items: center;
    }

    /* Show only the cart icon to conserve space */
    .rc-cart__label {
        display: none !important;
    }

    /* Tighten spacing and reduce padding to keep avatar close to cart */
    .rc-actions .rc-user {
        display: inline-flex !important;
        padding: 6px 6px !important;
    }

    .rc-user {
        padding: 6px 6px !important;
    }

    .rc-cart {
        padding: 6px 6px !important;
    }
    @media (max-width: 575px) {
        .rc-user__avatar {
            width: 30px !important;
            height: 30px !important;
            border-radius: 999px !important; /* ✅ tambahkan ini */
            object-fit: cover !important; /* ✅ aman */
        }
    }

    /* reduce gap between avatar and username to match guest icon spacing */
    .rc-user {
        gap: 6px !important;
    }

    /* Mobile-only: guest login icon inside search bar */
    .rc-search-user {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 8px;
        color: var(--text);
        font-size: 18px;
        text-decoration: none;
        padding: 6px 8px;
        border-radius: 10px;
        background: transparent;
    }

    .rc-search-user i {
        pointer-events: none;
    }

    /* Mobile-only user icon used in actions area */
    .rc-user-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 0;
        color: var(--text);
        font-size: 18px;
        text-decoration: none;
        padding: 6px 8px;
        border-radius: 10px;
        background: transparent;
    }

    .rc-user-mobile i {
        pointer-events: none;
    }

    .rc-mainbar__inner {
        grid-template-columns: auto 1fr auto !important;
    }
}
/* lock scroll ketika bottomsheet terbuka */
.rc-lock-scroll {
    overflow: hidden !important;
    /* Jangan gunakan touch-action: none karena akan block swipe gesture */
    position: relative;
}

/* Fix untuk iOS: prevent body scroll tapi izinkan swipe di dalam elemen */
.rc-lock-scroll::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

/* Mobile backdrop untuk category dropdown (dibuat dinamis via JS) */
.rc-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1998;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.rc-mobile-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Dropdown base */
.rc-cat-dropdown {
    background: #fff;
}

/* ===== MOBILE DROPDOWN (FINAL - CONSOLIDATED) ===== */
@media (max-width: 991.98px) {
    /* IMPORTANT: Override desktop styles completely */
    .rc-cat-dropdown {
        /* Positioning di-set via JS inline style when mounted */
        border-radius: 22px 22px 0 0 !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18) !important;
        border: none !important;
        background: #ffffff !important;

        /* Hidden state */
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(100%) !important;
        pointer-events: none !important;
        transition:
            transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease !important;
    }

    /* Active state: muncul dari bawah */
    .rc-cat-dropdown.rc-dropdown-open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* biar scroll di dalam sheet, bukan body */
    .rc-cat-dropdown__body {
        max-height: calc(75vh - 150px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .rc-cat-dropdown__header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #fff;
    }

    .rc-cat-dropdown__header::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 4px;
        background: rgba(0, 0, 0, 0.18);
        border-radius: 3px;
    }
}
/* ===== Header text should be dark (not muted) ===== */
.rc-header .rc-authlink,
.rc-header .rc-user,
.rc-header .rc-user__name,
.rc-header .rc-cart,
.rc-header .rc-cart__label {
    color: var(--heading) !important; /* #222 */
}

.rc-header .rc-cart i,
.rc-header .rc-user i,
.rc-header .rc-authlink i {
    color: var(--heading) !important;
}

/* optional: kalau mau sedikit lebih pekat */
.rc-header .rc-user__name {
    font-weight: 800;
}
/* =========================
   USER DROPDOWN — ELEGANT
   ========================= */

/* Hilangkan caret default bootstrap (optional) */
.rc-user.dropdown-toggle::after {
    display: none !important;
}

/* Tambah chevron custom kecil */
.rc-user {
    position: relative;
    padding-right: 26px; /* ruang buat chevron */
}
.rc-user::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(34, 34, 34, 0.55);
    transform: translateY(-35%);
    transition: transform 0.18s ease;
}
.dropdown.show .rc-user::after {
    transform: translateY(-35%) rotate(180deg);
}

/* Menu container */
.rc-user-menu.dropdown-menu {
    min-width: 240px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
    overflow: hidden;

    /* animasi halus */
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: all 0.18s ease;
    display: block; /* biar animasi jalan */
    visibility: hidden;
    pointer-events: none;
}

/* Saat show (Bootstrap kasih class .show) */
.rc-user-menu.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
}

/* Item menu */
.rc-user-menu .dropdown-item {
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;

    font-weight: 800;
    font-size: 13px;
    color: #111827;

    transition: all 0.15s ease;
}

/* icon rapi (kolom icon fixed) */
.rc-user-menu .dropdown-item i {
    width: 18px;
    min-width: 18px;
    text-align: center;
    font-size: 16px;
    color: rgba(27, 60, 83, 0.85);
}

/* hover elegan */
.rc-user-menu .dropdown-item:hover {
    background: rgba(27, 60, 83, 0.07);
    color: var(--primary);
}

/* tombol logout yang berupa button biar sama feelnya */
.rc-user-menu form .dropdown-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
}

/* Optional divider yang cakep (kalau mau) */
.rc-user-menu .rc-user-menu__divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 8px 6px;
}
/* ===== FIX AVATAR: ALWAYS PERFECT CIRCLE ===== */
.rc-user__avatar {
    display: block !important;
    width: 30px !important;
    height: 30px !important;

    aspect-ratio: 1 / 1 !important; /* 🔑 kunci persegi */
    object-fit: cover !important;

    border-radius: 50% !important;
    overflow: hidden !important;

    max-width: none !important; /* ⛔ lawan img global */
    max-height: none !important;
}
