/* Catálogo público */
.store-page {
    --store-radius: 16px;
    --store-media: #fff;
    --store-success: #15803d;
    --store-success-soft: color-mix(in srgb, #16a34a 12%, var(--surface));
    --store-danger: #dc2626;
    --store-warning: #b45309;
    background: var(--bg);
}
:root[data-theme="dark"] .store-page { --store-success: #4ade80; --store-warning: #fbbf24; --store-danger: #f87171; }

.store-page [hidden] { display: none !important; }
.store-page .input { min-height: 46px; border-radius: 12px; font-size: 16px; }
.store-page textarea.input { min-height: 96px; }
.store-page .input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.store-page .input-icon > svg { left: 14px; width: 18px; height: 18px; }
.store-page .input-icon > .input { padding-left: 42px; }
.store-page :is(button, a, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.store-page .btn { min-height: 44px; height: auto; border-radius: 12px; font-weight: 650; white-space: normal; text-align: center; transition: background-color .15s ease, border-color .15s ease, opacity .15s ease, transform .1s ease; }
.store-page .btn:active:not(:disabled) { transform: scale(.98); }
.store-page .btn svg { width: 18px; height: 18px; }
.store-page .btn-lg { min-height: 52px; font-size: 15px; }

.store {
    --store-gutter: 20px;
    --store-max: 1200px;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}
.store-header,
.store-main { padding-inline: max(var(--store-gutter), calc((100% - var(--store-max)) / 2)); }

/* Cabeçalho fixo: marca, busca e carrinho */
.store-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
}
.store-bar {
    display: grid;
    grid-template-areas: "brand actions" "search search";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding-block: 10px 12px;
}
.store-brand { grid-area: brand; display: flex; align-items: center; gap: 12px; min-width: 0; }
.store-logo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--store-media);
    object-fit: contain;
}
.store-logo-initial { display: grid; place-items: center; border-color: var(--primary); background: var(--primary); color: var(--primary-fg); font-size: 20px; font-weight: 750; }
.store-brand-text { display: grid; min-width: 0; line-height: 1.3; }
.store-brand-name { margin: 0; overflow: hidden; font-size: 16px; font-weight: 750; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.store-brand-catalog { margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

.store-search { grid-area: search; position: relative; }
.store-search-input {
    width: 100%;
    height: 46px;
    padding: 0 48px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--accent);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.store-search-input::placeholder { color: var(--muted); }
.store-search-input:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--border)); }
.store-search-input:focus { border-color: var(--primary); outline: none; background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.store-search-input::-webkit-search-cancel-button { display: none; }
.store-search-icon { position: absolute; top: 50%; left: 17px; width: 20px; height: 20px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.store-search-clear { position: absolute; top: 50%; right: 4px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transform: translateY(-50%); }
.store-search-clear:hover { background: var(--border); color: var(--text); }
.store-search-clear svg { width: 18px; height: 18px; }

.store-actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }
.store-icon-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.store-icon-btn:hover { background: var(--accent); }
.store-icon-btn svg { width: 19px; height: 19px; }
.store-icon-btn .icon-dark,
:root[data-theme="dark"] .store-icon-btn .icon-light { display: none; }
:root[data-theme="dark"] .store-icon-btn .icon-dark { display: block; }

.store-cart-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px 0 12px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: var(--primary-fg);
    font: inherit;
    cursor: pointer;
    transition: opacity .15s ease;
}
.store-cart-btn:hover { opacity: .9; }
.store-cart-icon { position: relative; display: grid; place-items: center; }
.store-cart-icon svg { width: 21px; height: 21px; }
.store-cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid var(--primary);
    border-radius: 999px;
    background: var(--primary-fg);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.store-cart-text { display: flex; align-items: center; gap: 10px; margin-left: 6px; white-space: nowrap; }
.store-cart-text span { font-size: 14px; font-weight: 650; }
.store-cart-text strong { padding-left: 10px; border-left: 1px solid color-mix(in srgb, var(--primary-fg) 35%, transparent); font-size: 14px; font-weight: 700; }
.store-cart-btn.is-bumped, .cart-bar-btn.is-bumped { animation: bump .4s ease; }
@keyframes bump { 35% { transform: scale(1.08); } 70% { transform: scale(.98); } }

/* Categorias e resultados */
.store-main { flex: 1; width: 100%; padding-block: 16px 48px; }
.category-select { position: relative; width: 100%; }
.category-select-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    list-style: none;
    transition: border-color .15s ease;
}
.category-select-trigger::-webkit-details-marker { display: none; }
.category-select-trigger:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.category-select[open] .category-select-trigger { border-color: var(--primary); }
.category-select-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.category-select-trigger > svg { flex: none; width: 17px; height: 17px; color: var(--muted); }
.category-select-text { display: flex; flex: 1; align-items: baseline; gap: 8px; min-width: 0; }
.category-select-label { flex: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.category-select-text strong { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.category-select-chevron { transition: transform .15s ease; }
.category-select[open] .category-select-chevron { transform: rotate(180deg); }
.category-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 15;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.category-select-search { position: relative; padding: 8px; border-bottom: 1px solid var(--border); }
.category-select-search[hidden] { display: none; }
.category-select-search svg { position: absolute; top: 50%; left: 20px; width: 17px; height: 17px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.category-select-input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--accent);
    color: var(--text);
    font: inherit;
    font-size: 16px;
}
.store-page .category-select-input:focus { border-color: var(--primary); outline: none; background: var(--surface); }
.category-select-input::-webkit-search-cancel-button { display: none; }
.category-select-list { max-height: min(320px, 50vh); margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.category-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 550;
}
.category-option:hover { background: var(--accent); }
.store-page .category-option:focus-visible { outline-offset: -2px; background: var(--accent); }
.category-option svg { flex: none; width: 17px; height: 17px; color: var(--primary); visibility: hidden; }
.category-option.is-active { font-weight: 700; }
.category-option.is-active svg { visibility: visible; }
.category-select-empty { margin: 0; padding: 4px 16px 16px; color: var(--muted); font-size: 13px; }

.store-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 14px; }
.store-summary { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.image-notice { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--muted); font-size: 12px; }
.image-notice svg { flex: none; width: 14px; height: 14px; }
.store-toolbar-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 14px; }
.sheet-image-notice { justify-content: center; padding: 8px 16px; }
.cart-disclaimer { align-items: flex-start; line-height: 1.4; }
.cart-disclaimer svg { margin-top: 1px; }

/* Grade de produtos */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; transition: opacity .15s ease; }
.product-grid[aria-busy="true"] { opacity: .6; }

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--store-radius);
    background: var(--surface);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.product-card.is-in-cart { border-color: color-mix(in srgb, var(--store-success) 45%, var(--border)); }
.product-card-hit { display: flex; flex: 1; flex-direction: column; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.product-card-hit:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; border-radius: var(--store-radius) var(--store-radius) 0 0; }

.product-media { position: relative; display: block; aspect-ratio: 1; padding: 10px; background: var(--store-media); overflow: hidden; }
.product-media img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.product-media-empty { display: grid; place-items: center; width: calc(100% + 20px); height: calc(100% + 20px); margin: -10px; background: var(--accent); color: var(--muted); }
.product-media-empty svg { width: 40px; height: 40px; stroke-width: 1.4; }
.product-zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease;
}
.product-zoom svg { width: 17px; height: 17px; }

.product-info { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 12px 0; border-top: 1px solid var(--border); }
.product-name { display: -webkit-box; min-height: calc(2 * 1.35em); overflow: hidden; font-size: 14px; font-weight: 650; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.product-meta { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-price { margin-top: auto; padding-top: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.product-price small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.product-price-muted { color: var(--muted); font-size: 14px; font-weight: 650; }

.product-card-actions { padding: 10px 12px 12px; }
.product-card-actions .btn { width: 100%; min-height: 42px; padding: 0 8px; gap: 6px; font-size: 14px; white-space: nowrap; }
.product-in-cart { border-color: color-mix(in srgb, var(--store-success) 35%, transparent); background: var(--store-success-soft); color: var(--store-success); }
.product-in-cart:hover { border-color: var(--store-success); }
.product-in-cart svg { stroke-width: 2.6; }
.product-in-cart-qty { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--store-success); color: var(--surface); font-size: 12px; font-weight: 800; }

@media (hover: hover) {
    .product-card:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); transform: translateY(-3px); }
    .product-card:hover .product-media img { transform: scale(1.04); }
    .product-card:hover .product-zoom { opacity: 1; transform: none; }
    .product-card-hit:hover .product-name { text-decoration: underline; text-underline-offset: 3px; }
}

.product-card-skeleton { gap: 10px; padding-bottom: 12px; }
.product-card-skeleton .skeleton-media { aspect-ratio: 1; border-radius: 0; }
.product-card-skeleton .skeleton-line { margin: 0 12px; }
.skeleton-line { height: 12px; }
.skeleton-title { width: 70%; height: 20px; }
.skeleton-short { width: 40%; }
.skeleton-button { height: 42px; margin: 4px 12px 0; border-radius: 12px; }

.store-empty, .store-error { display: grid; grid-column: 1 / -1; gap: 14px; justify-items: center; padding: 56px 16px; color: var(--muted); text-align: center; }
.store-empty p, .store-error p { max-width: 360px; margin: 0; font-size: 15px; }
.store-state-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 999px; background: var(--accent); color: var(--muted); }
.store-state-icon svg { width: 28px; height: 28px; stroke-width: 1.7; }
.store-state-icon-error { background: color-mix(in srgb, var(--store-danger) 12%, var(--surface)); color: var(--store-danger); }
.store-more { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 0 8px; }
.store-sentinel { width: 100%; height: 1px; }

/* Rodapé com os dados da empresa */
.store-footer { width: 100%; border-top: 1px solid var(--border); background: var(--surface); }
.store-footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
    padding: 28px max(var(--store-gutter), calc((100% - var(--store-max)) / 2));
}
.store-footer-brand { display: grid; gap: 2px; }
.store-footer-company { font-size: 16px; font-weight: 750; }
.store-footer-tagline { color: var(--muted); font-size: 13px; }
.store-footer-details { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 0; padding: 0; list-style: none; }
.store-footer-details li { display: flex; align-items: flex-start; gap: 12px; }
.store-footer-icon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--text); }
.store-footer-icon svg { width: 18px; height: 18px; }
.store-footer-label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.store-footer-address { display: flex; flex-wrap: wrap; gap: 0 10px; font-style: normal; }
.store-footer-details a { font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); text-underline-offset: 3px; }
.store-footer-details a:hover { text-decoration-color: currentColor; }

.attendance-notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--store-warning) 35%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--store-warning) 10%, var(--surface)); color: var(--store-warning); }
.attendance-notice svg { flex: none; width: 19px; height: 19px; margin-top: 1px; }
.attendance-notice p { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.45; }

/* Barra do carrinho (celular) */
.cart-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; padding: 28px 12px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 55%, transparent); pointer-events: none; }
.cart-bar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(560px, 100%);
    min-height: 58px;
    margin: 0 auto;
    padding: 0 16px 0 14px;
    border: 0;
    border-radius: 16px;
    background: var(--primary);
    color: var(--primary-fg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    pointer-events: auto;
}
.cart-bar-label, .cart-bar-end { display: inline-flex; align-items: center; gap: 12px; }
.cart-bar-icon { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--primary-fg) 14%, transparent); }
.cart-bar-icon svg { width: 20px; height: 20px; }
.cart-bar-count { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--primary); border-radius: 999px; background: var(--primary-fg); color: var(--primary); font-size: 11px; font-weight: 800; }
.cart-bar-end svg { width: 18px; height: 18px; }

/* Detalhe do produto (folha) */
.product-sheet { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.product-sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

.sheet-gallery { background: var(--store-media); }
.gallery-stage { position: relative; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 1;
    max-height: 44dvh;
    padding: 16px;
    background: var(--store-media);
    object-fit: contain;
    scroll-snap-align: center;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity .15s ease;
}
.gallery-nav:disabled { opacity: 0; pointer-events: none; }
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-counter { position: absolute; bottom: 12px; left: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 700; }
.gallery-empty { display: grid; place-content: center; justify-items: center; gap: 8px; aspect-ratio: 4 / 3; max-height: 36dvh; width: 100%; background: var(--accent); color: var(--muted); font-size: 13px; }
.gallery-empty svg { width: 44px; height: 44px; stroke-width: 1.4; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; border-top: 1px solid var(--border); background: var(--surface); scrollbar-width: none; }
.gallery-thumb {
    flex: none;
    width: 56px;
    height: 56px;
    padding: 2px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--store-media);
    opacity: .7;
    overflow: hidden;
    cursor: pointer;
    transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb img { display: block; width: 100%; height: 100%; border-radius: 8px; object-fit: contain; }
.gallery-thumb.is-active { border-color: var(--primary); opacity: 1; }

.sheet-details { padding: 20px 20px 16px; }
.sheet-title { margin: 0 0 4px; font-size: 21px; font-weight: 750; letter-spacing: -.01em; line-height: 1.25; }
.sheet-meta { margin: 0; color: var(--muted); }
.sheet-edit { margin-top: 12px; }
.sheet-price { margin: 14px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.sheet-price small { margin-left: 4px; color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.sheet-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.sheet-section-title { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sheet-description { color: var(--text); line-height: 1.65; overflow-wrap: anywhere; }
.sheet-features { display: grid; margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sheet-feature { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 10px 14px; }
.sheet-feature + .sheet-feature { border-top: 1px solid var(--border); }
.sheet-feature:nth-child(even) { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.sheet-feature dt { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.sheet-feature dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Opções do produto (tamanho, cor…): o cliente escolhe uma de cada antes de selecionar */
.price-from { margin-right: 6px; color: var(--muted); font-size: .6em; font-weight: 600; letter-spacing: 0; }
.product-price .price-from { font-size: 12px; }
.sheet-options { display: grid; gap: 16px; margin-top: 20px; }
.sheet-option { min-width: 0; margin: 0; padding: 0; border: 0; }
.sheet-option-title { display: flex; gap: 6px; margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 700; }
.sheet-option-chosen { color: var(--muted); font-weight: 500; }
.option-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.option-choice { position: relative; }
.option-choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.option-choice span { display: grid; place-items: center; min-width: 48px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-weight: 600; transition: border-color .12s ease, background-color .12s ease; }
.option-choice input:hover + span { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.option-choice input:checked + span { border-color: var(--primary); background: var(--primary); color: var(--primary-fg); }
.option-choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.option-choice.is-conflict input:not(:checked) + span { border-style: dashed; color: var(--muted); }
.option-choice input:disabled { cursor: not-allowed; }
.option-choice input:disabled + span { color: var(--muted); text-decoration: line-through; opacity: .55; }
.sheet-details .sheet-incart { margin-top: 20px; }
.cart-item-variant { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }

.sheet-note { margin: 20px 0 0; }
.sheet-note label { display: flex; align-items: center; gap: 6px; }
.sheet-note label svg { color: var(--muted); }
.field-optional { color: var(--muted); font-weight: 400; }
.note-counter { text-align: right; }

.sheet-incart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin: 20px 0 0; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--store-success) 35%, transparent); border-radius: 14px; background: var(--store-success-soft); }
.sheet-incart-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--store-success); color: var(--surface); }
.sheet-incart-icon svg { width: 18px; height: 18px; stroke-width: 3; }
.sheet-incart-title { margin: 0 0 2px; font-weight: 700; }
.sheet-incart-line { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.sheet-incart .field-hint { margin-top: 6px; }

.sheet-footer { display: grid; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.sheet-footer .form-error { margin: 0; }
.sheet-footer-row { display: flex; align-items: center; gap: 10px; }
.sheet-footer .stepper { flex: none; }
.sheet-footer .stepper-btn, .sheet-footer .stepper-input { height: 52px; }
.sheet-submit { flex: 1; min-width: 0; gap: 8px; white-space: nowrap; }
.sheet-submit-label { overflow: hidden; text-overflow: ellipsis; }
.sheet-submit .label-short { display: none; }
.sheet-submit-total:not(:empty) { padding-left: 10px; border-left: 1px solid color-mix(in srgb, var(--primary-fg) 35%, transparent); }

.product-sheet-skeleton { display: grid; gap: 16px; padding: 0 0 24px; }
.product-sheet-skeleton .skeleton-media { aspect-ratio: 1; max-height: 44dvh; border-radius: 0; }
.skeleton-lines { display: grid; gap: 12px; padding: 0 20px; }

@media (min-width: 840px) {
    .product-sheet { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
    .product-sheet-scroll { display: contents; }

    .sheet-gallery { display: flex; flex-direction: column; grid-column: 1; grid-row: 1 / span 2; min-height: 0; border-right: 1px solid var(--border); }
    .gallery-stage { display: flex; flex: 1; min-height: 0; }
    .gallery-track { flex: 1; min-height: 0; }
    .gallery-slide { height: 100%; max-height: none; padding: 32px; aspect-ratio: auto; }
    .gallery-empty { flex: 1; max-height: none; aspect-ratio: auto; }
    .gallery-thumbs { justify-content: center; }

    .sheet-details { grid-column: 2; grid-row: 1; padding: 32px 32px 16px; overflow-y: auto; }
    .sheet-title { padding-right: 44px; font-size: 24px; }
    .sheet-footer { grid-column: 2; grid-row: 2; padding: 16px 32px 20px; }

    .product-sheet-skeleton { grid-template-columns: 1.05fr 1fr; height: 100%; padding: 0; }
    .product-sheet-skeleton .skeleton-media { height: 100%; max-height: none; aspect-ratio: auto; }
    .skeleton-lines { align-content: start; padding: 32px 28px; }
}

/* Carrinho (gaveta) */
.cart { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.cart-header { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 68px 12px 20px; border-bottom: 1px solid var(--border); }
.cart-header-icon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); }
.cart-header-icon svg { width: 20px; height: 20px; }
.cart-title { margin: 0; font-size: 18px; font-weight: 750; line-height: 1.25; }
.cart-subtitle { margin: 0; color: var(--muted); font-size: 13px; }

.cart-list { flex: 1; min-height: 0; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.cart-item-media { display: grid; place-items: center; width: 72px; height: 72px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--store-media); color: var(--muted); overflow: hidden; }
.cart-item-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cart-item-main { min-width: 0; }
.cart-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cart-item-name { font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.cart-item-remove {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: -8px -10px 0 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.cart-item-remove svg { width: 18px; height: 18px; }
.cart-item-remove:hover { background: color-mix(in srgb, var(--store-danger) 10%, transparent); color: var(--store-danger); }
.cart-item-remove:disabled { opacity: .5; cursor: progress; }
.cart-item-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 10px; }
.cart-item .stepper-btn { width: 40px; height: 40px; }
.cart-item .stepper-input { width: 44px; height: 40px; }
.cart-item-price { font-size: 15px; font-weight: 750; }
.cart-item.is-unavailable .cart-item-media,
.cart-item.is-unavailable .cart-item-name { opacity: .5; }
.cart-item-warning { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; color: var(--store-warning); font-size: 13px; font-weight: 600; }
.cart-item-warning svg { margin-top: 2px; }

.cart-note { margin-top: 8px; }
.cart-note summary {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--muted);
    font-size: 13px;
    list-style: none;
    cursor: pointer;
}
.cart-note summary:hover { color: var(--text); }
.cart-note summary::-webkit-details-marker { display: none; }
.cart-note summary svg { width: 14px; height: 14px; margin-top: 2px; }
.cart-note summary span { display: -webkit-box; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.cart-note[open] summary { border-radius: 12px; color: var(--text); }
.cart-note textarea.input { min-height: 72px; margin-top: 8px; }

.cart-empty { display: grid; flex: 1; place-content: center; justify-items: center; gap: 6px; padding: 48px 24px; color: var(--muted); text-align: center; }
.cart-empty .store-state-icon { margin-bottom: 8px; }
.cart-empty-title { margin: 0; color: var(--text); font-size: 16px; font-weight: 700; }
.cart-empty-hint { max-width: 280px; margin: 0; }

.cart-footer { display: grid; gap: 10px; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); box-shadow: 0 -8px 24px rgba(0, 0, 0, .04); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; }
.cart-total span { color: var(--muted); font-weight: 600; }
.cart-total strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.cart-total-hint { margin: -4px 0 2px; color: var(--muted); font-size: 12px; }
.cart-total-warning { color: var(--store-warning); font-weight: 600; }

/* Envio do pedido (dentro da gaveta do carrinho) */
.checkout { min-height: 0; }
.checkout-header { padding-left: 10px; gap: 6px; }
.checkout-back {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.checkout-back:hover { background: var(--accent); }
.checkout-back svg { width: 22px; height: 22px; }

.checkout-form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.checkout-scroll { flex: 1; min-height: 0; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }

.checkout-steps { display: flex; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: none; }
.checkout-steps li { display: flex; flex: 1; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.checkout-steps li:last-child { flex: none; }
.checkout-steps li:not(:last-child)::after { flex: 1; min-width: 12px; height: 2px; border-radius: 2px; background: var(--border); content: ""; }
.checkout-steps span { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border: 2px solid var(--border); border-radius: 999px; font-size: 11px; font-weight: 800; }
.checkout-steps svg { width: 13px; height: 13px; stroke-width: 3; }
.checkout-steps .is-done { color: var(--text); }
.checkout-steps .is-done span { border-color: var(--store-success); background: var(--store-success); color: var(--surface); }
.checkout-steps .is-done::after { background: var(--store-success) !important; }
.checkout-steps .is-current { color: var(--text); }
.checkout-steps .is-current span { border-color: var(--primary); background: var(--primary); color: var(--primary-fg); }

.checkout-intro { margin: 0 0 16px; color: var(--muted); line-height: 1.55; }
.checkout-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--accent);
    font-weight: 600;
}
.checkout-summary-label { display: inline-flex; align-items: center; gap: 8px; }
.checkout-summary-label svg { width: 18px; height: 18px; color: var(--muted); }
.checkout-summary strong { font-size: 18px; font-weight: 800; }
.checkout-privacy { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent); color: var(--muted); font-size: 13px; line-height: 1.5; }
.checkout-privacy svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--store-success); }
.store-disclaimer { max-width: 640px; margin: 0 auto; padding: 16px 16px 0; text-align: center; font-size: 12px; color: var(--muted); }
.store-privacy-link { padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.made-with { margin: 0; padding: 0 16px 24px; text-align: center; font-size: 12px; }
.made-with a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; text-decoration: none; transition: color .15s ease, border-color .15s ease; }
.made-with a:hover { border-color: var(--muted); color: var(--text); }
.made-with svg { width: 14px; height: 14px; }
.cart-footer .made-with, .store-expired .made-with, .store-toolbar .made-with { padding: 0; }
.store-toolbar .made-with a { padding: 3px 10px; }
.field-error { margin: 6px 0 0; color: var(--store-danger); font-size: 13px; font-weight: 500; }
.field:has(.field-error:not([hidden])) .input { border-color: var(--store-danger); }
.store-page .form-error { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--store-danger) 10%, var(--surface)); color: var(--store-danger); font-weight: 500; }

.checkout-done { justify-content: space-between; }
.checkout-done-body { display: grid; flex: 1; place-content: center; justify-items: center; gap: 10px; padding: 32px 24px; text-align: center; }
.checkout-done-body p { max-width: 320px; margin: 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.checkout-done-title { margin: 8px 0 0; font-size: 22px; font-weight: 750; }
.checkout-done-title:focus { outline: none; }
.checkout-done-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    box-shadow: 0 0 0 10px color-mix(in srgb, #16a34a 15%, transparent);
    animation: pop-in .4s cubic-bezier(.2, .9, .3, 1.4) both;
}
.checkout-done-icon svg { width: 34px; height: 34px; stroke-width: 3; }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } }

/* Catálogo vencido */
.store-expired { display: grid; place-items: center; align-content: center; gap: 20px; min-height: 100dvh; padding: 24px; }
.store-expired-card { display: grid; justify-items: center; gap: 12px; width: min(440px, 100%); padding: 36px 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.store-expired-card .store-logo { width: 56px; height: 56px; border-radius: 16px; font-size: 24px; }
.store-expired h1 { margin: 8px 0 0; font-size: 22px; }
.store-expired p { margin: 0; color: var(--muted); line-height: 1.55; }

/* Adaptação por largura */
@media (min-width: 600px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .product-info { padding: 14px 14px 0; }
    .product-card-actions { padding: 12px 14px 14px; }
    .product-name { font-size: 15px; }
    .product-price { font-size: 18px; }
}

@media (min-width: 840px) {
    .store { --store-gutter: 32px; }
    .store-bar {
        grid-template-areas: "brand search actions";
        grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) minmax(0, 1fr);
        gap: 24px;
        min-height: 72px;
        padding-block: 12px;
    }
    .store-actions { justify-self: end; }
    .store-main { padding-top: 24px; }
    .category-select { max-width: 360px; }
    .store-toolbar { margin: 20px 0 16px; }
    .cart-bar { display: none; }
}

@media (min-width: 1080px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 839px) {
    .store-cart-text { display: none; }
    .store-cart-btn { justify-content: center; width: 44px; padding: 0; }
    .store-footer-content { flex-direction: column; align-items: flex-start; padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
    .store-footer-details { display: grid; gap: 16px; }
    .toasts { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

@media (max-width: 599px) {
    .store { --store-gutter: 16px; }
    .store-main { padding-block: 12px 32px; }
    .store-toolbar { margin: 10px 0 12px; }
    .store-toolbar-end { flex-direction: column; align-items: flex-end; }
}

@media (max-width: 479px) {
    .sheet-submit .label-long { display: none; }
    .sheet-submit .label-short { display: inline; }
    .sheet-footer .stepper-btn { width: 40px; }
    .sheet-footer .stepper-input { width: 40px; }
}

@media (max-width: 359px) {
    .product-grid { grid-template-columns: minmax(0, 1fr); }
    .product-media { aspect-ratio: 4 / 3; }
    .store-brand-name { font-size: 15px; }
    .sheet-submit-total { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .store-cart-btn.is-bumped, .cart-bar-btn.is-bumped, .checkout-done-icon { animation: none; }
    .product-card, .product-media img, .product-zoom, .store-page .btn { transition: none; }
    .product-card:hover { transform: none; }
    .product-card:hover .product-media img { transform: none; }
    .gallery-track { scroll-behavior: auto; }
}

/* Catálogo de demonstração da landing */
.store-demo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 12px;
    margin: 0;
    padding: 10px 16px;
    background: var(--brand-soft);
    color: var(--text);
    font-size: 13px;
    text-align: center;
}
.store-demo a { color: var(--brand); font-weight: 700; white-space: nowrap; }
.checkout-done-body .btn { margin-top: 16px; }
