/*
 * 22 Haider Salim — Storefront V2 commerce pages
 * Product, wall-clock detail, cart, checkout and order views.
 * Mobile-first, direction-safe and intentionally scoped to .commerce-* classes.
 */

.commerce-shell {
    width: min(100%, var(--store-container));
    margin-inline: auto;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2rem) clamp(5.75rem, 8vw, 7rem);
}

.commerce-shell--narrow { max-width: 900px; }

.commerce-breadcrumb {
    width: min(100%, var(--store-container));
    margin-inline: auto;
    padding: 1rem clamp(1rem, 4vw, 2rem) 0;
    display: flex;
    align-items: center;
    gap: .45rem;
    overflow: hidden;
    color: var(--store-muted);
    font-size: .7rem;
    white-space: nowrap;
}

.commerce-breadcrumb a { transition: color .2s ease; }
.commerce-breadcrumb a:hover { color: var(--store-red); }
.commerce-breadcrumb span:last-child { overflow: hidden; color: var(--store-ink); text-overflow: ellipsis; }
.commerce-breadcrumb .store-icon { width: .9rem; height: .9rem; }

.commerce-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--store-red);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.commerce-eyebrow::before {
    width: 1.35rem;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
    content: '';
}

.commerce-page-head {
    padding: .7rem 0 1.25rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.commerce-page-head h1 {
    max-width: 16ch;
    margin: .35rem 0 0;
    color: var(--store-black);
    font-size: clamp(1.65rem, 5vw, 2.65rem);
    line-height: 1.22;
    letter-spacing: -.045em;
}

.commerce-page-head p { margin: .4rem 0 0; color: var(--store-muted); font-size: .76rem; }

.commerce-card {
    border: 1px solid var(--store-line);
    border-radius: var(--store-radius-lg);
    background: var(--store-surface);
    box-shadow: var(--store-shadow-sm);
}

.commerce-card__header {
    min-height: 4.25rem;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--store-line);
}

.commerce-card__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--store-black);
    font-size: .95rem;
    font-weight: 800;
}

.commerce-card__title-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: .8rem;
    background: var(--store-red-soft);
    color: var(--store-red);
}

.commerce-card__title-icon .store-icon { width: 1.15rem; height: 1.15rem; }
.commerce-card__body { padding: 1.1rem; }

.commerce-button {
    min-height: 3.35rem;
    padding: .8rem 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    font: 750 .8rem/1.3 var(--store-font);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.commerce-button:hover { transform: translateY(-1px); }
.commerce-button:active { transform: scale(.98); }
.commerce-button .store-icon { width: 1.1rem; height: 1.1rem; }
.commerce-button--primary { border-color: #ddc1c3; background: var(--store-red-soft); color: var(--store-red-dark); }
.commerce-button--primary:hover { border-color: #cfabad; background: #f5e3e3; }
.commerce-button--dark { border-color: #cfc8bd; background: #eee9e1; color: var(--store-ink); }
.commerce-button--dark:hover { border-color: #bdb4a8; background: #e5dfd6; }
.commerce-button--light { border-color: var(--store-line); background: #fff; color: var(--store-ink); }
.commerce-button--light:hover { border-color: #aaa7a0; background: #f8f7f4; }
.commerce-button--danger { border-color: #f1c8cd; background: #fff5f6; color: var(--store-danger); }
.commerce-button[disabled], .commerce-button[aria-busy='true'] { cursor: not-allowed; opacity: .5; transform: none; }
.commerce-button--block { width: 100%; }

.commerce-section { margin-top: clamp(2rem, 5vw, 4.5rem); }
.commerce-section__head { margin-bottom: 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.commerce-section__head h2 { margin: .25rem 0 0; font-size: clamp(1.3rem, 4vw, 2rem); line-height: 1.3; letter-spacing: -.035em; }
.commerce-section__head p { margin: .3rem 0 0; color: var(--store-muted); font-size: .74rem; }

/* Product and wall-clock details */
.product-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

.product-gallery { min-width: 0; }

.product-gallery__stage {
    --gallery-inset: clamp(1rem, 4vw, 2.25rem);
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid var(--store-line);
    border-radius: clamp(1.35rem, 5vw, 2.25rem);
    background:
        radial-gradient(circle at 68% 22%, rgba(149, 52, 57, .055), transparent 32%),
        linear-gradient(145deg, #fffdfb 0%, #eeeae3 100%);
    cursor: zoom-in;
}

.product-gallery__stage::after {
    position: absolute;
    inset: auto 6% 6%;
    height: 7%;
    border-radius: 50%;
    background: rgba(7, 7, 7, .1);
    filter: blur(18px);
    content: '';
    pointer-events: none;
}

.product-gallery__stage img {
    position: absolute;
    inset: var(--gallery-inset);
    z-index: 1;
    width: calc(100% - var(--gallery-inset) - var(--gallery-inset));
    height: calc(100% - var(--gallery-inset) - var(--gallery-inset));
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 20px 24px rgba(7, 7, 7, .14));
    transition: opacity .18s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
}

.product-gallery__stage:hover img { transform: none; }

.product-gallery__badge {
    position: absolute;
    inset-block-start: .85rem;
    inset-inline-start: .85rem;
    z-index: 2;
    min-height: 1.8rem;
    padding: .35rem .7rem;
    display: inline-flex;
    align-items: center;
    border-radius: 99px;
    border: 1px solid #ddc1c3;
    background: rgba(255, 247, 247, .94);
    color: var(--store-red-dark);
    font-size: .65rem;
    font-weight: 850;
}

.product-gallery__zoom-hint {
    position: absolute;
    inset-block-end: .85rem;
    inset-inline-end: .85rem;
    z-index: 2;
    width: 2.55rem;
    height: 2.55rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .88);
    color: var(--store-black);
    backdrop-filter: blur(10px);
}

.product-gallery__zoom-hint .store-icon { width: 1.1rem; height: 1.1rem; }

.product-gallery__thumbs {
    margin-top: .7rem;
    padding-bottom: .25rem;
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: inline mandatory;
}

.product-gallery__thumbs::-webkit-scrollbar { display: none; }
.product-gallery__thumb {
    width: 4.25rem;
    height: 4.25rem;
    flex: 0 0 auto;
    padding: .25rem;
    overflow: hidden;
    border: 1px solid var(--store-line);
    border-radius: 1rem;
    background: #fff;
    opacity: .65;
    cursor: pointer;
    scroll-snap-align: start;
    transition: opacity .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.product-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery__thumb:hover,
.product-gallery__thumb.is-active { border-color: #bdb4a8; box-shadow: 0 0 0 2px #e8e2da; opacity: 1; }

.product-info {
    min-width: 0;
    padding: clamp(1.1rem, 4vw, 2rem);
    align-self: start;
}

.product-info__topline { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.product-brand {
    min-height: 2.35rem;
    padding: .42rem .7rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--store-line);
    border-radius: .8rem;
    background: #f8f7f4;
    color: var(--store-black);
    font-size: .68rem;
    font-weight: 800;
}

.product-brand--logo { padding: .34rem .65rem; }
.product-brand img { width: clamp(4rem, 7vw, 5.5rem); height: 1.65rem; object-fit: contain; }
.product-brand__fallback { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-wishlist {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--store-line);
    border-radius: .9rem;
    background: #fff;
    color: var(--store-muted);
    cursor: pointer;
}

.product-wishlist:hover,
.product-wishlist.active { border-color: #efabb2; background: var(--store-red-soft); color: var(--store-red); }
.product-wishlist .store-icon { width: 1.2rem; height: 1.2rem; }

.product-info h1 {
    margin: 1rem 0 .65rem;
    color: var(--store-black);
    font-size: clamp(1.55rem, 5vw, 2.55rem);
    line-height: 1.32;
    letter-spacing: -.045em;
}

.product-price { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.product-price__current { color: var(--store-ink); font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 900; letter-spacing: -.035em; }
.product-price__current small { font-size: .62em; font-weight: 750; }
.product-price__old { color: var(--store-muted); font-size: .82rem; text-decoration: line-through; }
.product-price__discount { padding: .25rem .55rem; border-radius: 99px; background: var(--store-red-soft); color: var(--store-red); font-size: .62rem; font-weight: 850; }

.product-stock {
    width: fit-content;
    margin-top: .9rem;
    padding: .42rem .65rem;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: .75rem;
    font-size: .68rem;
    font-weight: 750;
}

.product-stock::before { width: .45rem; height: .45rem; border-radius: 50%; content: ''; }
.product-stock--in { background: #edf8f2; color: var(--store-success); }
.product-stock--in::before { background: var(--store-success); box-shadow: 0 0 0 4px rgba(24, 122, 75, .1); }
.product-stock--out { background: #fff1f2; color: var(--store-danger); }
.product-stock--out::before { background: var(--store-danger); box-shadow: 0 0 0 4px rgba(199, 24, 40, .1); }

.product-info__lead { margin: 1rem 0 0; color: #55524e; font-size: .78rem; line-height: 1.9; }
.product-divider { height: 1px; margin: 1.1rem 0; background: var(--store-line); }

.product-purchase { display: grid; gap: .7rem; }
.product-purchase__row { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); gap: .65rem; }
.commerce-quantity {
    min-height: 3.55rem;
    display: grid;
    grid-template-columns: 2.75rem minmax(1.5rem, 1fr) 2.75rem;
    align-items: center;
    border: 1px solid var(--store-line);
    border-radius: 1rem;
    background: #fff;
}

.commerce-quantity button {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: .7rem;
    background: transparent;
    color: var(--store-ink);
    cursor: pointer;
}

.commerce-quantity button:hover { background: var(--store-surface-2); color: var(--store-red); }
.commerce-quantity button .store-icon { width: .9rem; height: .9rem; }
.commerce-quantity input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--store-black);
    font-size: .84rem;
    font-weight: 850;
    text-align: center;
}

.product-purchase__note { display: flex; align-items: center; gap: .45rem; color: var(--store-muted); font-size: .64rem; }
.product-purchase__note .store-icon { width: .95rem; height: .95rem; color: var(--store-red); }

.product-facts {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.product-fact {
    min-height: 4rem;
    padding: .75rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 1px solid var(--store-line);
    border-radius: 1rem;
    background: #f8f7f4;
}

.product-fact__icon { color: var(--store-red); }
.product-fact__icon .store-icon { width: 1.15rem; height: 1.15rem; }
.product-fact strong { display: block; color: var(--store-black); font-size: .68rem; }
.product-fact small { display: block; margin-top: .08rem; color: var(--store-muted); font-size: .57rem; line-height: 1.5; }

.product-meta { margin-top: 1rem; display: grid; gap: .5rem; }
.product-meta__row { display: flex; justify-content: space-between; gap: 1rem; color: var(--store-muted); font-size: .68rem; }
.product-meta__row strong { color: var(--store-ink); font-weight: 750; text-align: end; }
.product-meta__row a { color: var(--store-red); }

.product-share { margin-top: 1.1rem; padding-top: 1rem; display: flex; align-items: center; gap: .55rem; border-top: 1px solid var(--store-line); }
.product-share > span { margin-inline-end: auto; color: var(--store-muted); font-size: .66rem; font-weight: 700; }
.product-share a,
.product-share button {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--store-line);
    border-radius: .85rem;
    background: #fff;
    color: var(--store-ink);
    cursor: pointer;
}

.product-share :is(a, button):hover { border-color: #cfc8bd; background: #eee9e1; color: var(--store-ink); }
.product-share .store-icon { width: 1rem; height: 1rem; }

.product-description { padding: clamp(1.1rem, 4vw, 1.75rem); }
.product-description h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.product-description__copy { color: #4d4a46; font-size: .8rem; line-height: 2; }

.product-related {
    display: grid;
    grid-auto-columns: minmax(14rem, 72vw);
    grid-auto-flow: column;
    gap: .8rem;
    overflow-x: auto;
    padding: .15rem .1rem 1rem;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
}

.product-related::-webkit-scrollbar { display: none; }
.product-related > * { scroll-snap-align: start; }

.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9800;
    padding: 1rem;
    display: none;
    place-items: center;
    border: 0;
    background: rgba(0, 0, 0, .9);
    color: #fff;
    cursor: zoom-out;
}

.product-lightbox.is-open { display: grid; }
.product-lightbox img { max-width: min(92vw, 980px); max-height: 88vh; object-fit: contain; }
.product-lightbox__close { position: absolute; inset-block-start: 1rem; inset-inline-end: 1rem; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; }

/* Cart */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.cart-list { display: grid; gap: .7rem; }
.cart-toolbar {
    padding: .75rem .85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid var(--store-line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .72);
}

.cart-toolbar__count { color: var(--store-muted); font-size: .7rem; font-weight: 750; }
.cart-toolbar__actions { display: flex; align-items: center; gap: .4rem; }
.cart-toolbar__actions form { margin: 0; }
.cart-toolbar__link { min-height: 2.5rem; padding: .55rem .7rem; display: inline-flex; align-items: center; gap: .4rem; border: 0; border-radius: .75rem; background: transparent; color: var(--store-muted); font-size: .65rem; font-weight: 750; cursor: pointer; }
.cart-toolbar__link:hover { background: #fff; color: var(--store-red); }
.cart-toolbar__link--danger:hover { background: #fff1f2; color: var(--store-danger); }

.cart-line {
    position: relative;
    padding: .85rem;
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr);
    gap: .85rem;
    border: 1px solid var(--store-line);
    border-radius: 1.25rem;
    background: #fff;
}

.cart-line__media {
    width: 5.4rem;
    aspect-ratio: 1;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: var(--store-surface-2);
}

.cart-line__media img { width: 100%; height: 100%; padding: .3rem; object-fit: contain; mix-blend-mode: multiply; }
.cart-line__content { min-width: 0; padding-inline-end: 2.9rem; }
.cart-line__type { color: var(--store-red); font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.cart-line__name { margin: .15rem 0 .25rem; display: block; color: var(--store-black); font-size: .78rem; font-weight: 800; line-height: 1.55; }
.cart-line__unit { color: var(--store-muted); font-size: .62rem; }
.cart-line__footer { margin-top: .7rem; display: flex; align-items: end; justify-content: space-between; gap: .55rem; }
.cart-line__subtotal { color: var(--store-black); font-size: .82rem; font-weight: 900; white-space: nowrap; }
.cart-line__remove-form {
    position: absolute;
    inset-block-start: .75rem;
    inset-inline-end: .75rem;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
}
.cart-line__remove {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: .65rem;
    background: transparent;
    color: #8e8a84;
    cursor: pointer;
}

.cart-line__remove:hover { background: #fff1f2; color: var(--store-danger); }
.cart-line__remove .store-icon { width: .95rem; height: .95rem; }
.cart-line .commerce-quantity { min-height: 2.75rem; grid-template-columns: 2.75rem 2rem 2.75rem; border-radius: .8rem; }
.cart-line .commerce-quantity button { width: 2.75rem; height: 2.75rem; }
.cart-line .commerce-quantity input { font-size: .72rem; }

.cart-notice {
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    border: 1px solid #ead6a6;
    border-radius: 1rem;
    background: #fff9e9;
    color: #76520b;
    font-size: .72rem;
    font-weight: 650;
}
.cart-notice--error { border-color: #f1c8cd; background: #fff2f3; color: var(--store-danger); }
.cart-notice .store-icon { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; margin-top: .1rem; }

.cart-summary { overflow: hidden; }
.cart-summary__body { padding: 1.1rem; }
.commerce-totals { display: grid; gap: .75rem; }
.commerce-totals__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--store-muted); font-size: .72rem; }
.commerce-totals__row strong { color: var(--store-black); font-size: .76rem; }
.commerce-totals__free { color: var(--store-success) !important; }
.commerce-totals__discount { color: var(--store-success) !important; }
.commerce-totals__divider { height: 1px; background: var(--store-line); }
.commerce-totals__row--total { color: var(--store-black); font-size: .9rem; font-weight: 850; }
.commerce-totals__row--total strong { color: var(--store-ink); font-size: 1.15rem; }
.cart-summary__actions { margin-top: 1rem; display: grid; gap: .55rem; }
.cart-assurances { margin-top: 1rem; padding-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; border-top: 1px solid var(--store-line); }
.cart-assurance { display: flex; align-items: center; gap: .45rem; color: var(--store-muted); font-size: .6rem; }
.cart-assurance .store-icon { width: .95rem; height: .95rem; color: var(--store-red); }

.cart-empty {
    min-height: 31rem;
    padding: 3rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cart-empty__icon { width: 5.25rem; height: 5.25rem; display: grid; place-items: center; margin-bottom: 1.1rem; border-radius: 1.6rem; background: #eee9e1; color: var(--store-red-dark); }
.cart-empty__icon .store-icon { width: 2.25rem; height: 2.25rem; }
.cart-empty h2 { margin: 0; font-size: 1.25rem; }
.cart-empty p { max-width: 23rem; margin: .55rem 0 1.35rem; color: var(--store-muted); font-size: .74rem; line-height: 1.8; }

/* Checkout */
.checkout-steps {
    max-width: 38rem;
    margin: 0 auto 1.35rem;
    padding: .2rem .5rem;
    display: grid;
    grid-template-columns: auto minmax(1rem, 1fr) auto minmax(1rem, 1fr) auto;
    align-items: center;
}

.checkout-step { display: grid; justify-items: center; gap: .35rem; color: var(--store-muted); }
.checkout-step__number { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border: 1px solid var(--store-line); border-radius: .75rem; background: #fff; font-size: .68rem; font-weight: 850; }
.checkout-step__label { font-size: .56rem; font-weight: 750; white-space: nowrap; }
.checkout-step-line { height: 1px; margin: 0 .45rem 1.25rem; background: var(--store-line); }
.checkout-step.is-complete .checkout-step__number { border-color: #cfc8bd; background: #eee9e1; color: var(--store-ink); }
.checkout-step.is-active { color: var(--store-red); }
.checkout-step.is-active .checkout-step__number { border-color: #d6b6b8; background: var(--store-red-soft); color: var(--store-red-dark); box-shadow: 0 0 0 4px rgba(149, 52, 57, .06); }
.checkout-step-line.is-complete { background: #bbb2a6; }

.checkout-errors { margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid #f0b6bc; border-radius: 1rem; background: #fff3f4; color: var(--store-danger); font-size: .72rem; }
.checkout-errors strong { display: block; margin-bottom: .35rem; }
.checkout-errors ul { margin: 0; padding-inline-start: 1.15rem; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.checkout-column { display: grid; align-content: start; gap: 1rem; }
.checkout-card { overflow: hidden; }
.checkout-field { margin-bottom: .85rem; }
.checkout-field:last-child { margin-bottom: 0; }
.checkout-label { margin-bottom: .38rem; display: flex; align-items: center; gap: .25rem; color: var(--store-black); font-size: .7rem; font-weight: 750; }
.checkout-label em { color: var(--store-red); font-style: normal; }
.checkout-label small { color: var(--store-muted); font-size: .6rem; font-weight: 500; }
.checkout-input {
    width: 100%;
    min-height: 3.25rem;
    padding: .82rem .9rem;
    border: 1px solid var(--store-line);
    border-radius: .95rem;
    background: #fff;
    color: var(--store-black);
    font: 500 .76rem/1.6 var(--store-font);
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

textarea.checkout-input { min-height: 7rem; resize: vertical; }
.checkout-input:focus { border-color: var(--store-black); box-shadow: 0 0 0 3px rgba(7, 7, 7, .07); }
.checkout-field.is-invalid .checkout-input { border-color: var(--store-danger); background: #fff8f8; box-shadow: 0 0 0 3px rgba(199, 24, 40, .08); }

.checkout-saved { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--store-line); }
.checkout-saved__title { margin-bottom: .55rem; color: var(--store-muted); font-size: .65rem; font-weight: 750; }
.checkout-addresses { display: grid; gap: .5rem; }
.checkout-choice {
    position: relative;
    padding: .8rem .85rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: .65rem;
    border: 1px solid var(--store-line);
    border-radius: .95rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.checkout-choice:hover { border-color: #aaa7a0; }
.checkout-choice.is-selected { border-color: var(--store-black); background: #f7f6f3; box-shadow: inset 0 0 0 1px var(--store-black); }
.checkout-choice input { width: 1rem; height: 1rem; margin: .2rem 0 0; accent-color: var(--store-red); }
.checkout-choice__copy { min-width: 0; color: var(--store-ink); font-size: .7rem; line-height: 1.7; }
.checkout-choice__tag { width: fit-content; margin-top: .25rem; padding: .15rem .4rem; border-radius: .45rem; background: #eee9e1; color: var(--store-ink); font-size: .52rem; font-weight: 750; }

.checkout-payments { display: grid; gap: .55rem; }
.checkout-payment {
    padding: .9rem;
    display: grid;
    grid-template-columns: auto 2.55rem minmax(0, 1fr);
    align-items: center;
    gap: .7rem;
    border: 1px solid var(--store-line);
    border-radius: 1rem;
    background: #fff;
    cursor: pointer;
}

.checkout-payment:hover { border-color: #aaa7a0; }
.checkout-payment.is-selected { border-color: var(--store-black); background: #f7f6f3; box-shadow: inset 0 0 0 1px var(--store-black); }
.checkout-payment input { width: 1rem; height: 1rem; accent-color: var(--store-red); }
.checkout-payment__icon { width: 2.55rem; height: 2.55rem; display: grid; place-items: center; border-radius: .8rem; background: #eee9e1; color: var(--store-red-dark); }
.checkout-payment__icon .store-icon { width: 1.15rem; height: 1.15rem; }
.checkout-payment strong { display: block; color: var(--store-black); font-size: .74rem; }
.checkout-payment small { display: block; margin-top: .1rem; color: var(--store-muted); font-size: .6rem; line-height: 1.5; }

.checkout-bank {
    margin-top: .7rem;
    padding: .9rem;
    border: 1px solid #f1dca9;
    border-radius: 1rem;
    background: #fff9e9;
    color: #675321;
    font-size: .7rem;
    line-height: 1.9;
}

.checkout-bank[hidden] { display: none; }
.checkout-bank strong { display: block; margin-bottom: .25rem; color: #46350e; }
.checkout-bank__note { margin-top: .45rem; padding-top: .45rem; border-top: 1px solid rgba(103, 83, 33, .15); color: #7b6328; font-size: .62rem; }

.checkout-summary { overflow: hidden; }
.checkout-items { display: grid; gap: .65rem; }
.checkout-item { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; }
.checkout-item__media { position: relative; width: 3.6rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: .9rem; background: var(--store-surface-2); }
.checkout-item__media img { width: 100%; height: 100%; padding: .2rem; object-fit: contain; mix-blend-mode: multiply; }
.checkout-item__qty { position: absolute; inset-block-start: -.3rem; inset-inline-end: -.3rem; min-width: 1.25rem; height: 1.25rem; padding-inline: .25rem; display: grid; place-items: center; border: 2px solid #fff; border-radius: 99px; background: var(--store-red); color: #fff; font-size: .55rem; font-weight: 850; }
.checkout-item__copy { min-width: 0; }
.checkout-item__copy strong { display: block; overflow: hidden; color: var(--store-black); font-size: .68rem; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.checkout-item__copy small { color: var(--store-muted); font-size: .58rem; }
.checkout-item__total { color: var(--store-black); font-size: .67rem; font-weight: 850; white-space: nowrap; }

.checkout-promo { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--store-line); }
.checkout-promo__label { margin-bottom: .45rem; display: flex; align-items: center; gap: .35rem; color: var(--store-black); font-size: .66rem; font-weight: 750; }
.checkout-promo__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; }
.checkout-promo__row .checkout-input { min-height: 2.9rem; }
.checkout-promo__button { min-height: 2.9rem; padding-inline: .85rem; border: 1px solid #cfc8bd; border-radius: .9rem; background: #eee9e1; color: var(--store-ink); font-size: .65rem; font-weight: 800; cursor: pointer; }
.checkout-promo__message { display: none; margin-top: .4rem; font-size: .62rem; }
.checkout-promo__message.is-success { display: block; color: var(--store-success); }
.checkout-promo__message.is-error { display: block; color: var(--store-danger); }
.checkout-voucher-applied { padding: .7rem .75rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; border: 1px solid #b8dbc9; border-radius: .85rem; background: #f0faf5; color: var(--store-success); font-size: .66rem; }
.checkout-voucher-applied button { width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border: 0; border-radius: .55rem; background: #fff; color: var(--store-danger); cursor: pointer; }

.checkout-special { margin-top: .8rem; padding: .75rem; display: flex; gap: .6rem; border-radius: .9rem; background: var(--store-red-soft); color: var(--store-red-dark); }
.checkout-special .store-icon { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.checkout-special strong { display: block; font-size: .67rem; }
.checkout-special small { display: block; margin-top: .12rem; font-size: .58rem; line-height: 1.55; }
.checkout-summary .commerce-totals { margin-top: .95rem; padding-top: .95rem; border-top: 1px solid var(--store-line); }
.checkout-points { margin-top: .75rem; padding: .65rem .7rem; display: flex; align-items: center; gap: .5rem; border-radius: .85rem; background: #f6f5f2; color: var(--store-muted); font-size: .6rem; }
.checkout-points .store-icon { width: 1rem; height: 1rem; color: var(--store-red); }
.checkout-submit { margin-top: .75rem; }
.checkout-back { min-height: 2.75rem; display: flex; align-items: center; justify-content: center; gap: .35rem; color: var(--store-muted); font-size: .65rem; font-weight: 750; }
.checkout-back:hover { color: var(--store-red); }

.checkout-assurances { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.checkout-assurance { padding: .7rem .4rem; display: grid; justify-items: center; gap: .35rem; border: 1px solid var(--store-line); border-radius: .9rem; background: rgba(255,255,255,.65); color: var(--store-muted); font-size: .55rem; font-weight: 700; text-align: center; }
.checkout-assurance .store-icon { width: 1.05rem; height: 1.05rem; color: var(--store-red); }

/* Confirmation and saved order details */
.order-success {
    position: relative;
    overflow: hidden;
    padding: clamp(1.6rem, 6vw, 3rem) 1.2rem;
    border-radius: var(--store-radius-xl);
    border: 1px solid #ddd7cd;
    background: linear-gradient(145deg, #fbfaf7, #eee9e1);
    color: var(--store-ink);
    text-align: center;
}

.order-success::before {
    position: absolute;
    width: 17rem;
    height: 17rem;
    inset-block-start: -10rem;
    inset-inline-end: -6rem;
    border: 3.5rem solid rgba(149, 52, 57, .065);
    border-radius: 50%;
    content: '';
}

.order-success__check { position: relative; width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 1.35rem; background: var(--store-red-soft); color: var(--store-red-dark); box-shadow: 0 10px 28px rgba(74, 65, 58, .08); }
.order-success__check .store-icon { width: 2rem; height: 2rem; }
.order-success h1 { position: relative; margin: 0; font-size: clamp(1.5rem, 6vw, 2.4rem); letter-spacing: -.04em; }
.order-success p { position: relative; max-width: 34rem; margin: .55rem auto 0; color: var(--store-muted); font-size: .74rem; line-height: 1.8; }
.order-success__number { position: relative; width: fit-content; margin: 1rem auto 0; padding: .55rem .9rem; border: 1px solid #d8d1c7; border-radius: .85rem; background: rgba(255, 255, 255, .72); color: var(--store-muted); font-size: .68rem; }
.order-success__number strong { margin-inline-start: .3rem; color: var(--store-ink); font-size: .9rem; }

.order-reward { margin-top: 1rem; padding: 1rem; display: flex; align-items: center; gap: .8rem; border: 1px solid #b8dbc9; border-radius: 1.15rem; background: #eef9f3; color: var(--store-success); }
.order-reward__icon { width: 2.8rem; height: 2.8rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: .9rem; background: var(--store-success); color: #fff; }
.order-reward__icon .store-icon { width: 1.25rem; height: 1.25rem; }
.order-reward strong { display: block; font-size: .76rem; }
.order-reward p { margin: .12rem 0 0; font-size: .62rem; line-height: 1.6; }
.order-reward a { margin-inline-start: auto; color: inherit; font-size: .62rem; font-weight: 850; white-space: nowrap; }

.order-stack { margin-top: 1rem; display: grid; gap: 1rem; }
.order-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.order-info-panel { padding: 1rem; border: 1px solid var(--store-line); border-radius: 1.1rem; background: #f8f7f4; }
.order-info-panel h3 { margin: 0 0 .65rem; color: var(--store-black); font-size: .78rem; }
.order-info-list { margin: 0; display: grid; gap: .6rem; }
.order-info-list > div { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.order-info-list dt { color: var(--store-muted); font-size: .62rem; }
.order-info-list dd { margin: 0; max-width: 65%; color: var(--store-black); font-size: .66rem; font-weight: 750; text-align: end; overflow-wrap: anywhere; }

.order-status { width: fit-content; padding: .28rem .55rem; display: inline-flex; align-items: center; gap: .35rem; border-radius: .65rem; background: #fff3cf; color: #8a6300; font-size: .58rem; font-weight: 800; }
.order-status::before { width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; content: ''; }
.order-status--processing { background: #eaf4ff; color: #1566a6; }
.order-status--shipped { background: #f1edff; color: #6547b8; }
.order-status--delivered { background: #edf8f2; color: var(--store-success); }
.order-status--cancelled { background: #fff1f2; color: var(--store-danger); }

.order-bank { padding: 1rem; border: 1px solid #f1dca9; border-radius: 1.1rem; background: #fff9e9; color: #675321; }
.order-bank h3 { margin: 0 0 .45rem; display: flex; align-items: center; gap: .5rem; color: #46350e; font-size: .78rem; }
.order-bank h3 .store-icon { width: 1.05rem; height: 1.05rem; }
.order-bank p { margin: 0; font-size: .66rem; line-height: 1.8; }
.order-bank pre { margin: .65rem 0; padding: .75rem; overflow-x: auto; border: 1px solid rgba(103, 83, 33, .14); border-radius: .85rem; background: rgba(255,255,255,.7); color: var(--store-black); font: 600 .68rem/1.8 var(--store-font); white-space: pre-wrap; }
.order-bank__note { padding-top: .55rem; border-top: 1px solid rgba(103, 83, 33, .13); }

.order-lines { display: grid; }
.order-line { padding: .8rem 0; display: grid; grid-template-columns: 3.7rem minmax(0, 1fr) auto; align-items: center; gap: .7rem; border-bottom: 1px solid var(--store-line); }
.order-line:last-child { border-bottom: 0; }
.order-line__media { width: 3.7rem; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: .9rem; background: var(--store-surface-2); }
.order-line__media img { width: 100%; height: 100%; padding: .2rem; object-fit: contain; mix-blend-mode: multiply; }
.order-line__copy { min-width: 0; }
.order-line__type { color: var(--store-red); font-size: .52rem; font-weight: 800; text-transform: uppercase; }
.order-line__copy strong { display: block; overflow: hidden; color: var(--store-black); font-size: .68rem; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.order-line__copy small { display: block; margin-top: .1rem; color: var(--store-muted); font-size: .57rem; }
.order-line__price { color: var(--store-black); font-size: .67rem; font-weight: 850; white-space: nowrap; }
.order-lines + .commerce-totals { margin-top: .7rem; padding-top: .9rem; border-top: 2px solid var(--store-line); }

.order-actions { margin-top: 1rem; display: grid; gap: .55rem; }
.order-help-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.order-help { padding: .9rem; display: flex; gap: .65rem; border: 1px solid var(--store-line); border-radius: 1rem; background: #f8f7f4; }
.order-help .store-icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; color: var(--store-red); }
.order-help strong { display: block; color: var(--store-black); font-size: .68rem; }
.order-help p { margin: .18rem 0 0; color: var(--store-muted); font-size: .58rem; line-height: 1.65; }

.order-detail-head { margin-bottom: 1rem; padding: 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid #ddd7cd; border-radius: 1.3rem; background: #f1ede6; color: var(--store-ink); }
.order-detail-head h1 { margin: 0; font-size: 1.2rem; }
.order-detail-head p { margin: .2rem 0 0; color: var(--store-muted); font-size: .62rem; }

.order-detail-back { width: fit-content; margin-bottom: .7rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--store-muted); font-size: .66rem; font-weight: 750; }
.order-detail-back:hover { color: var(--store-red); }
.order-detail-back .store-icon { width: .9rem; height: .9rem; }
.order-notes { margin-top: .7rem; padding: .7rem .75rem; border-inline-start: 3px solid var(--store-red); border-radius: .7rem; background: var(--store-red-soft); color: #5a4548; font-size: .64rem; line-height: 1.75; }

.commerce-confetti { position: fixed; inset-block-start: -1rem; z-index: 9900; width: .45rem; height: .85rem; border-radius: .15rem; pointer-events: none; animation: commerceConfetti 2.8s linear forwards; }
@keyframes commerceConfetti { to { transform: translate3d(var(--drift, 0), 105vh, 0) rotate(640deg); opacity: .15; } }

@media (min-width: 560px) {
    .order-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-help-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cart-line { grid-template-columns: 6.5rem minmax(0, 1fr); padding: 1rem; }
    .cart-line__media { width: 6.5rem; }
}

@media (min-width: 760px) {
    .commerce-card__header, .commerce-card__body { padding-inline: 1.35rem; }
    .product-view { grid-template-columns: minmax(0, 1.02fr) minmax(21rem, .98fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
    .product-gallery { position: sticky; inset-block-start: calc(var(--store-header-offset) + 1.25rem); }
    .product-info { position: sticky; inset-block-start: calc(var(--store-header-offset) + 1.25rem); }
    .product-related { grid-auto-columns: minmax(0, 1fr); grid-auto-flow: initial; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
    .cart-line__content { padding-inline-end: 3rem; }
    .order-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    .cart-layout { grid-template-columns: minmax(0, 1fr) minmax(20rem, 23rem); gap: 1.25rem; align-items: start; }
    .cart-summary { position: sticky; inset-block-start: calc(var(--store-header-offset) + 1rem); }
    .checkout-layout { grid-template-columns: minmax(0, 1.08fr) minmax(21rem, .72fr); gap: 1.25rem; align-items: start; }
    .checkout-summary-column { position: sticky; inset-block-start: calc(var(--store-header-offset) + 1rem); }
}

@media (min-width: 1120px) {
    .product-view { grid-template-columns: minmax(0, 1.08fr) minmax(25rem, .92fr); }
    .checkout-layout { gap: 2rem; }
}

@media (max-width: 420px) {
    .commerce-shell { padding-inline: .8rem; }
    .commerce-breadcrumb { padding-inline: .8rem; }
    .commerce-page-head { align-items: start; flex-direction: column; }
    .product-purchase__row { grid-template-columns: 7.25rem minmax(0, 1fr); }
    .product-purchase__row > .commerce-button { padding-inline: .75rem; }
    .product-facts { grid-template-columns: minmax(0, 1fr); }
    .cart-toolbar__link span { display: none; }
    .cart-line { grid-template-columns: 4.7rem minmax(0, 1fr); gap: .7rem; padding: .75rem; }
    .cart-line__media { width: 4.7rem; }
    .cart-line__footer { align-items: start; flex-direction: column; }
    .cart-line__subtotal { align-self: end; }
    .checkout-item { grid-template-columns: 3.25rem minmax(0, 1fr); }
    .checkout-item__media { width: 3.25rem; }
    .checkout-item__total { grid-column: 2; justify-self: end; }
    .checkout-assurances { grid-template-columns: minmax(0, 1fr); }
    .order-line { grid-template-columns: 3.25rem minmax(0, 1fr); }
    .order-line__media { width: 3.25rem; }
    .order-line__price { grid-column: 2; justify-self: end; }
    .order-reward { align-items: flex-start; flex-wrap: wrap; }
    .order-reward a { width: 100%; margin-inline-start: 3.6rem; }
    .order-detail-head { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .product-gallery__stage img,
    .commerce-button,
    .commerce-confetti { transition: none; animation: none; }
}

@media print {
    .app-header,
    .app-bottom-nav,
    .store-footer,
    .commerce-breadcrumb,
    .order-actions,
    .order-help-grid,
    .order-success,
    .order-reward,
    .store-toast-region { display: none !important; }

    body.store-v2 { background: #fff !important; }
    .commerce-shell { width: 100%; max-width: none; padding: 0; }
    .commerce-card { break-inside: avoid; border-color: #aaa; box-shadow: none; }
    .order-stack { margin-top: 0; }
}
