/* =============================================================================
   Cart Sidebar — Custom mini-cart design
   Mobile-first. No CSS variables. Static values only.
   All rules scoped under #cart-popup for specificity.
   ============================================================================= */

/* ── Hide Flatsome default cart title + divider ───────────────────────────── */

.off-canvas .mfp-content.off-canvas-cart {
    --drawer-width: 420px !important;
}

#cart-popup .cart-popup-title {
    display: none;
}

/* ── Hide Scrollbar for Cart Popup / Sidebar Drawer ────────────────────────── */
#cart-popup,
#cart-popup *,
.off-canvas-cart,
.off-canvas-cart * {
    scrollbar-width: none !important;
    /* Firefox */
    -ms-overflow-style: none !important;
    /* IE / Edge */
}

#cart-popup::-webkit-scrollbar,
#cart-popup *::-webkit-scrollbar,
.off-canvas-cart::-webkit-scrollbar,
.off-canvas-cart *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}

/* ── Cart popup inner layout ──────────────────────────────────────────────── */

/* Allow the content wrapper to fill height and stack header / items / footer */
#cart-popup .widget_shopping_cart,
#cart-popup .widget_shopping_cart_content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Mini-cart header ─────────────────────────────────────────────────────── */

#cart-popup .mini-cart-header {
    padding: 0 0 20px;
    flex-shrink: 0;
}

#cart-popup .mini-cart-header__title {
    display: block;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1.2;
    color: #F0EEE8;
}

/* ── Items list ───────────────────────────────────────────────────────────── */

#cart-popup .mini-cart-items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#cart-popup .mini-cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Product image ────────────────────────────────────────────────────────── */

#cart-popup .mini-cart-item__image {
    flex-shrink: 0;
    width: 76px;
}

#cart-popup .mini-cart-item__image a {
    display: block;
}

#cart-popup .mini-cart-item__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 6;
    object-fit: cover;
    object-position: center top;
}

/* ── Product details ──────────────────────────────────────────────────────── */

#cart-popup .mini-cart-item__details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

#cart-popup .mini-cart-item__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

#cart-popup .mini-cart-item__name-wrap {
    flex: 1;
    min-width: 0;
}

#cart-popup .mini-cart-item__name {
    display: block;
    text-decoration: none;
    color: #F0EEE8;
    margin-bottom: 6px;
    font-family: 'Reload', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

#cart-popup .mini-cart-item__meta {
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    color: #6B7280;
    text-transform: uppercase;
    margin-bottom: 10px;
}

#cart-popup .mini-cart-item__price .amount {
    font-size: 13px;
    font-weight: 500;
    align-self: flex-start;
    font-family: 'Reload', sans-serif;
}

#cart-popup .amount {
    color: #C8B89A !important;
}

/* ── Quantity controls + remove ───────────────────────────────────────────── */

#cart-popup .mini-cart-item__controls {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
}

#cart-popup .mini-cart-qty {
    display: inline-flex;
    align-items: center;
}

#cart-popup .mini-cart-qty__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    min-height: unset;
    margin: 0;
    border: 1px solid rgba(200, 184, 154, 0.2);
    color: #F0EEE8;
    transition: opacity 0.2s ease;
}

#cart-popup .mini-cart-qty__btn:hover {
    opacity: 0.55;
}

#cart-popup .mini-cart-qty__count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 32px;
    font-size: 12px;
    font-weight: 600;
    padding: 0 4px;
    color: #F0EEE8;
}

#cart-popup .mini-cart-item__remove {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

#cart-popup .mini-cart-item__remove:hover {
    opacity: 1;
    color: #ef4444;
}

/* Loading state during AJAX qty update */
#cart-popup .mini-cart-items.is-updating {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.off-canvas {
    z-index: 999999 !important;
}

#cart-popup {
    height: 100%;
}

#cart-popup .cart-popup-inner {
    height: 100%;
    padding-bottom: 30px;
}

#cart-popup .mini-cart-footer {
    flex-shrink: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#cart-popup .mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

#cart-popup .mini-cart-total__label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(240, 238, 232, 0.45);
    text-transform: uppercase;
    font-size: 9px;
}

#cart-popup .mini-cart-total__amount {
    font-size: 18px;
    font-weight: 700;
}

#cart-popup .mini-cart-checkout-btn {
    display: block;
    width: 100%;
    padding: 17px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    background-color: #C8B89A;
    color: #080C1A;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

#cart-popup .mini-cart-checkout-btn:hover,
#cart-popup .mini-cart-checkout-btn:focus {
    background-color: #b8a98a;
    color: #111111;
    text-decoration: none;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */

#cart-popup .mini-cart-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    text-align: center;
    flex-direction: column;
    color: #fff;
    gap: 30px;
}

#cart-popup .mini-cart-empty .button {
    margin: 0;
}

#cart-popup .mini-cart-empty p {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 1;
    margin: 0;
}