.commerce-page {
    --commerce-bg: #f7f7f5;
    --commerce-surface: #fff;
    --commerce-text: #1b2636;
    --commerce-muted: #526070;
    --commerce-line: #dce0e4;
    --commerce-accent: #154259;
    --commerce-button-text: #fff;
    background: var(--commerce-bg);
    color: var(--commerce-text);
    min-height: 55vh;
    padding: clamp(24px, 4vw, 48px) 0 clamp(36px, 5vw, 68px);
}
html[data-sns-theme="dark"] .commerce-page {
    --commerce-bg: #151a22;
    --commerce-surface: #222932;
    --commerce-text: #f0f4f7;
    --commerce-muted: #bcc7d2;
    --commerce-line: #485361;
    --commerce-accent: #b7d9ec;
    --commerce-button-text: #1a2934;
}
.commerce-page [hidden] { display: none !important; }
.commerce-page a { color: var(--commerce-accent); }
.commerce-container { width: min(100% - 40px, 1320px); margin-inline: auto; }
.commerce-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--commerce-line);
}
.commerce-heading h1, .commerce-empty h1 {
    margin: 2px 0 8px;
    color: var(--commerce-text);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -.035em;
    font-weight: 750;
}
.commerce-heading p, .commerce-empty p, .commerce-section-heading p, .commerce-cart-product p {
    margin: 0;
    color: var(--commerce-muted);
    font-size: 14px;
    line-height: 1.5;
}
.commerce-heading .commerce-caption {
    color: var(--commerce-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.commerce-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(285px, 1fr);
    gap: clamp(16px, 3vw, 32px);
    align-items: start;
}
.commerce-main { display: grid; gap: 16px; min-width: 0; }
.commerce-card {
    margin: 0;
    min-width: 0;
    padding: clamp(16px, 2vw, 26px);
    border: 1px solid var(--commerce-line);
    border-radius: 6px;
    background: var(--commerce-surface);
    color: var(--commerce-text);
}
.commerce-card h2 {
    margin: 0 0 5px;
    color: var(--commerce-text);
    font-size: clamp(17px, 2vw, 23px);
    font-weight: 750;
    line-height: 1.25;
}
.commerce-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 15px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--commerce-line);
}
.commerce-section-heading > i {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    height: 36px;
    border-radius: 50%;
    background: var(--commerce-accent);
    color: var(--commerce-button-text);
}
.commerce-fields, .commerce-options { display: grid; gap: 12px; }
.commerce-fields:has(input), .commerce-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.commerce-fields label {
    margin: 0;
    color: var(--commerce-text);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .035em;
}
.commerce-fields :is(input, textarea, select) {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    padding: 10px 12px;
    min-height: 44px;
    border: 1px solid var(--commerce-line);
    border-radius: 4px;
    background: var(--commerce-surface);
    color: var(--commerce-text);
    font-size: 15px;
    font-weight: 400;
}
.commerce-fields textarea { resize: vertical; }
.commerce-page :is(a, button, input, textarea, select):focus-visible {
    outline: 2px solid var(--commerce-accent);
    outline-offset: 2px;
}
.commerce-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 52px;
    margin: 0;
    padding: 11px;
    border: 1px solid var(--commerce-line);
    border-radius: 4px;
    cursor: pointer;
}
.commerce-option:has(:checked) {
    background: var(--commerce-bg);
    border-color: var(--commerce-accent);
}
.commerce-option strong, .commerce-option small { display: block; }
.commerce-option small, .commerce-order-item small, .commerce-cart-price small { color: var(--commerce-muted); }
.commerce-page :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--commerce-accent); }
.commerce-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--commerce-accent);
    border-radius: 4px;
    background: var(--commerce-accent);
    color: var(--commerce-button-text) !important;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .045em;
    line-height: 1.3;
    text-transform: uppercase;
    text-decoration: none;
}
.commerce-button:hover { filter: brightness(.91); text-decoration: none; }
.commerce-button-secondary {
    background: var(--commerce-surface);
    color: var(--commerce-text) !important;
    border-color: var(--commerce-line);
}
.commerce-button-full { width: 100%; }
.commerce-button:disabled, .commerce-button[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.commerce-text-link {
    display: inline-block;
    border: 0;
    padding: 0;
    background: none;
    color: var(--commerce-accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.commerce-main .commerce-fields + .commerce-text-link { margin-top: 12px; }
.commerce-status { margin: 10px 0; color: var(--commerce-accent); line-height: 1.45; }
.commerce-summary { position: sticky; top: 100px; }
.commerce-summary-heading, .commerce-totals > div, .commerce-cart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.commerce-summary-heading { padding-bottom: 12px; border-bottom: 1px solid var(--commerce-line); }
.commerce-summary-heading h2 { margin: 0; }
.commerce-summary-heading > :last-child { flex-shrink: 0; }
.commerce-order-items { list-style: none; margin: 0; padding: 0; }
.commerce-order-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 12px 0;
    border-bottom: 1px solid var(--commerce-line);
    font-size: 13px;
}
.commerce-order-item img, .commerce-cart-item img { display: block; object-fit: cover; background: var(--commerce-bg); border-radius: 4px; }
.commerce-order-item img { width: 48px; height: 52px; }
.commerce-order-item small { display: block; }
.commerce-totals { display: grid; gap: 10px; margin: 16px 0; }
.commerce-totals dt, .commerce-totals dd { margin: 0; font-weight: 600; }
.commerce-totals > div { align-items: baseline; }
.commerce-totals dd { text-align: right; }
.commerce-totals .commerce-total {
    padding-top: 13px;
    border-top: 1px solid var(--commerce-line);
    font-size: 18px;
}
.commerce-empty {
    max-width: 570px;
    margin: 36px auto;
    padding: clamp(22px, 5vw, 46px);
    background: var(--commerce-surface);
    border: 1px solid var(--commerce-line);
    border-radius: 6px;
    text-align: center;
}
.commerce-empty > i { color: var(--commerce-accent); font-size: 30px; margin-bottom: 14px; }
.commerce-empty > a, .commerce-empty-actions { margin-top: 18px; }
.commerce-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.commerce-cart-toolbar { padding-block: 12px; }
.commerce-cart-toolbar label { display: flex; align-items: center; gap: 8px; margin: 0; }
.commerce-cart-item {
    display: grid;
    grid-template-columns: auto 82px minmax(0, 1fr) auto;
    align-items: start;
    gap: clamp(8px, 1.4vw, 17px);
}
.commerce-cart-item img { width: 82px; height: 94px; }
.commerce-cart-item h2 { font-size: clamp(15px, 1.8vw, 19px); }
.commerce-cart-item h2 a { color: var(--commerce-text); }
.commerce-cart-price { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.commerce-cart-price small { text-transform: uppercase; font-size: 10px; letter-spacing: .035em; }
.commerce-cart-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.commerce-cart-controls input, .commerce-cart-controls [data-cart-quantity] {
    width: 34px;
    height: 34px;
    border: 1px solid var(--commerce-line);
    border-radius: 4px;
    background: var(--commerce-surface);
    color: var(--commerce-text);
    text-align: center;
}
.commerce-cart-controls input { width: 44px; appearance: textfield; }
.commerce-cart-controls input::-webkit-inner-spin-button { appearance: none; }
.commerce-cart-controls [data-cart-quantity]:disabled { opacity: .5; }
.commerce-cart-controls [data-cart-remove] { margin-inline-start: 6px; }
.commerce-coupon h2 { font-size: 16px; }
#checkout .floating-sc, body:has(.commerce-page) .floating-sc { display: none; }

@media (max-width: 850px) {
    .commerce-grid { grid-template-columns: minmax(0, 1fr); }
    .commerce-summary { position: static; }
}
@media (max-width: 500px) {
    .commerce-container { width: calc(100% - 24px); }
    .commerce-fields:has(input), .commerce-options { grid-template-columns: minmax(0, 1fr); }
    .commerce-cart-item { grid-template-columns: auto 56px minmax(0, 1fr); }
    .commerce-cart-item img { width: 56px; height: 68px; }
    .commerce-cart-price { grid-column: 3; justify-items: start; grid-template-columns: auto 1fr; }
}
