/**
 * Annaver Checkout Restyling
 * Overrides Luma checkout to match jewelry theme design language.
 * All rules scoped with .checkout-index-index body class.
 *
 * NOTE: Luma sets html { font-size: 10px } (62.5% technique).
 * All sizes use px to avoid rem miscalculation.
 */

/* ============================================================
   FONTS & CSS VARIABLES
   ============================================================ */

@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/Satoshi-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/Satoshi-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.checkout-index-index {
    --av-primary: #181818;
    --av-bg: #f9f9f9;
    --av-fg: #424242;
    --av-secondary: #e8e8e8;
    --av-white: #ffffff;
    --av-border: #e6e6e6;
    --av-radius-input: 4px;
    --av-radius-card: 12px;
    --av-font: 'Satoshi', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   PAGE BACKGROUND & TYPOGRAPHY
   ============================================================ */

.checkout-index-index {
    background-color: var(--av-bg);
}

/* Fix mobile horizontal scroll caused by Luma slide-in modals.
   Root cause: .modal-inner-wrap uses transform:translateX(100%) to park off-screen
   when closed, creating an invisible 331px-wide area beyond viewport.
   iOS Safari detects this for rubber-band horizontal bounce.
   Fix: collapse closed modal containers so iOS Safari ignores them for layout. */
.checkout-index-index .custom-slide:not(._show),
.checkout-index-index .modal-slide:not(._show) {
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}
.checkout-index-index .custom-slide:not(._show) .modal-inner-wrap,
.checkout-index-index .modal-slide:not(._show) .modal-inner-wrap {
    display: none !important;
    transform: none !important;
}
.checkout-index-index,
.checkout-cart-index {
    overflow-x: clip;
    overscroll-behavior-x: none;
}
:is(.checkout-index-index, .checkout-cart-index) .page-wrapper {
    overflow-x: clip;
}

.checkout-index-index body,
.checkout-index-index .page-wrapper,
.checkout-index-index .opc-wrapper,
.checkout-index-index .checkout-container {
    font-family: var(--av-font);
    color: var(--av-fg);
    font-size: 14px;
}

.checkout-index-index h1,
.checkout-index-index h2,
.checkout-index-index h3,
.checkout-index-index h4,
.checkout-index-index .step-title {
    font-family: var(--av-font);
    color: var(--av-primary);
    font-weight: 700;
}

.checkout-index-index .page-title-wrapper .page-title {
    font-family: var(--av-font);
    font-weight: 700;
    color: var(--av-primary);
    font-size: 28px;
    margin-bottom: 24px;
}

/* ============================================================
   HEADER (Luma checkout header)
   ============================================================ */

.checkout-index-index .page-header {
    background-color: var(--av-white);
    border-bottom: 1px solid var(--av-border);
    box-shadow: none;
    margin-bottom: 0;
}

.checkout-index-index .page-header .header.content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.checkout-index-index .page-header .logo {
    float: none;
    margin: 0;
}

.checkout-index-index .page-header .logo img {
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Move "Sign in" link to absolute right so logo stays centered */
.checkout-index-index .page-header .authentication-wrapper {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.checkout-index-index .opc-progress-bar {
    margin: 0 0 32px;
    padding: 0;
    text-align: center;
    counter-reset: none;
}

.checkout-index-index .opc-progress-bar-item {
    margin: 0 16px 0 0;
    width: auto;
}

/* Hide Luma horizontal track bar on items */
.checkout-index-index .opc-progress-bar-item:before {
    display: none !important;
}

.checkout-index-index .opc-progress-bar-item > span {
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 14px;
    color: var(--av-fg);
    padding-top: 0;
}

/* Hide Luma numbered circle (before) */
.checkout-index-index .opc-progress-bar-item > span:before {
    display: none !important;
}

/* Replace Luma circle (after) with minimal underline */
.checkout-index-index .opc-progress-bar-item > span:after {
    content: '' !important;
    display: block;
    position: static;
    width: 100%;
    height: 2px;
    background: var(--av-border);
    margin-top: 8px;
    border-radius: 1px;
    border: none;
    font-family: inherit;
}

.checkout-index-index .opc-progress-bar-item._active > span {
    color: var(--av-primary);
    font-weight: 700;
}

.checkout-index-index .opc-progress-bar-item._active:before {
    display: none !important;
}

.checkout-index-index .opc-progress-bar-item._active > span:before {
    display: none !important;
}

.checkout-index-index .opc-progress-bar-item._active > span:after {
    background: var(--av-primary) !important;
    border-color: var(--av-primary) !important;
    content: '' !important;
    font-family: inherit !important;
}

.checkout-index-index .opc-progress-bar-item._complete > span {
    color: var(--av-primary);
}

.checkout-index-index .opc-progress-bar-item._complete:before {
    display: none !important;
}

.checkout-index-index .opc-progress-bar-item._complete > span:before {
    display: none !important;
}

.checkout-index-index .opc-progress-bar-item._complete > span:after {
    background: var(--av-primary) !important;
    border-color: var(--av-primary) !important;
    content: '' !important;
    font-family: inherit !important;
}

/* ============================================================
   STEP TITLES
   ============================================================ */

.checkout-index-index .step-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--av-primary);
    border-bottom: 1px solid var(--av-border);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* Override Luma's .step-title font-size (2.6rem = 26px) with our value */
.checkout-index-index .opc-wrapper .step-title,
.checkout-index-index .opc-block-shipping-information .shipping-information-title,
.checkout-index-index .checkout-agreements-items .checkout-agreements-item-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--av-primary);
}

/* ============================================================
   FORM INPUTS
   ============================================================ */

.checkout-index-index input[type="text"],
.checkout-index-index input[type="email"],
.checkout-index-index input[type="tel"],
.checkout-index-index input[type="password"],
.checkout-index-index input[type="number"],
.checkout-index-index input[type="url"],
.checkout-index-index textarea,
.checkout-index-index select {
    font-family: var(--av-font);
    height: 48px;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-input);
    padding: 0 14px;
    font-size: 16px; /* must be >=16px to prevent iOS Safari auto-zoom on focus */
    color: var(--av-primary);
    background-color: var(--av-white);
    box-shadow: none;
    transition: border-color 0.15s ease;
}

.checkout-index-index textarea {
    height: auto;
    padding: 12px 14px;
    min-height: 80px;
}

.checkout-index-index select {
    padding-right: 36px;
}

.checkout-index-index input[type="text"]:focus,
.checkout-index-index input[type="email"]:focus,
.checkout-index-index input[type="tel"]:focus,
.checkout-index-index input[type="password"]:focus,
.checkout-index-index input[type="number"]:focus,
.checkout-index-index input[type="url"]:focus,
.checkout-index-index textarea:focus,
.checkout-index-index select:focus {
    border-color: var(--av-primary);
    box-shadow: 0 0 0 1px var(--av-primary);
    outline: none;
}

.checkout-index-index .field .label {
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 14px;
    color: var(--av-fg);
    margin-bottom: 6px;
}

.checkout-index-index .field .control._with-tooltip input {
    width: 100%;
}

/* Placeholder */
.checkout-index-index input::placeholder,
.checkout-index-index textarea::placeholder {
    color: #999;
    font-weight: 400;
}

/* Field note / error messages */
.checkout-index-index .field-error,
.checkout-index-index div.mage-error {
    font-family: var(--av-font);
    font-size: 12px;
    color: #d32f2f;
    margin-top: 4px;
}

/* ============================================================
   RADIO BUTTONS & CHECKBOXES
   ============================================================ */

.checkout-index-index input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--av-border);
    border-radius: 50%;
    background: var(--av-white);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0 10px 0 0;
    transition: border-color 0.15s ease;
}

.checkout-index-index input[type="radio"]:checked {
    border-color: var(--av-primary);
}

.checkout-index-index input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--av-primary);
}

.checkout-index-index input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--av-border);
    border-radius: var(--av-radius-input);
    background: var(--av-white);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0 10px 0 0;
    transition: border-color 0.15s ease;
}

.checkout-index-index input[type="checkbox"]:checked {
    border-color: var(--av-primary);
    background: var(--av-primary);
}

.checkout-index-index input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid var(--av-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.checkout-index-index .action.primary,
.checkout-index-index button.action.primary {
    font-family: var(--av-font);
    background-color: var(--av-primary);
    border: 1px solid var(--av-primary);
    color: var(--av-white);
    border-radius: var(--av-radius-input);
    height: 48px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    box-shadow: none;
}

.checkout-index-index .action.primary:hover,
.checkout-index-index button.action.primary:hover {
    background-color: var(--av-primary);
    border-color: var(--av-primary);
    opacity: 0.85;
}

.checkout-index-index .action.primary:active,
.checkout-index-index button.action.primary:active {
    opacity: 0.7;
}

.checkout-index-index .action.secondary,
.checkout-index-index button.action.secondary,
.checkout-index-index .action-update,
.checkout-index-index .action-cancel {
    font-family: var(--av-font);
    background-color: var(--av-secondary);
    border: 1px solid var(--av-secondary);
    color: var(--av-primary);
    border-radius: var(--av-radius-input);
    height: 48px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 500;
    text-transform: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    box-shadow: none;
}

.checkout-index-index .action.secondary:hover,
.checkout-index-index button.action.secondary:hover,
.checkout-index-index .action-update:hover,
.checkout-index-index .action-cancel:hover {
    opacity: 0.85;
}

/* Continue / Place Order buttons full width on mobile */
.checkout-index-index .actions-toolbar .primary button {
    width: 100%;
}

/* ============================================================
   ORDER SUMMARY SIDEBAR
   ============================================================ */

.checkout-index-index .opc-block-summary {
    background: var(--av-white) !important;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-card);
    padding: 24px;
    box-shadow: none;
}

.checkout-index-index .opc-block-summary > .title {
    font-family: var(--av-font);
    font-weight: 700;
    font-size: 20px;
    color: var(--av-primary);
    border-bottom: 1px solid var(--av-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.checkout-index-index .opc-block-summary .items-in-cart > .title {
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 15px;
    color: var(--av-fg);
    border-top: 1px solid var(--av-border);
    padding-top: 12px;
}

.checkout-index-index .opc-block-summary .items-in-cart > .title strong {
    font-size: 15px;
    font-weight: 500;
}

.checkout-index-index .opc-block-summary .minicart-items .product-item-name {
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 14px;
    color: var(--av-primary);
}

.checkout-index-index .opc-block-summary .product-image-container {
    border-radius: var(--av-radius-input);
    overflow: hidden;
}

/* ============================================================
   TOTALS
   ============================================================ */

.checkout-index-index .table-totals {
    font-family: var(--av-font);
}

.checkout-index-index .table-totals .mark,
.checkout-index-index .table-totals .amount {
    font-size: 14px;
    padding: 6px 0;
    color: var(--av-fg);
}

.checkout-index-index .table-totals .grand.totals {
    border-top: 1px solid var(--av-border);
}

.checkout-index-index .table-totals .grand.totals .mark,
.checkout-index-index .table-totals .grand.totals .amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--av-primary);
    padding-top: 12px;
}

.checkout-index-index .table-totals .grand.totals .mark strong {
    font-weight: 700;
}

/* ============================================================
   SHIPPING ADDRESS CARDS
   ============================================================ */

.checkout-index-index .shipping-address-item {
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-card);
    padding: 16px;
    margin-bottom: 12px;
    background: var(--av-white);
    font-family: var(--av-font);
    font-size: 14px;
    color: var(--av-fg);
    transition: border-color 0.15s ease;
}

.checkout-index-index .shipping-address-item.selected-item {
    border-color: var(--av-primary);
    border-width: 2px;
}

.checkout-index-index .shipping-address-item .action.action-select-shipping-item {
    font-family: var(--av-font);
    background: var(--av-secondary);
    border: none;
    border-radius: var(--av-radius-input);
    color: var(--av-primary);
    font-weight: 500;
    font-size: 13px;
    padding: 8px 20px;
    height: auto;
    margin-top: 8px;
}

/* ============================================================
   SHIPPING METHODS TABLE
   ============================================================ */

.checkout-index-index .table-checkout-shipping-method {
    font-family: var(--av-font);
    width: 100%;
}

.checkout-index-index .table-checkout-shipping-method tbody tr {
    border-bottom: 1px solid var(--av-border);
}

.checkout-index-index .table-checkout-shipping-method tbody td {
    padding: 14px 10px;
    font-size: 14px;
    color: var(--av-fg);
    vertical-align: middle;
}

.checkout-index-index .table-checkout-shipping-method .col-method {
    font-weight: 500;
}

.checkout-index-index .table-checkout-shipping-method .col-price {
    font-weight: 700;
    color: var(--av-primary);
}

/* ============================================================
   PAYMENT METHODS
   ============================================================ */

.checkout-index-index .payment-method {
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-card);
    margin-bottom: 12px;
    overflow: hidden;
}

.checkout-index-index .payment-method._active {
    border-color: var(--av-primary);
}

.checkout-index-index .payment-method-title {
    padding: 16px;
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 15px;
    color: var(--av-primary);
    border-bottom: none;
}

.checkout-index-index .payment-method._active .payment-method-title {
    border-bottom: 1px solid var(--av-border);
}

.checkout-index-index .payment-method-content {
    padding: 16px;
    background: var(--av-white);
    font-size: 14px;
}

.checkout-index-index .payment-method-billing-address {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--av-border);
}

/* Place order button in payment */
.checkout-index-index .payment-method .action.primary.checkout {
    margin-top: 16px;
}

/* ============================================================
   DISCOUNT / COUPON
   ============================================================ */

.checkout-index-index .payment-option-title {
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 15px;
    color: var(--av-primary);
    padding: 12px 0;
    border-top: 1px solid var(--av-border);
}

.checkout-index-index .payment-option-content {
    padding-bottom: 16px;
}

.checkout-index-index .payment-option-inner .action-apply {
    font-family: var(--av-font);
    background: var(--av-primary);
    color: var(--av-white);
    border: none;
    border-radius: var(--av-radius-input);
    font-weight: 700;
    font-size: 14px;
    height: 48px;
    padding: 0 24px;
}

/* ============================================================
   MODALS (Luma modals on checkout)
   ============================================================ */

.checkout-index-index .modal-inner-wrap {
    border-radius: var(--av-radius-card);
    font-family: var(--av-font);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.checkout-index-index .modal-header {
    border-bottom: 1px solid var(--av-border);
    padding: 20px 24px;
}

.checkout-index-index .modal-header .modal-title {
    font-family: var(--av-font);
    font-weight: 700;
    font-size: 20px;
    color: var(--av-primary);
}

.checkout-index-index .modal-content {
    padding: 24px;
    font-family: var(--av-font);
    font-size: 14px;
    color: var(--av-fg);
}

.checkout-index-index .modal-footer {
    border-top: 1px solid var(--av-border);
    padding: 16px 24px;
}

/* ============================================================
   LOADER
   ============================================================ */

.checkout-index-index .loading-mask {
    background: rgba(249, 249, 249, 0.7);
}

/* ============================================================
   AUTHENTICATION POPUP
   ============================================================ */

.checkout-index-index .authentication-wrapper {
    font-family: var(--av-font);
}

.checkout-index-index .authentication-wrapper .action-auth-toggle {
    font-family: var(--av-font);
    color: var(--av-primary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: underline;
}

.checkout-index-index .block-authentication {
    border-radius: var(--av-radius-card);
    border: 1px solid var(--av-border);
    background: var(--av-white);
}

/* ============================================================
   TOOLTIP
   ============================================================ */

.checkout-index-index .field-tooltip .field-tooltip-content {
    font-family: var(--av-font);
    font-size: 13px;
    background: var(--av-primary);
    color: var(--av-white);
    border-radius: var(--av-radius-input);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   ESTIMATED TOTALS (mobile)
   ============================================================ */

.checkout-index-index .opc-estimated-wrapper {
    font-family: var(--av-font);
    font-size: 14px;
    background: var(--av-white);
    border-bottom: 1px solid var(--av-border);
    padding: 12px 16px;
}

.checkout-index-index .opc-estimated-wrapper .estimated-label {
    font-weight: 500;
    color: var(--av-fg);
}

.checkout-index-index .opc-estimated-wrapper .estimated-price {
    font-weight: 700;
    color: var(--av-primary);
}

/* ============================================================
   MESSAGES
   ============================================================ */

.checkout-index-index .message {
    font-family: var(--av-font);
    border-radius: var(--av-radius-input);
    font-size: 14px;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 767px) {
    .checkout-index-index .page-title-wrapper .page-title {
        font-size: 22px;
    }

    .checkout-index-index .opc-wrapper {
        padding: 0 16px;
    }

    .checkout-index-index .opc-block-summary {
        margin-top: 24px;
        border-radius: var(--av-radius-card);
    }

    /* Remove Luma gray block backgrounds on mobile */
    .checkout-index-index .checkout-shipping-method,
    .checkout-index-index .checkout-payment-method {
        background: transparent;
        padding: 0;
    }

    .checkout-index-index .opc-wrapper .step-content {
        margin: 0;
    }

    .checkout-index-index .form-shipping-address {
        max-width: 100%;
    }

    .checkout-index-index .shipping-address-item {
        width: 100%;
        float: none;
    }

    /* Stack summary items */
    .checkout-index-index .opc-block-summary .product-item {
        padding: 12px 0;
    }

    .checkout-index-index .payment-method-title {
        padding: 12px;
    }

    .checkout-index-index .payment-method-content {
        padding: 12px;
    }

    /* Fix sidebar vertical scroll on mobile payment page.
       Luma makes .opc-sidebar position:fixed with overflow:hidden on mobile,
       which prevents scrolling when content exceeds viewport height. */
    .checkout-index-index .opc-sidebar {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

@media (min-width: 768px) {
    /* Ensure consistent container width */
    .checkout-index-index .checkout-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 32px 24px;
    }

    .checkout-index-index .actions-toolbar .primary button {
        width: auto;
        min-width: 220px;
    }
}

/* ============================================================
   LUMA OVERRIDES — Remove unwanted default styles
   ============================================================ */

/* Remove Luma numbered progress circles */
.checkout-index-index .opc-progress-bar-item._active > span:before,
.checkout-index-index .opc-progress-bar-item._complete > span:before,
.checkout-index-index .opc-progress-bar-item > span:before {
    display: none;
}

/* Remove default Luma shadows and borders */
.checkout-index-index .opc-sidebar {
    background: transparent;
    box-shadow: none;
    margin: 0;
}

/* Clean up fieldset borders */
.checkout-index-index fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Normalize link colors */
.checkout-index-index a {
    color: var(--av-primary);
}

.checkout-index-index a:hover {
    color: var(--av-primary);
    text-decoration: underline;
}

/* Table borders cleanup */
.checkout-index-index .data.table {
    font-family: var(--av-font);
}

.checkout-index-index .data.table th,
.checkout-index-index .data.table td {
    border-color: var(--av-border);
    font-size: 14px;
}

/* Remove Luma fieldset legend styling */
.checkout-index-index legend {
    font-family: var(--av-font);
    font-weight: 700;
    font-size: 16px;
    color: var(--av-primary);
}


/* ************************************************************
   LUMA PAGES — Shared styles for all pages rendered under
   Luma theme fallback (success, cart, multishipping, paypal).
   Uses :is() selector for brevity.
   ************************************************************ */

/* ============================================================
   LUMA PAGES — CSS VARIABLES
   ============================================================ */

.checkout-onepage-success,
.checkout-cart-index,
.checkout-multishipping-index {
    --av-primary: #181818;
    --av-bg: #f9f9f9;
    --av-fg: #424242;
    --av-secondary: #e8e8e8;
    --av-white: #ffffff;
    --av-border: #e6e6e6;
    --av-radius-input: 4px;
    --av-radius-card: 12px;
    --av-font: 'Satoshi', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   LUMA PAGES — PAGE BACKGROUND & TYPOGRAPHY
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) {
    background-color: var(--av-bg);
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .page-wrapper {
    font-family: var(--av-font);
    color: var(--av-fg);
    font-size: 14px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) h1,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) h2,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) h3,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) h4 {
    font-family: var(--av-font);
    color: var(--av-primary);
    font-weight: 700;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) a {
    color: var(--av-primary);
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) a:hover {
    color: var(--av-primary);
    text-decoration: underline;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .page-title-wrapper .page-title {
    font-family: var(--av-font);
    font-weight: 700;
    font-size: 28px;
    color: var(--av-primary);
}

/* ============================================================
   LUMA PAGES — HEADER: TOP PANEL BAR
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .panel.wrapper {
    display: none;
}

/* ============================================================
   LUMA PAGES — HEADER: MAIN (logo, search, minicart)
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .page-header {
    background-color: var(--av-white);
    border-bottom: 1px solid var(--av-border);
    box-shadow: none;
    margin-bottom: 0;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .header.content {
    font-family: var(--av-font);
    padding: 16px 20px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .page-header .logo img {
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Search */
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .block-search input {
    font-family: var(--av-font);
    height: 40px;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-input);
    font-size: 14px;
    color: var(--av-primary);
    background: var(--av-white);
    box-shadow: none;
    padding: 0 40px 0 14px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .block-search input:focus {
    border-color: var(--av-primary);
    box-shadow: 0 0 0 1px var(--av-primary);
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .block-search .action.search {
    opacity: 0.5;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .block-search .action.search:hover {
    opacity: 1;
}

/* Minicart */
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .minicart-wrapper .action.showcart .counter.qty {
    background: var(--av-primary);
    color: var(--av-white);
    font-family: var(--av-font);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
}

/* ============================================================
   LUMA PAGES — NAVIGATION BAR
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .nav-sections {
    background: var(--av-white);
    border-bottom: 1px solid var(--av-border);
    margin-bottom: 0;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .navigation {
    background: transparent;
    font-family: var(--av-font);
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .navigation .level0 > .level-top {
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 14px;
    color: var(--av-fg);
    padding: 12px 16px;
    line-height: 1.4;
    border: none;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .navigation .level0 > .level-top:hover,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .navigation .level0.active > .level-top {
    color: var(--av-primary);
    border-bottom: 2px solid var(--av-primary);
}

/* ============================================================
   LUMA PAGES — BUTTONS (shared)
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .action.primary,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) button.action.primary {
    font-family: var(--av-font);
    background-color: var(--av-primary);
    border: 1px solid var(--av-primary);
    color: var(--av-white);
    border-radius: var(--av-radius-input);
    height: 48px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    box-shadow: none;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .action.primary:hover,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) button.action.primary:hover {
    background-color: var(--av-primary);
    border-color: var(--av-primary);
    opacity: 0.85;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .action.secondary,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) button.action.secondary {
    font-family: var(--av-font);
    background-color: var(--av-secondary);
    border: 1px solid var(--av-secondary);
    color: var(--av-primary);
    border-radius: var(--av-radius-input);
    height: 48px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 500;
    text-transform: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    box-shadow: none;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .action.secondary:hover,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) button.action.secondary:hover {
    opacity: 0.85;
}

/* ============================================================
   LUMA PAGES — FORM INPUTS (shared)
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) input[type="text"],
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) input[type="email"],
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) input[type="tel"],
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) input[type="password"],
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) input[type="number"],
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) textarea,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) select {
    font-family: var(--av-font);
    height: 48px;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-input);
    padding: 0 14px;
    font-size: 16px; /* must be >=16px to prevent iOS Safari auto-zoom on focus */
    color: var(--av-primary);
    background-color: var(--av-white);
    box-shadow: none;
    transition: border-color 0.15s ease;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) textarea {
    height: auto;
    padding: 12px 14px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) input:focus,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) textarea:focus,
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) select:focus {
    border-color: var(--av-primary);
    box-shadow: 0 0 0 1px var(--av-primary);
    outline: none;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .field .label {
    font-family: var(--av-font);
    font-weight: 500;
    font-size: 14px;
    color: var(--av-fg);
}

/* ============================================================
   LUMA PAGES — MESSAGES
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .message {
    font-family: var(--av-font);
    border-radius: var(--av-radius-input);
    font-size: 14px;
}

/* ============================================================
   LUMA PAGES — FOOTER
   ============================================================ */

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .page-footer {
    background-color: #f5f5f5;
    color: #424242;
    margin-top: 0;
    border-top: 1px solid #e5e7eb;
    border-radius: 16px 16px 0 0;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer.content {
    font-family: var(--av-font);
    padding: 48px 20px 32px;
    max-width: 1200px;
    margin: 0 auto;
    border-top: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 32px 48px;
}

/* Newsletter block */
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter {
    grid-column: 2;
    grid-row: 1;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter .title strong {
    font-family: var(--av-font);
    font-size: 16px;
    font-weight: 700;
    color: #181818;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter .content {
    margin-top: 12px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter .label span {
    color: #666;
    font-size: 13px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter input[type="email"] {
    font-family: var(--av-font);
    height: 44px;
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: var(--av-radius-input);
    color: #424242;
    font-size: 14px;
    padding: 0 14px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter input[type="email"]::placeholder {
    color: #999;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter input[type="email"]:focus {
    border-color: #181818;
    box-shadow: none;
    outline: none;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter .action.subscribe {
    font-family: var(--av-font);
    background: #181818;
    color: white;
    border: none;
    border-radius: var(--av-radius-input);
    height: 44px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter .action.subscribe:hover {
    opacity: 0.9;
}

/* Footer links */
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer.content > ul.footer.links {
    grid-column: 1;
    grid-row: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer.links li {
    margin-bottom: 10px;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer.links a {
    font-family: var(--av-font);
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.15s ease;
}

:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer.links a:hover {
    color: #181818;
    text-decoration: none;
}

/* Copyright */
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .copyright {
    grid-column: 1 / -1;
    grid-row: 2;
    font-family: var(--av-font);
    font-size: 13px;
    color: #999;
    border-top: 1px solid #d1d5db;
    padding-top: 24px;
    margin-top: 0;
}

/* Hide "Report All Bugs" */
:is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .bugs {
    display: none;
}

/* ============================================================
   LUMA PAGES — CART PAGE SPECIFICS
   ============================================================ */

.checkout-cart-index .page-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.checkout-cart-index .cart-container {
    font-family: var(--av-font);
}

/* Cart table */
.checkout-cart-index .cart.table-wrapper .cart.item td {
    font-family: var(--av-font);
    font-size: 14px;
    color: var(--av-fg);
}

.checkout-cart-index .cart.table-wrapper .product-item-name a {
    font-family: var(--av-font);
    font-weight: 500;
    color: var(--av-primary);
    font-size: 15px;
}

.checkout-cart-index .cart.table-wrapper .price {
    font-weight: 700;
    color: var(--av-primary);
}

.checkout-cart-index .cart.table-wrapper .input-text.qty {
    height: 40px;
    width: 56px;
    text-align: center;
    font-size: 14px;
    border-radius: var(--av-radius-input);
}

.checkout-cart-index .cart.table-wrapper .action-towishlist,
.checkout-cart-index .cart.table-wrapper .action-delete {
    font-size: 13px;
    color: var(--av-fg);
}

/* Cart summary */
.checkout-cart-index .cart-summary {
    background: var(--av-white);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-card);
    padding: 24px;
    box-shadow: none;
}

.checkout-cart-index .cart-summary .summary.title {
    font-family: var(--av-font);
    font-weight: 700;
    font-size: 20px;
    color: var(--av-primary);
}

/* Cart discount/coupon */
.checkout-cart-index .cart-discount {
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-card);
    padding: 16px;
    margin-top: 16px;
    background: var(--av-white);
}

/* Cart empty */
.checkout-cart-index .cart-empty {
    font-family: var(--av-font);
    font-size: 15px;
    color: var(--av-fg);
    text-align: center;
    padding: 48px 24px;
}

/* Cross-sell */
.checkout-cart-index .block.crosssell {
    font-family: var(--av-font);
}

.checkout-cart-index .block.crosssell .product-item-name a {
    color: var(--av-primary);
    font-weight: 500;
}

/* ============================================================
   SUCCESS PAGE — CONTENT SPECIFICS
   ============================================================ */

.checkout-onepage-success .page-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.checkout-onepage-success .page-title-wrapper {
    text-align: center;
    margin-bottom: 32px;
}

/* Print receipt link next to title */
.checkout-onepage-success .page-title-wrapper .action.print {
    font-family: var(--av-font);
    font-size: 14px;
    color: var(--av-fg);
    text-decoration: underline;
    display: inline-block;
    margin-top: 8px;
}

.checkout-onepage-success .page-title-wrapper .action.print:hover {
    color: var(--av-primary);
}

/* Success message content */
.checkout-onepage-success .checkout-success {
    background: var(--av-white);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-card);
    padding: 40px;
    text-align: center;
}

.checkout-onepage-success .checkout-success p {
    font-family: var(--av-font);
    font-size: 15px;
    color: var(--av-fg);
    line-height: 1.6;
    margin-bottom: 12px;
}

.checkout-onepage-success .checkout-success .order-number {
    color: var(--av-primary);
    font-weight: 700;
    text-decoration: none;
}

.checkout-onepage-success .checkout-success .order-number:hover {
    text-decoration: underline;
}

.checkout-onepage-success .checkout-success .actions-toolbar {
    margin-top: 32px;
}

.checkout-onepage-success .checkout-success .action.primary.continue {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}

.checkout-onepage-success .checkout-success .action.primary.continue:hover {
    text-decoration: none;
    color: var(--av-white);
}

/* Registration block (create account after order) */
.checkout-onepage-success #registration {
    background: var(--av-white);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-card);
    padding: 32px 40px;
    margin-top: 24px;
    text-align: center;
}

.checkout-onepage-success #registration p {
    font-family: var(--av-font);
    font-size: 15px;
    color: var(--av-fg);
    line-height: 1.6;
}

.checkout-onepage-success #registration .action.primary {
    background-color: var(--av-white);
    border: 2px solid var(--av-primary);
    color: var(--av-primary);
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
}

.checkout-onepage-success #registration .action.primary:hover {
    background-color: var(--av-primary);
    color: var(--av-white);
}

/* ============================================================
   LUMA PAGES — MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 767px) {

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .header.content {
        padding: 12px 15px;
    }

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .page-header .logo img {
        max-height: 44px;
    }

    /* Navigation: horizontal scroll on mobile */
    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .nav-sections {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .navigation {
        white-space: nowrap;
    }

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .navigation .level0 > .level-top {
        font-size: 13px;
        padding: 10px 12px;
    }

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .page-title-wrapper .page-title {
        font-size: 22px;
    }

    /* Success page mobile */
    .checkout-onepage-success .page-main {
        padding: 32px 16px 48px;
    }

    .checkout-onepage-success .checkout-success {
        padding: 28px 20px;
    }

    .checkout-onepage-success .checkout-success p {
        font-size: 14px;
    }

    .checkout-onepage-success .checkout-success .action.primary.continue {
        width: 100%;
        padding: 0 20px;
    }

    .checkout-onepage-success #registration {
        padding: 24px 20px;
    }

    /* Cart page mobile */
    .checkout-cart-index .page-main {
        padding: 24px 16px 48px;
    }

    .checkout-cart-index .cart.table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Footer: single column on mobile */
    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer.content {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 24px;
        padding: 32px 16px 24px;
    }

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer .block.newsletter {
        grid-column: 1;
        grid-row: auto;
    }

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .footer.content > ul.footer.links {
        grid-column: 1;
        grid-row: auto;
    }

    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .copyright {
        grid-column: 1;
    }
}

@media (min-width: 768px) {
    :is(.checkout-onepage-success, .checkout-cart-index, .checkout-multishipping-index) .nav-toggle {
        display: none;
    }
}
