/**
 * GymGo Smart Side Cart - Frontend CSS  (v2.1 - reference design)
 *
 * Styles the custom mini-cart content rendered INSIDE
 * Flatsome's native cart drawer (.widget_shopping_cart_content).
 *
 * Design reference: compact items, rounded progress bar,
 * yellow-tinted upsell card, gray footer with outlined view-cart button.
 *
 * @package GymGo_Smart_Cart
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --ggsc-yellow: var(--gymgo-yellow, #FFD700);
    --ggsc-yellow-hover: var(--gymgo-yellow-hover, #E6C200);
    --ggsc-black: var(--gymgo-black, #000000);
    --ggsc-white: var(--gymgo-white, #ffffff);
    --ggsc-gray-50: var(--gymgo-gray-50, #f9fafb);
    --ggsc-gray-100: var(--gymgo-gray-100, #f3f4f6);
    --ggsc-gray-200: var(--gymgo-gray-200, #e5e7eb);
    --ggsc-gray-300: var(--gymgo-gray-300, #d1d5db);
    --ggsc-gray-400: var(--gymgo-gray-400, #9ca3af);
    --ggsc-gray-500: var(--gymgo-gray-500, #6b7280);
    --ggsc-gray-600: var(--gymgo-gray-600, #4b5563);
    --ggsc-green: var(--gymgo-success, #22c55e);
    --ggsc-green-light: var(--gymgo-success-light, #dcfce7);
    --ggsc-red: var(--gymgo-danger, #dc2626);
    --ggsc-yellow-bg: var(--gymgo-yellow-bg, #fefce8);
    --ggsc-yellow-border: var(--gymgo-yellow-border, #fde68a);
    --ggsc-font-heading: var(--gymgo-font-heading, 'Bebas Neue', 'Oswald', sans-serif);
    --ggsc-font-body: var(--gymgo-font-body, 'Open Sans', 'Roboto', sans-serif);
}

/* ==========================================================================
   Flatsome Drawer Overrides
   ========================================================================== */

/* Flatsome header: left-aligned "Kosarad" + item count */
#cart-popup {
    background-color: #ffffff !important;
}

#cart-popup .cart-popup-title {
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-top: 8px !important;
    padding-left: 20px !important;
}

#cart-popup .cart-popup-title .heading-font {
    font-family: var(--ggsc-font-heading) !important;
    font-size: 22px !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    color: var(--ggsc-black) !important;
}

/* Item count badge next to title */
#cart-popup .cart-popup-title .ggsc-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ggsc-yellow);
    color: var(--ggsc-black);
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 6px;
    line-height: 1;
    font-family: var(--ggsc-font-body);
}

/* Flex column so our footer sticks to bottom; kill Flatsome's .inner-padding (30px) */
#cart-popup .cart-popup-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 4px !important;
    padding-bottom: 0 !important;
}

/* Intermediate wrapper – must participate in flex chain */
#cart-popup .widget_shopping_cart {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
}

#cart-popup .widget_shopping_cart_content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
}

/* ==========================================================================
   Mini Cart Root
   ========================================================================== */

.ggsc-mini-cart {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    overflow: hidden;
    font-family: var(--ggsc-font-body);
    min-height: 0;
    font-size: 14px;
    color: var(--ggsc-black);
}

.ggsc-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.ggsc-mini-cart *,
.ggsc-mini-cart *::before,
.ggsc-mini-cart *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Shipping Progress Bar
   ========================================================================== */

.ggsc-shipping-bar {
    padding: 16px 20px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--ggsc-gray-100);
}

.ggsc-progress-container {
    background: var(--ggsc-gray-100);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ggsc-progress-bar {
    height: 100%;
    background: var(--ggsc-black);
    border-radius: 999px;
    transition: width 0.5s ease, background-color 0.4s ease;
    min-width: 0;
}

.ggsc-progress-bar.ggsc-progress-full {
    background: var(--ggsc-green);
}

.ggsc-shipping-msg {
    font-size: 13px;
    text-align: center;
    color: var(--ggsc-gray-600);
    font-weight: 500;
    line-height: 1.4;
}

.ggsc-shipping-remaining .ggsc-remaining-amount {
    color: var(--ggsc-red);
    font-weight: 700;
}

.ggsc-shipping-success {
    color: var(--ggsc-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

/* ==========================================================================
   Cart Items (scrollable)
   ========================================================================== */

.ggsc-items {
    flex: 0 0 auto;
    overflow: visible;
    padding: 10px 10px;
    min-height: 0;
}

/* Hide scrollbar but keep scrolling */
.ggsc-items::-webkit-scrollbar {
    display: none;
}
.ggsc-items {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Single Cart Item --- */

.ggsc-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ggsc-gray-50);
}

.ggsc-item:last-child {
    border-bottom: none;
}

/* Thumbnail: 64x64 like reference */
.ggsc-item-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}

.ggsc-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--gymgo-radius-sm, 8px);
    background: var(--ggsc-gray-100);
}

/* Details column */
.ggsc-item-details {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Top row: name + trash */
.ggsc-item-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.ggsc-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ggsc-black);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.ggsc-item-remove {
    background: none;
    border: none;
    color: var(--ggsc-gray-300);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}

.ggsc-item-remove:hover {
    color: var(--ggsc-red);
}

/* Trash icon SVG */
.ggsc-item-remove svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.ggsc-item-variation {
    display: inline;
    font-size: 11px;
    color: var(--ggsc-gray-500);
    margin-top: 1px;
}

/* Variation row: value + pencil edit button */
.ggsc-item-variation-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.ggsc-item-edit-attr {
    background: none;
    border: none;
    color: var(--ggsc-gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
    margin: 0px;
}

.ggsc-item-edit-attr:hover {
    color: var(--ggsc-black);
}

/* Bottom row: qty controls + price */
.ggsc-item-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.ggsc-item-qty-row {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ggsc-gray-200);
    border-radius: 4px;
    overflow: hidden;
    height: 24px;
}

.ggsc-qty-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--ggsc-gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
    margin: 0px;
}

.ggsc-qty-btn:hover {
    background: var(--ggsc-gray-100);
}

.ggsc-qty-value {
    width: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
    color: var(--ggsc-black);
}

.ggsc-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--ggsc-black);
    white-space: nowrap;
}

.ggsc-item-price-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.ggsc-item-price-original {
    color: var(--ggsc-gray-400);
    text-decoration: line-through;
    font-weight: 500;
    font-size: 12px;
    margin: 0 0 2px 0;
}

.ggsc-item-price-current {
    color: var(--ggsc-black);
    font-weight: 700;
}

.ggsc-item-price-savings {
    color: var(--ggsc-green);
    font-style: italic;
    font-weight: 700;
    font-size: 11px;
    margin-top: 3px;
    line-height: 1.2;
}

/* ==========================================================================
   Bundle Item Styles (GymGo Product Bundles integration)
   ========================================================================== */

/* Bundle parent styling */
.ggsc-item.ggsc-bundle-parent {
    border-bottom: none;
    padding-bottom: 4px;
}

.ggsc-item.ggsc-bundle-parent .ggsc-item-name {
    font-weight: 800;
}

/* Bundle child items - indented and italic price */
.ggsc-item.ggsc-bundle-child {
    margin-left: 20px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--ggsc-gray-100);
}

.ggsc-item.ggsc-bundle-child .ggsc-item-thumb {
    width: 48px;
    height: 48px;
}

.ggsc-item.ggsc-bundle-child .ggsc-item-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--ggsc-gray-600);
}

.ggsc-item.ggsc-bundle-child .ggsc-item-price {
    font-style: italic;
    font-weight: 500;
    font-size: 12px;
    color: var(--ggsc-gray-500);
}

/* Bundle child quantity indicator */
.ggsc-bundle-qty {
    font-style: normal;
    font-weight: 600;
    margin-left: 4px;
    color: var(--ggsc-gray-400);
}

/* Hide quantity controls and remove button for bundle children */
.ggsc-item.ggsc-bundle-child .ggsc-item-qty-row,
.ggsc-item.ggsc-bundle-child .ggsc-item-remove {
    display: none;
}

/* Bundle edit button (same style as variation edit) */
.ggsc-bundle-edit {
    background: none;
    border: none;
    color: var(--ggsc-gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
    margin: 0px;
}

.ggsc-bundle-edit:hover {
    color: var(--ggsc-black);
}

/* ==========================================================================
   Upsell Block  (yellow-tinted card like reference)
   ========================================================================== */

.ggsc-upsell {
    padding: 0 10px 12px;
    flex-shrink: 0;
}

.ggsc-upsell-card {
    background: var(--ggsc-yellow-bg);
    border: 1px solid var(--ggsc-yellow-border);
    border-radius: 8px;
    padding: 12px;
}

.ggsc-upsell-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--ggsc-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.ggsc-upsell-inner {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 8px;
    align-items: center;
}

.ggsc-upsell-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    grid-column: 1;
    grid-row: 1;
}

.ggsc-upsell-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--gymgo-radius-sm, 8px);
    border: 1px solid var(--ggsc-gray-200);
    background: var(--ggsc-white);
}

.ggsc-upsell-info {
    flex: 1 1 auto;
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
}

.ggsc-upsell-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ggsc-black);
}

.ggsc-upsell-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 11px;
    color: var(--ggsc-black);
    font-weight: 700;
}

.ggsc-upsell-price .ggsc-upsell-suffix {
    font-size: 10px;
    font-weight: 600;
    color: var(--ggsc-gray-500) !important;
    letter-spacing: 0.2px;
}

.ggsc-upsell-saving {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--ggsc-green);
}

.ggsc-upsell-saving-amount {
    text-decoration: underline;
}

.ggsc-upsell-add-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    flex-shrink: 0;
    background-color: var(--ggsc-black);
    color: var(--ggsc-white);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    padding: 6px 10px;
    font-size: 10px;
    border-radius: var(--gymgo-radius-sm, 8px);
    transition: background-color 0.15s;
}

.ggsc-upsell-add-btn:hover {
    background-color: #333;
}

/* Upsell success state (after adding) */
.ggsc-upsell-added {
    background: var(--ggsc-green-light);
    border: 1px solid #bbf7d0;
    border-radius: var(--gymgo-radius-sm, 8px);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ggsc-green);
    font-size: 12px;
    font-weight: 700;
}

/* ==========================================================================
   Footer (gray bg, checkout + outlined view-cart)
   ========================================================================== */

.ggsc-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--ggsc-gray-200);
    flex-shrink: 0;
    margin-top: 0;
    background: var(--ggsc-gray-50);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.ggsc-empty {
    flex: 1 1 auto;
}

.ggsc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
}

.ggsc-total-label {
    font-size: 14px;
    color: var(--ggsc-gray-600);
    font-weight: 500;
}

.ggsc-total-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--ggsc-black);
}

.ggsc-total-savings {
    margin-top: -2px;
    margin-bottom: 8px;
    color: var(--ggsc-green);
    font-size: 12px;
    font-style: italic;
    font-weight: 700;
    text-align: right;
    line-height: 1.2;
}

/* Yellow checkout button */
.ggsc-checkout-btn {
    display: flex;
    width: 100%;
    background-color: var(--ggsc-yellow);
    color: var(--ggsc-black);
    text-transform: uppercase;
    font-family: var(--ggsc-font-heading);
    letter-spacing: 1.5px;
    cursor: pointer;
    border: none;
    padding: 10px 20px;
    font-size: 1.15rem;
    text-align: center;
    text-decoration: none;
    border-radius: var(--gymgo-radius-sm, 8px);
    transition: background-color 0.15s, transform 0.15s;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ggsc-checkout-btn:hover {
    background-color: var(--ggsc-yellow-hover);
    color: var(--ggsc-black);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--gymgo-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

/* Arrow icon in checkout button */
.ggsc-checkout-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    flex-shrink: 0;
    transform: translateX(0);
    animation: ggsc-arrow-nudge 0.8s ease-in-out infinite;
}

@keyframes ggsc-arrow-nudge {
    0%,
    100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(4px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ggsc-checkout-btn svg {
        animation: none;
    }
}

/* Outlined view-cart button */
.ggsc-view-cart-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 6px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ggsc-black);
    text-decoration: none;
    border: 1px solid var(--ggsc-gray-300);
    border-radius: var(--gymgo-radius-sm, 8px);
    background: var(--ggsc-white);
    transition: background-color 0.15s;
}

.ggsc-view-cart-link:hover {
    background-color: var(--ggsc-gray-50);
    color: var(--ggsc-black);
    text-decoration: none;
}

/* Payment icons row */
.ggsc-payment-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.ggsc-payment-icons svg {
    width: 28px;
    height: 20px;
    fill: var(--ggsc-gray-400);
}

/* ==========================================================================
   Empty Cart State
   ========================================================================== */

.ggsc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 60px 20px;
    text-align: center;
    color: var(--ggsc-gray-500);
}

.ggsc-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.ggsc-empty p {
    font-size: 14px;
    margin: 0 0 16px;
    color: var(--ggsc-gray-400);
}

.ggsc-continue-btn {
    display: inline-block;
    background-color: var(--ggsc-yellow);
    color: var(--ggsc-black);
    text-transform: uppercase;
    font-family: var(--ggsc-font-heading);
    letter-spacing: 1px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--gymgo-radius-sm, 8px);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
}

.ggsc-continue-btn:hover {
    background-color: var(--ggsc-yellow-hover);
    color: var(--ggsc-black);
    text-decoration: none;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.ggsc-mini-cart.is-loading .ggsc-items {
    opacity: 0.5;
    pointer-events: none;
}

.ggsc-mini-cart.is-loading .ggsc-footer {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   Attribute Edit Modal
   ========================================================================== */

body.ggsc-modal-open {
    overflow: hidden;
}

.ggsc-attr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ggsc-attr-modal.open {
    display: flex;
}

.ggsc-attr-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ggsc-attr-modal-content {
    position: relative;
    background: var(--ggsc-white);
    width: 100%;
    max-width: 340px;
    max-height: 80vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.ggsc-attr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ggsc-gray-100);
    background: var(--ggsc-black);
    color: var(--ggsc-white);
}

.ggsc-attr-modal-title {
    font-family: var(--ggsc-font-heading);
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.ggsc-attr-modal-close {
    background: none;
    border: none;
    color: var(--ggsc-white);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.ggsc-attr-modal-close:hover {
    opacity: 1;
}

.ggsc-attr-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.ggsc-attr-group {
    margin-bottom: 16px;
}

.ggsc-attr-group:last-child {
    margin-bottom: 0;
}

.ggsc-attr-group-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ggsc-gray-500);
    margin-bottom: 8px;
}

.ggsc-attr-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ggsc-attr-option {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--ggsc-gray-200);
    border-radius: 999px;
    background: var(--ggsc-white);
    color: var(--ggsc-black);
    cursor: pointer;
    transition: all 0.15s;
}

.ggsc-attr-option:hover {
    border-color: var(--ggsc-gray-400);
    background: var(--ggsc-gray-50);
}

.ggsc-attr-option.ggsc-attr-selected {
    background: var(--ggsc-yellow);
    border-color: var(--ggsc-yellow);
    color: var(--ggsc-black);
    font-weight: 700;
}

.ggsc-attr-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--ggsc-gray-100);
}

.ggsc-attr-modal-save {
    display: block;
    width: 100%;
    padding: 10px 20px;
    font-family: var(--ggsc-font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: var(--ggsc-yellow);
    color: var(--ggsc-black);
    border: none;
    border-radius: var(--gymgo-radius-sm, 8px);
    cursor: pointer;
    transition: background-color 0.15s;
}

.ggsc-attr-modal-save:hover {
    background: var(--ggsc-yellow-hover);
}

.ggsc-attr-modal-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Hide default WooCommerce mini-cart elements (safety net)
   ========================================================================== */

.widget_shopping_cart_content .woocommerce-mini-cart,
.widget_shopping_cart_content .woocommerce-mini-cart__total,
.widget_shopping_cart_content .woocommerce-mini-cart__buttons,
.widget_shopping_cart_content .woocommerce-mini-cart__empty-message {
    display: none !important;
}

/* ==========================================================================
   Sticky Footer Hard Override (final specificity guard)
   ========================================================================== */

#cart-popup .widget_shopping_cart_content .ggsc-mini-cart {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
}

#cart-popup .widget_shopping_cart_content .ggsc-body {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#cart-popup .widget_shopping_cart_content .ggsc-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 25 !important;
}

/* Drawer-level scroll lock: parent should NOT scroll, body section should */
.mfp-content.off-canvas-cart,
#cart-popup {
    height: 100dvh !important;
    max-height: 100dvh !important;
}

#cart-popup {
    overflow: hidden !important;
}

#cart-popup .cart-popup-inner,
#cart-popup .cart-popup-inner.inner-padding,
#cart-popup .cart-popup-inner--sticky {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    padding-bottom: 0 !important;
}

#cart-popup .cart-popup-title {
    flex: 0 0 auto !important;
}

#cart-popup .widget_shopping_cart {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

#cart-popup .widget_shopping_cart_content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

#cart-popup .widget_shopping_cart_content .ggsc-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
}
