/**
 * Nexcart Side Cart (Drawer) Styles
 *
 * The drawer is rendered in the footer on every page, so this stylesheet
 * is loaded globally alongside nexcart-public.css. Depends on design
 * tokens declared in nexcart-public.css.
 *
 * Layout: fixed full-height panel sliding from the right with a three-
 * region flex column — sticky header, scrolling item list, sticky
 * footer. Mobile (<600px) takes full width minus a small inset so the
 * backdrop is still visible at the edge.
 *
 * @package Nexcart
 */

/* ================================================================
   BACKDROP OVERLAY
   ================================================================ */

.nexcart-cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: var(--nexcart-bg-backdrop);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--nexcart-duration-slow) var(--nexcart-ease),
        visibility var(--nexcart-duration-slow) var(--nexcart-ease);
    z-index: var(--nexcart-z-backdrop);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nexcart-cart-drawer-overlay.active,
.nexcart-cart-drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ================================================================
   DRAWER PANEL
   ================================================================ */

.nexcart-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    background: var(--nexcart-bg-surface);
    box-shadow: var(--nexcart-shadow-prominent);
    transform: translateX(100%);
    transition: transform var(--nexcart-duration-slow) var(--nexcart-ease);
    z-index: var(--nexcart-z-drawer);
    visibility: hidden;
    font-family: var(--nexcart-font-family);
    color: var(--nexcart-text);
    border-left: 1px solid var(--nexcart-border-subtle);
    will-change: transform;
    overflow: hidden;
}

.nexcart-cart-drawer.open,
.nexcart-cart-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

@media (min-width: 600px) {
    .nexcart-cart-drawer {
        width: 440px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nexcart-cart-drawer,
    .nexcart-cart-drawer-overlay {
        transition: none;
    }
}

/* ================================================================
   HEADER
   ================================================================ */

.nexcart-cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexcart-space-3);
    padding: var(--nexcart-space-5) var(--nexcart-space-6);
    border-bottom: 1px solid var(--nexcart-border-subtle);
    background: var(--nexcart-bg-surface);
    flex-shrink: 0;
}

.nexcart-cart-drawer-heading {
    display: flex;
    align-items: center;
    gap: var(--nexcart-space-2);
    min-width: 0;
}

.nexcart-cart-drawer-title {
    font-size: var(--nexcart-font-size-lg);
    font-weight: var(--nexcart-font-weight-bold);
    color: var(--nexcart-text);
    letter-spacing: var(--nexcart-letter-spacing-tight);
    margin: 0;
    line-height: 1.2;
}

.nexcart-cart-drawer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: var(--nexcart-font-size-xs);
    font-weight: var(--nexcart-font-weight-semibold);
    color: var(--nexcart-accent-foreground);
    background: var(--nexcart-accent);
    border-radius: var(--nexcart-radius-pill);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.nexcart-cart-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--nexcart-touch-target);
    height: var(--nexcart-touch-target);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--nexcart-radius-pill);
    color: var(--nexcart-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition:
        background var(--nexcart-duration-base) var(--nexcart-ease),
        color var(--nexcart-duration-base) var(--nexcart-ease);
    -webkit-appearance: none;
    appearance: none;
    font-size: 0;
    padding: 0;
}

.nexcart-cart-drawer-close:hover,
.nexcart-cart-drawer-close:focus-visible {
    background: var(--nexcart-accent-soft);
    color: var(--nexcart-text);
}

.nexcart-cart-drawer-close:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: var(--nexcart-shadow-focus);
}

.nexcart-cart-drawer-close svg {
    width: 18px;
    height: 18px;
}

/* ================================================================
   FREE-SHIPPING PROGRESS BANNER
   ================================================================ */

.nexcart-cart-drawer-shipping {
    flex-shrink: 0;
    padding: var(--nexcart-space-3) var(--nexcart-space-6);
    background: var(--nexcart-bg-surface-alt);
    border-bottom: 1px solid var(--nexcart-border-subtle);
    display: flex;
    flex-direction: column;
    gap: var(--nexcart-space-2);
}

.nexcart-cart-drawer-shipping.is-unlocked {
    background: var(--nexcart-success-bg);
    color: var(--nexcart-success-fg);
}

.nexcart-cart-drawer-shipping-text {
    margin: 0;
    font-size: var(--nexcart-font-size-xs);
    color: var(--nexcart-text-muted);
    display: flex;
    align-items: center;
    gap: var(--nexcart-space-2);
    line-height: 1.4;
}

.nexcart-cart-drawer-shipping.is-unlocked .nexcart-cart-drawer-shipping-text {
    color: var(--nexcart-success-fg);
    font-weight: var(--nexcart-font-weight-semibold);
}

.nexcart-cart-drawer-shipping-text strong {
    color: var(--nexcart-text);
    font-weight: var(--nexcart-font-weight-semibold);
}

.nexcart-cart-drawer-shipping-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--nexcart-text-muted);
}

.nexcart-cart-drawer-shipping.is-unlocked .nexcart-cart-drawer-shipping-icon {
    color: var(--nexcart-success-accent);
}

.nexcart-cart-drawer-shipping-icon svg {
    width: 16px;
    height: 16px;
}

.nexcart-cart-drawer-shipping-bar {
    position: relative;
    height: 6px;
    border-radius: var(--nexcart-radius-pill);
    background: var(--nexcart-border-subtle);
    overflow: hidden;
}

.nexcart-cart-drawer-shipping-bar-fill {
    display: block;
    height: 100%;
    background: var(--nexcart-accent);
    border-radius: var(--nexcart-radius-pill);
    transition: width var(--nexcart-duration-slow) var(--nexcart-ease);
}

.nexcart-cart-drawer-shipping.is-unlocked .nexcart-cart-drawer-shipping-bar-fill {
    background: var(--nexcart-success-accent);
}

/* ================================================================
   ITEMS SCROLL AREA
   ================================================================ */

.nexcart-cart-drawer-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--nexcart-space-2) 0;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: var(--nexcart-border-strong) transparent;
    overscroll-behavior: contain;
}

.nexcart-cart-drawer-items::-webkit-scrollbar {
    width: 6px;
}

.nexcart-cart-drawer-items::-webkit-scrollbar-thumb {
    background: var(--nexcart-border-strong);
    border-radius: var(--nexcart-radius-pill);
}

.nexcart-cart-drawer-items::-webkit-scrollbar-track {
    background: transparent;
}

/* ================================================================
   ITEM ROW
   ================================================================ */

.nexcart-cart-drawer-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: var(--nexcart-space-4);
    padding: var(--nexcart-space-4) var(--nexcart-space-6);
    border-bottom: 1px solid var(--nexcart-border-subtle);
    border-left: 2px solid transparent;
    transition:
        opacity var(--nexcart-duration-slow) var(--nexcart-ease),
        transform var(--nexcart-duration-slow) var(--nexcart-ease),
        background var(--nexcart-duration-base) var(--nexcart-ease),
        border-left-color var(--nexcart-duration-base) var(--nexcart-ease);
    position: relative;
}

.nexcart-cart-drawer-item:hover {
    border-left-color: var(--nexcart-accent);
    background: var(--nexcart-bg-surface-alt);
}

.nexcart-cart-drawer-item:last-child {
    border-bottom: none;
}

.nexcart-cart-drawer-item.is-removing {
    opacity: 0;
    transform: translateX(40px);
    pointer-events: none;
}

/* Pulse target duration is intentionally 2s — long enough to catch the
   shopper's eye after the drawer slide-in, short enough to not fight
   other interactions. The prefers-reduced-motion override in
   nexcart-public.css collapses animation-duration globally, so the
   literal `2s` here is not bypassed under reduced motion. */
.nexcart-cart-drawer-item.is-just-added {
    animation: nexcart-cart-drawer-item-pulse 2s var(--nexcart-ease) 1;
}

@keyframes nexcart-cart-drawer-item-pulse {
    0%   { background-color: var(--nexcart-accent-soft); }
    100% { background-color: transparent; }
}

.nexcart-cart-drawer-item.is-updating {
    opacity: 0.6;
    pointer-events: none;
}

.nexcart-cart-drawer-item-thumb {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: var(--nexcart-radius-md);
    overflow: hidden;
    background: var(--nexcart-bg-surface-alt);
    border: 1px solid var(--nexcart-border-subtle);
    flex-shrink: 0;
    text-decoration: none;
    transition: transform var(--nexcart-duration-base) var(--nexcart-ease);
}

.nexcart-cart-drawer-item-thumb:hover {
    transform: scale(1.02);
}

.nexcart-cart-drawer-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nexcart-cart-drawer-item-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nexcart-text-subtle);
}

.nexcart-cart-drawer-item-thumb-placeholder svg {
    width: 28px;
    height: 28px;
}

.nexcart-cart-drawer-item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--nexcart-space-1);
}

.nexcart-cart-drawer-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--nexcart-space-2);
    min-width: 0;
}

.nexcart-cart-drawer-item-name {
    font-size: var(--nexcart-font-size-sm);
    font-weight: var(--nexcart-font-weight-semibold);
    color: var(--nexcart-text);
    line-height: var(--nexcart-line-height-snug);
    letter-spacing: var(--nexcart-letter-spacing-tight);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    flex: 1 1 auto;
    min-width: 0;
}

a.nexcart-cart-drawer-item-name:hover {
    color: var(--nexcart-text-link-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nexcart-cart-drawer-item-variant {
    font-size: var(--nexcart-font-size-xs);
    color: var(--nexcart-text-muted);
    line-height: var(--nexcart-line-height-snug);
}

.nexcart-cart-drawer-item-unit {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: var(--nexcart-font-size-xs);
    color: var(--nexcart-text-muted);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.nexcart-cart-drawer-item-unit-label {
    color: var(--nexcart-text-subtle);
}

.nexcart-cart-drawer-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--nexcart-text-subtle);
    border-radius: var(--nexcart-radius-pill);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
    transition:
        background var(--nexcart-duration-base) var(--nexcart-ease),
        color var(--nexcart-duration-base) var(--nexcart-ease);
    -webkit-appearance: none;
    appearance: none;
}

.nexcart-cart-drawer-item-remove:hover,
.nexcart-cart-drawer-item-remove:focus-visible {
    background: var(--nexcart-error-bg);
    color: var(--nexcart-error-accent);
}

.nexcart-cart-drawer-item-remove:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: var(--nexcart-shadow-focus-error);
}

.nexcart-cart-drawer-item-remove svg {
    width: 14px;
    height: 14px;
}

.nexcart-cart-drawer-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexcart-space-3);
    margin-top: var(--nexcart-space-2);
}

/* ----------------------------------------------------------------
   Drawer-scoped quantity stepper

   The base .nexcart-qty-stepper / .nexcart-qty-btn / .nexcart-qty-input
   rules live in nexcart-cart-page.css, which is only enqueued on the
   cart page. The drawer renders globally, so the theme's default
   button/input styles would bleed through (chunky coloured buttons,
   native number-input spinners). Every property here is therefore
   fully qualified with !important where the theme commonly overrides,
   and all selectors are scoped under .nexcart-cart-drawer so these
   rules never leak into other surfaces.
   ---------------------------------------------------------------- */

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty.nexcart-qty-stepper {
    display: inline-flex !important;
    align-items: stretch !important;
    height: 40px !important;
    border: 1px solid var(--nexcart-border-strong) !important;
    border-radius: var(--nexcart-radius-pill) !important;
    background: var(--nexcart-bg-surface) !important;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 !important;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
    font-family: var(--nexcart-font-family);
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-btn {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    color: var(--nexcart-text) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 1 !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none !important;
    text-shadow: none !important;
    transition: background var(--nexcart-duration-base) var(--nexcart-ease),
                color var(--nexcart-duration-base) var(--nexcart-ease);
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-btn:hover {
    background: var(--nexcart-accent-soft) !important;
    color: var(--nexcart-text) !important;
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-btn:active {
    background: var(--nexcart-border-subtle) !important;
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-btn:focus-visible {
    outline: 2px solid transparent;
    outline-offset: -2px;
    background: var(--nexcart-accent-soft) !important;
    box-shadow: inset 0 0 0 2px var(--nexcart-border-focus) !important;
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-btn[disabled],
.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-btn:disabled {
    color: var(--nexcart-text-disabled) !important;
    cursor: not-allowed;
    background: transparent !important;
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-btn svg {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
    fill: none;
    stroke: currentColor;
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-input {
    flex: 0 0 auto !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 64px !important;
    height: 100% !important;
    padding: 0 2px !important;
    margin: 0 !important;
    border: none !important;
    border-left: 1px solid var(--nexcart-border-strong) !important;
    border-right: 1px solid var(--nexcart-border-strong) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--nexcart-text) !important;
    font-family: var(--nexcart-font-numeric) !important;
    font-size: var(--nexcart-font-size-base) !important;
    font-weight: var(--nexcart-font-weight-semibold) !important;
    font-variant-numeric: tabular-nums;
    text-align: center !important;
    box-shadow: none !important;
    line-height: 1 !important;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}

/* Hide native number-input spinner arrows in every browser. */
.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-input::-webkit-outer-spin-button,
.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.nexcart-cart-drawer .nexcart-cart-drawer-item-qty .nexcart-qty-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--nexcart-border-focus) !important;
}

.nexcart-cart-drawer-item-price {
    font-size: var(--nexcart-font-size-base);
    font-weight: var(--nexcart-font-weight-semibold);
    color: var(--nexcart-text);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
    letter-spacing: var(--nexcart-letter-spacing-tight);
}

/* Narrow drawer fallback (tiny phones). */
@media (max-width: 359px) {
    .nexcart-cart-drawer-item {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: var(--nexcart-space-3);
        padding: var(--nexcart-space-3) var(--nexcart-space-4);
    }
    .nexcart-cart-drawer-item-thumb {
        width: 68px;
        height: 68px;
    }
    .nexcart-cart-drawer-header,
    .nexcart-cart-drawer-shipping,
    .nexcart-cart-drawer-footer {
        padding-left: var(--nexcart-space-4);
        padding-right: var(--nexcart-space-4);
    }
}

/* ================================================================
   EMPTY STATE
   ================================================================ */

.nexcart-cart-drawer-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--nexcart-space-9) var(--nexcart-space-6);
    gap: var(--nexcart-space-4);
}

.nexcart-cart-drawer-empty-illustration {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--nexcart-bg-surface-alt);
    color: var(--nexcart-text-subtle);
    margin-bottom: var(--nexcart-space-2);
}

.nexcart-cart-drawer-empty-illustration svg {
    width: 48px;
    height: 48px;
}

.nexcart-cart-drawer-empty-title {
    font-size: var(--nexcart-font-size-lg);
    font-weight: var(--nexcart-font-weight-semibold);
    color: var(--nexcart-text);
    margin: 0;
    letter-spacing: var(--nexcart-letter-spacing-tight);
}

.nexcart-cart-drawer-empty-desc {
    font-size: var(--nexcart-font-size-sm);
    color: var(--nexcart-text-muted);
    margin: 0;
    max-width: 32ch;
    line-height: var(--nexcart-line-height-snug);
}

.nexcart-cart-drawer-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--nexcart-space-2);
    margin-top: var(--nexcart-space-3);
    padding: 0 var(--nexcart-space-6);
    height: var(--nexcart-button-height);
    background: var(--nexcart-accent);
    color: var(--nexcart-accent-foreground);
    border: 1px solid var(--nexcart-accent);
    border-radius: var(--nexcart-radius-md);
    text-decoration: none;
    font-size: var(--nexcart-font-size-sm);
    font-weight: var(--nexcart-font-weight-semibold);
    transition:
        background var(--nexcart-duration-base) var(--nexcart-ease),
        transform var(--nexcart-duration-fast) var(--nexcart-ease);
}

.nexcart-cart-drawer-empty-cta:hover,
.nexcart-cart-drawer-empty-cta:focus-visible {
    background: var(--nexcart-accent-hover);
    color: var(--nexcart-accent-foreground);
    text-decoration: none;
}

.nexcart-cart-drawer-empty-cta:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: var(--nexcart-shadow-focus);
}

.nexcart-cart-drawer-empty-cta:active {
    transform: translateY(1px);
}

.nexcart-cart-drawer-empty-cta svg {
    width: 16px;
    height: 16px;
    transition: transform var(--nexcart-duration-base) var(--nexcart-ease);
}

.nexcart-cart-drawer-empty-cta:hover svg {
    transform: translateX(3px);
}

/* ================================================================
   FOOTER
   ================================================================ */

.nexcart-cart-drawer-footer {
    flex-shrink: 0;
    padding: var(--nexcart-space-4) var(--nexcart-space-6) var(--nexcart-space-5);
    background: var(--nexcart-bg-surface-alt);
    border-top: 1px solid var(--nexcart-border-subtle);
    display: flex;
    flex-direction: column;
    gap: var(--nexcart-space-3);
    box-shadow: var(--nexcart-shadow-elevated-up);
}

.nexcart-cart-drawer-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nexcart-cart-drawer-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--nexcart-space-3);
}

.nexcart-cart-drawer-summary-row[hidden] {
    display: none;
}

.nexcart-cart-drawer-summary-label {
    color: var(--nexcart-text);
    font-size: var(--nexcart-font-size-base);
    font-weight: var(--nexcart-font-weight-semibold);
}

.nexcart-cart-drawer-summary-row--line .nexcart-cart-drawer-summary-label,
.nexcart-cart-drawer-summary-row--line .nexcart-cart-drawer-summary-value {
    font-size: var(--nexcart-font-size-base);
    font-weight: var(--nexcart-font-weight-medium);
    color: var(--nexcart-text-muted);
}

.nexcart-cart-drawer-summary-row--discount .nexcart-discount-value {
    color: var(--nexcart-success-accent);
}

.nexcart-cart-drawer-summary-row--total {
    margin-top: 2px;
    padding-top: var(--nexcart-space-2);
    border-top: 1px solid var(--nexcart-border-subtle, rgba(0, 0, 0, 0.08));
}

.nexcart-cart-drawer-summary-value,
.nexcart-cart-drawer-summary-row .nexcart-total-value {
    font-size: var(--nexcart-font-size-xl);
    font-weight: var(--nexcart-font-weight-bold);
    font-variant-numeric: tabular-nums;
    color: var(--nexcart-text);
    letter-spacing: var(--nexcart-letter-spacing-tight);
}

.nexcart-cart-drawer-summary-row--total .nexcart-cart-drawer-summary-value,
.nexcart-cart-drawer-summary-row--total .nexcart-total-value {
    font-size: calc(var(--nexcart-font-size-xl) * 1.12);
    letter-spacing: -0.015em;
}

.nexcart-cart-drawer-summary-row--total .nexcart-cart-drawer-summary-label {
    font-size: var(--nexcart-font-size-md);
    letter-spacing: 0.01em;
}

.nexcart-cart-drawer-summary-note {
    margin: 0;
    font-size: var(--nexcart-font-size-xs);
    color: var(--nexcart-text-muted);
    line-height: var(--nexcart-line-height-snug);
}

.nexcart-cart-drawer-checkout {
    width: 100%;
    min-height: var(--nexcart-button-height-lg);
    font-size: var(--nexcart-font-size-md);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexcart-space-3);
    padding: 0 var(--nexcart-space-5);
    background: var(--nexcart-accent);
    color: var(--nexcart-accent-foreground);
    border: 1px solid var(--nexcart-accent);
    border-radius: var(--nexcart-radius-pill);
    text-decoration: none;
    font-weight: var(--nexcart-font-weight-semibold);
    letter-spacing: 0.02em;
    transition:
        background var(--nexcart-duration-base) var(--nexcart-ease),
        transform var(--nexcart-duration-fast) var(--nexcart-ease),
        box-shadow var(--nexcart-duration-base) var(--nexcart-ease);
    box-shadow: var(--nexcart-shadow-subtle);
}

.nexcart-cart-drawer-checkout > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: var(--nexcart-space-2);
}

.nexcart-cart-drawer-checkout > span:first-child::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><path d='M6 8V6a4 4 0 0 1 8 0v2M4 8h12v9H4z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><path d='M6 8V6a4 4 0 0 1 8 0v2M4 8h12v9H4z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/></svg>");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    opacity: 0.9;
}

.nexcart-cart-drawer-checkout-total {
    font-variant-numeric: tabular-nums;
    opacity: 0.95;
}

.nexcart-cart-drawer-checkout:hover,
.nexcart-cart-drawer-checkout:focus-visible {
    background: var(--nexcart-accent-hover);
    color: var(--nexcart-accent-foreground);
    box-shadow: var(--nexcart-shadow-prominent);
    transform: translateY(-1px);
    text-decoration: none;
}

.nexcart-cart-drawer-checkout:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: var(--nexcart-shadow-focus);
}

.nexcart-cart-drawer-checkout:active {
    transform: translateY(1px);
    background: var(--nexcart-accent-active);
}

/* ================================================================
   EXPRESS CHECKOUT (PayPal / Apple Pay / Google Pay)
   ================================================================ */

.nexcart-cart-drawer-express-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--nexcart-space-2);
    position: relative;
}

.nexcart-cart-drawer-express-label {
    position: relative;
    display: block;
    text-align: center;
    font-size: var(--nexcart-font-size-xs);
    color: var(--nexcart-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--nexcart-letter-spacing-wide);
    font-weight: var(--nexcart-font-weight-medium);
    padding: var(--nexcart-space-1) 0;
}

.nexcart-cart-drawer-express-label::before,
.nexcart-cart-drawer-express-label::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 70px);
    height: 1px;
    background: var(--nexcart-border-subtle);
}

.nexcart-cart-drawer-express-label::before { left: 0; }
.nexcart-cart-drawer-express-label::after  { right: 0; }

.nexcart-cart-drawer-express {
    display: flex;
    flex-direction: column;
    gap: var(--nexcart-space-2);
    min-height: 45px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.nexcart-cart-drawer-express > div[id^="nexcart-drawer-express-"] {
    display: block;
    width: 100%;
    min-height: 45px;
    box-sizing: border-box;
}

/* ================================================================
   TRUST BADGES
   ================================================================ */

.nexcart-cart-drawer-trust {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--nexcart-space-3);
    padding-top: var(--nexcart-space-3);
    border-top: 1px solid var(--nexcart-border-subtle);
}

.nexcart-cart-drawer-trust-lines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--nexcart-space-5);
    flex-wrap: wrap;
}

.nexcart-cart-drawer-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--nexcart-font-size-xs);
    color: var(--nexcart-text-muted);
    font-weight: var(--nexcart-font-weight-medium);
}

.nexcart-cart-drawer-trust-item svg {
    width: 14px;
    height: 14px;
    color: var(--nexcart-success-accent);
}

.nexcart-cart-drawer-trust-payments {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nexcart-cart-drawer-trust-payments .nexcart-trust-payment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 20px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--nexcart-bg-surface);
    box-shadow: inset 0 0 0 1px var(--nexcart-border-subtle);
}

.nexcart-cart-drawer-trust-payments .nexcart-trust-payment svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ================================================================
   VIEW FULL CART LINK
   ================================================================ */

.nexcart-cart-drawer-view-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--nexcart-text-muted);
    font-size: var(--nexcart-font-size-xs);
    font-weight: var(--nexcart-font-weight-medium);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-align: center;
    transition: color var(--nexcart-duration-base) var(--nexcart-ease);
}

.nexcart-cart-drawer-view-cart:hover,
.nexcart-cart-drawer-view-cart:focus-visible {
    color: var(--nexcart-text);
}

.nexcart-cart-drawer-divider {
    margin: var(--nexcart-space-2) 0 0;
}
