:root {
    --primary: #173f35;
    --primary-light: #2f6b59;
    --primary-soft: #e5f0eb;
    --accent: #e76f51;
    --accent-dark: #c95035;
    --cream: #f8f5ef;
    --surface: #ffffff;
    --surface-muted: #f2f5f3;
    --text-dark: #17211e;
    --text-light: #66736e;
    --line: #dfe7e3;
    --danger: #b9473e;
    --shadow-sm: 0 2px 8px rgba(23, 63, 53, .07);
    --shadow-lg: 0 22px 60px rgba(23, 63, 53, .16);
    --radius: 18px;
}

html { max-width: 100%; overflow-x: hidden; background: var(--cream); }

body {
    min-height: 100dvh;
    height: 100dvh;
    width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 0%, rgba(231, 111, 81, .08), transparent 28rem),
        var(--cream);
    color: var(--text-dark);
}
.page-transition-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #f8f5ef;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}
.page-transition-layer.is-entering,
body.page-leaving .page-transition-layer { opacity: 1; pointer-events: auto; }
.products-section,
.cart-section { animation: caisse-soft-reveal .18s ease-out both; }
@keyframes caisse-soft-reveal {
    from { opacity: .72; }
    to { opacity: 1; }
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.btn {
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.products-section { min-width: 0; padding: 0 32px 32px; }

.sticky-header-container {
    margin: 0 -2px 22px;
    padding: 24px 2px 16px;
    background: linear-gradient(180deg, var(--cream) 82%, rgba(248,245,239,0));
}

.header-title { min-width: 0; margin: 0 0 22px; gap: 20px; font-size: 1rem; }

.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-mark {
    position: relative;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 15px;
    background: var(--primary);
    box-shadow: 0 9px 22px rgba(23,63,53,.22);
}
.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 22px;
    top: 9px;
    background: #fff;
    border-radius: 14px 2px 14px 2px;
}
.brand-mark::before { left: 11px; transform: rotate(-24deg); }
.brand-mark::after { right: 10px; transform: rotate(66deg); opacity: .82; }
.brand-title { display: block; font-size: 1.65rem; line-height: 1; letter-spacing: -.04em; }
.brand-subtitle { display: block; margin-top: 6px; color: var(--text-light); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.header-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; }

.icon-button,
.cart-indicator {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-size: .86rem;
    line-height: 1;
}
.icon-button { display: inline-flex; align-items: center; gap: 9px; padding: 0 14px; font-weight: 700; }
.action-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; }
.cart-indicator { display: none; align-items: center; gap: 10px; padding: 5px 13px 5px 10px; text-align: left; }
.cart-icon-wrap { position: relative; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--primary-soft); }
.cart-count-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--surface); border-radius: 9px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 800; }
.cart-summary-text { display: grid; gap: 3px; min-width: 82px; }
.cart-indicator strong { color: var(--primary); font-size: .9rem; }
.cart-indicator small { color: var(--text-light); font-size: .66rem; font-weight: 600; }

.catalog-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.catalog-heading { min-width: max-content; font-size: 1.05rem; font-weight: 700; }
.search-box { position: relative; width: min(420px, 100%); margin-left: auto; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }
.search-box input {
    width: 100%;
    min-height: 46px;
    padding: 0 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: rgba(255,255,255,.9);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}
.search-box input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(47,107,89,.12); }

.category-filters { gap: 8px; padding: 1px 1px 8px; }
.chip {
    min-height: 44px;
    padding: 9px 16px;
    border-color: var(--line);
    border-radius: 12px;
    color: var(--text-light);
    font-size: .86rem;
}
.chip.active { background: var(--primary); border-color: var(--primary); }

.grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
    min-height: 166px;
    padding: 18px;
    align-items: stretch;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    isolation: isolate;
}
.card::after {
    content: "";
    position: absolute;
    inset: auto -35px -45px auto;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--card-accent, var(--primary-soft));
    opacity: .65;
    z-index: -1;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(23,63,53,.12); }
.card:active { transform: scale(.985); }
.card:focus-visible { outline: 3px solid rgba(231,111,81,.35); outline-offset: 2px; }
.custom-price-card { --card-accent: #f2c67e; border-color: #ead8b8; background: linear-gradient(145deg, #fffdf9, #fff 65%); }
.custom-price-card-icon { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: #fff1d8; color: #b56a16; font-size: 1.25rem; font-weight: 500; }
.custom-price-card-description { max-width: 150px; margin-top: 7px; color: var(--text-light); font-size: .72rem; line-height: 1.35; }
.custom-price-card-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(255,255,255,.72); color: var(--primary); font-size: 1.1rem; }
.card-category { margin: 4px 0 7px; color: var(--text-light); font-size: .7rem; font-weight: 700; }
.card-title { margin: 0; font-size: 1.03rem; }
.price { align-self: flex-start; padding: 7px 12px; background: var(--primary); box-shadow: none; font-size: .95rem; }
.card.freshness-alert { min-height: 196px; border-color: #e8c99d; }
.card-product-copy { min-width: 0; }
.freshness-badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; margin-top: 8px; padding: 5px 8px; border-radius: 8px; font-size: .65rem; font-weight: 800; }
.freshness-badge span { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.freshness-badge.warning { background: #fff0da; color: #9a5b08; }
.freshness-badge.warning span { background: #e79228; box-shadow: 0 0 0 3px rgba(231,146,40,.14); }
.freshness-badge.critical { background: #f8e5e2; color: var(--danger); }
.freshness-badge.critical span { background: var(--danger); box-shadow: 0 0 0 3px rgba(185,71,62,.13); }
.card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.card-price-stack { display: grid; justify-items: start; gap: 3px; flex: 0 0 auto; }
.card-price-stack del { padding-left: 5px; color: var(--text-light); font-size: .68rem; }
.price.discounted { background: var(--accent-dark); }
.card-quick-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px; min-width: 0; }
.btn-add-cart {
    display: inline-grid;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(201,80,53,.2);
}
.btn-add-cart:hover { background: var(--accent-dark); }
.btn-add-cart:focus-visible { outline: 3px solid rgba(231,111,81,.35); outline-offset: 2px; }
.btn-anti-gaspi { min-height: 44px; padding: 5px 8px; border: 1px solid #efb96d; border-radius: 9px; background: #fff0da; color: #8a5107; font-size: .66rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.btn-anti-gaspi:hover { background: #f9dfb9; }
.btn-anti-gaspi.active { border-color: #b9d8ca; background: var(--primary-soft); color: var(--primary); cursor: default; }
.stock-badge {
    top: 13px;
    right: 13px;
    width: auto;
    height: 26px;
    min-width: 34px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: none;
}
.stock-badge::before { content: "Stock "; font-size: .66rem; font-weight: 500; }
.stock-badge.empty { background: #f8e5e2; color: var(--danger); }
.stock-badge.empty::before { content: ""; }
.btn-waste { position: static; display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 4px; padding: 5px; opacity: 1; border: 0; background: transparent; color: var(--text-light); }
.btn-waste svg { width: 14px; height: 14px; }
.card.out-of-stock .btn-waste { display: none; }
.qty-badge { top: 10px; left: 10px; border: 0; background: var(--accent); }

.cart-section {
    flex: 0 0 min(390px, 36vw);
    padding: 26px;
    border-left: 1px solid var(--line);
    background: rgba(255,255,255,.92);
    box-shadow: -12px 0 36px rgba(23,63,53,.06);
}
.cart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cart-heading { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.cart-kicker { margin-top: 3px; color: var(--text-light); font-size: .8rem; }
.cart-close { display: none; }
.client-box, .options-box { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); box-shadow: none; margin-bottom: 12px; }
.section-subtitle { margin-bottom: 8px; color: var(--text-dark); font-size: .84rem; }
.client-picker-trigger { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 58px; padding: 8px 10px; border: 1px solid #cedbd5; border-radius: 13px; background: var(--surface); color: var(--text-dark); text-align: left; cursor: pointer; box-shadow: 0 2px 7px rgba(23,63,53,.035); }
.client-picker-trigger:focus-visible { outline: 3px solid rgba(23,63,53,.13); outline-offset: 2px; }
.client-picker-trigger-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.client-picker-trigger-icon svg { width: 20px; height: 20px; }
.client-picker-trigger-copy { display: grid; gap: 3px; min-width: 0; }
.client-picker-trigger-copy strong,
.client-picker-trigger-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-picker-trigger-copy strong { font-size: .84rem; }
.client-picker-trigger-copy small { color: var(--text-light); font-size: .67rem; font-weight: 500; }
.client-picker-trigger-chevron { width: 18px; height: 18px; color: var(--text-light); }
select, input[type="datetime-local"], input[type="number"] { min-height: 44px; margin-top: 5px; border-color: var(--line); }
.checkbox-label { font-size: .9rem; }
#cart-list { margin: 8px 0 12px; }
.empty-cart { min-height: 150px; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 22px; text-align: center; color: var(--text-light); }
.empty-cart-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 3px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }
.empty-cart-icon svg { width: 22px; height: 22px; }
.empty-cart strong { color: var(--text-dark); font-size: .92rem; }
.empty-cart small { max-width: 220px; font-size: .76rem; line-height: 1.45; }
.cart-item { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.cart-item:hover { border-color: var(--line); }
.cart-item-name { font-size: .92rem; }
.cart-item-price { font-size: .9rem; }
.quantity-controls { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; }
.quantity-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--primary); cursor: pointer; }
.quantity-value { min-width: 18px; text-align: center; font-size: .82rem; font-weight: 700; }
.btn-remove { width: 44px; height: 44px; background: transparent; color: var(--text-light); }
.total-container { margin-bottom: 12px; padding: 16px 18px; border-radius: 15px; box-shadow: none; }
.total-container h3 { font-size: .9rem; }
.total-container span { font-size: 1.6rem; }
.btn-pay { min-height: 56px; padding: 15px; border-radius: 15px; background: var(--accent); box-shadow: 0 9px 20px rgba(231,111,81,.24); letter-spacing: .02em; text-transform: none; }
.btn-pay:hover { background: var(--accent-dark); }
.btn-z-close { min-height: 46px; padding: 10px; border: 0; color: var(--text-light); font-size: .82rem; }
.cart-admin-shortcut { display: none; }

.modal-overlay { padding: 18px; background: rgba(16,32,27,.48); }
.modal-content { max-height: calc(100dvh - 36px); overflow-y: auto; padding: 24px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.modal-header h2 { color: var(--text-dark); }
.btn-close { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-muted); font-size: 1.15rem; }
.payment-options { grid-template-columns: 1fr 1fr; }
.payment-btn { min-height: 92px; padding: 15px 8px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-muted); }
.payment-btn span { display: block; margin-bottom: 7px; font-size: 1.5rem; }
.payment-btn small { display: block; margin-top: 4px; color: var(--text-light); font-size: .7rem; font-weight: 500; }
.payment-btn:disabled { cursor: not-allowed; opacity: .55; }

body.dialog-open { overflow: hidden; }
.action-dialog {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15,34,28,.48);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility 0s linear .24s;
}
.action-dialog.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.action-dialog-sheet {
    width: min(100%, 480px);
    padding: 24px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(15,34,28,.25);
    transform: translateY(20px) scale(.98);
    opacity: 0;
    transition: transform .32s cubic-bezier(.2,.85,.25,1), opacity .2s ease;
}
.action-dialog.is-open .action-dialog-sheet { transform: translateY(0) scale(1); opacity: 1; }
.action-dialog-handle { display: none; }
.action-dialog-header { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 13px; margin-bottom: 22px; }
.action-dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #f8e5e2; color: var(--danger); }
.action-dialog-icon svg { width: 21px; height: 21px; }
.action-dialog-header h2 { margin: 1px 0 4px; color: var(--text-dark); font-size: 1.25rem; letter-spacing: -.02em; }
.action-dialog-header p { margin: 0; color: var(--text-light); font-size: .82rem; line-height: 1.4; }
.action-dialog-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 11px; background: var(--surface-muted); color: var(--text-light); cursor: pointer; }
.action-dialog-close svg { width: 18px; height: 18px; }
.client-picker-sheet { width: min(100%, 500px); }
.client-picker-dialog-icon { background: var(--primary-soft); color: var(--primary); }
.client-picker-search { position: relative; display: block; margin-bottom: 13px; }
.client-picker-search svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; color: var(--text-light); transform: translateY(-50%); pointer-events: none; }
.client-picker-search input { width: 100%; min-height: 50px; margin: 0; padding: 0 14px 0 42px; border: 1px solid var(--line); border-radius: 14px; outline: none; background: #f8faf9; color: var(--text-dark); font: inherit; }
.client-picker-search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(23,63,53,.1); }
.client-picker-list { display: grid; gap: 8px; max-height: min(430px, 55dvh); overflow-y: auto; overscroll-behavior: contain; }
.client-picker-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 64px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text-dark); text-align: left; cursor: pointer; }
.client-picker-option:hover { border-color: #bcd0c6; background: #fbfdfc; }
.client-picker-option.is-selected { border-color: #9fc3b2; background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(23,63,53,.06); }
.client-picker-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #edf2ef; color: var(--primary); font-size: .92rem; font-weight: 800; }
.client-picker-option.is-selected .client-picker-avatar { background: var(--primary); color: #fff; }
.client-picker-option-copy { display: grid; gap: 4px; min-width: 0; }
.client-picker-option-copy strong,
.client-picker-option-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-picker-option-copy strong { font-size: .84rem; }
.client-picker-option-copy small { color: var(--text-light); font-size: .69rem; }
.client-picker-check { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: transparent; font-size: .75rem; }
.client-picker-option.is-selected .client-picker-check { background: #fff; color: var(--primary); }
.client-picker-empty { display: grid; min-height: 155px; padding: 20px; place-items: center; align-content: center; text-align: center; }
.client-picker-empty > span { margin-bottom: 8px; font-size: 1.25rem; }
.client-picker-empty strong { font-size: .9rem; }
.client-picker-empty p { max-width: 340px; margin: 6px 0 0; color: var(--text-light); font-size: .72rem; line-height: 1.45; }
.custom-price-dialog-sheet { width: min(100%, 500px); background: linear-gradient(160deg, #fff 0%, #fff 72%, #f5f9f7 100%); }
.custom-price-dialog-icon { width: 48px; height: 48px; border-radius: 15px; background: var(--primary); color: #fff; box-shadow: 0 9px 20px rgba(23,63,53,.18); }
.custom-price-form { display: grid; gap: 15px; }
.custom-price-field { display: grid; gap: 8px; min-width: 0; color: var(--text-dark); font-size: .82rem; font-weight: 700; }
.custom-price-field > span:first-child { padding-left: 2px; }
.custom-price-field input,
.custom-price-field select { width: 100%; min-height: 52px; margin: 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; outline: none; background: #f8faf9; color: var(--text-dark); font: inherit; font-weight: 600; }
.custom-price-field input:focus,
.custom-price-field select:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px rgba(23,63,53,.1); }
.custom-price-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(110px, .65fr); gap: 11px; }
.custom-price-input-wrap { position: relative; display: block; }
.custom-price-input-wrap input { padding-right: 42px; }
.custom-price-input-wrap strong { position: absolute; top: 50%; right: 15px; color: var(--primary); transform: translateY(-50%); pointer-events: none; }
.custom-quantity-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px; background: #f8faf9; }
.custom-quantity-heading { display: grid; gap: 3px; color: var(--text-dark); font-size: .83rem; font-weight: 750; }
.custom-quantity-heading small { color: var(--text-light); font-size: .68rem; font-weight: 500; }
.custom-quantity-stepper { display: grid; grid-template-columns: 44px 54px 44px; align-items: center; gap: 5px; padding: 4px; border: 1px solid #d4dfda; border-radius: 13px; background: #fff; }
.custom-quantity-stepper button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.custom-quantity-stepper button:active { transform: scale(.93); }
.custom-quantity-stepper input { width: 54px; min-height: 44px; margin: 0; padding: 0 3px; border: 0; outline: none; background: transparent; color: var(--text-dark); text-align: center; font: inherit; font-size: 1.05rem; font-weight: 800; appearance: textfield; }
.custom-quantity-stepper input::-webkit-inner-spin-button,
.custom-quantity-stepper input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.custom-price-summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-radius: 14px; background: var(--primary); color: rgba(255,255,255,.72); font-size: .75rem; }
.custom-price-summary strong { color: #fff; font-size: .92rem; text-align: right; }
.custom-price-hint { margin: -4px 0 0; padding: 0 2px; color: var(--text-light); font-size: .68rem; line-height: 1.4; }
.custom-price-form .action-dialog-error:empty { display: none; }
.action-dialog-actions.custom-price-actions { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); margin-top: 2px; }
.custom-price-submit { background: var(--primary); color: #fff; box-shadow: 0 9px 20px rgba(23,63,53,.18); }
.waste-field { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.waste-field > label, .waste-field legend { display: block; margin-bottom: 9px; color: var(--text-dark); font-size: .83rem; font-weight: 700; }
.quantity-stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-muted); }
.quantity-stepper button { display: grid; place-items: center; min-height: 44px; border: 0; border-radius: 11px; background: var(--surface); color: var(--primary); font-size: 1.35rem; font-weight: 600; box-shadow: var(--shadow-sm); cursor: pointer; }
.quantity-stepper input[type="number"] { width: 100%; min-height: 44px; margin: 0; padding: 0 8px; border: 0; background: transparent; color: var(--text-dark); text-align: center; font-size: 1.25rem; font-weight: 700; box-shadow: none; appearance: textfield; }
.quantity-stepper input::-webkit-outer-spin-button, .quantity-stepper input::-webkit-inner-spin-button { margin: 0; appearance: none; }
.reason-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.reason-chip { min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text-light); font-size: .78rem; font-weight: 700; cursor: pointer; }
.reason-chip.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.waste-custom-reason { display: none; width: 100%; min-height: 46px; margin-top: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.waste-custom-reason.visible { display: block; animation: fieldReveal .2s ease both; }
.waste-custom-reason:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(23,63,53,.1); }
.action-dialog-error { min-height: 20px; margin-top: -8px; color: var(--danger); font-size: .77rem; }
.action-dialog-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 16px; }
.action-button { min-height: 50px; padding: 0 16px; border: 0; border-radius: 13px; font-weight: 700; cursor: pointer; }
.action-button-secondary { background: var(--surface-muted); color: var(--text-dark); }
.action-button-danger { background: var(--danger); color: #fff; box-shadow: 0 9px 20px rgba(185,71,62,.2); }
.action-button:disabled { cursor: wait; opacity: .65; }
.feedback-dialog-sheet { width: min(100%, 430px); text-align: center; }
.feedback-dialog-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 2px auto 16px; border-radius: 18px; background: #e7f0ec; color: var(--primary); }
.feedback-dialog-icon svg { display: none; width: 27px; height: 27px; }
.feedback-dialog-sheet[data-tone="info"] .feedback-icon-info,
.feedback-dialog-sheet[data-tone="warning"] .feedback-icon-warning,
.feedback-dialog-sheet[data-tone="success"] .feedback-icon-success,
.feedback-dialog-sheet[data-tone="error"] .feedback-icon-error { display: block; }
.feedback-dialog-sheet[data-tone="warning"] .feedback-dialog-icon { background: #fff1d8; color: #a76516; }
.feedback-dialog-sheet[data-tone="success"] .feedback-dialog-icon { background: #e2f2e9; color: #23724f; }
.feedback-dialog-sheet[data-tone="error"] .feedback-dialog-icon { background: #f8e5e2; color: var(--danger); }
.feedback-dialog-copy h2 { margin: 0 0 8px; color: var(--text-dark); font-size: 1.3rem; letter-spacing: -.025em; }
.feedback-dialog-copy p { margin: 0; color: var(--text-light); font-size: .85rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.feedback-dialog-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; margin-top: 23px; }
.feedback-dialog-actions.is-single { grid-template-columns: 1fr; }
.feedback-dialog-submit { background: var(--primary); color: #fff; box-shadow: 0 9px 20px rgba(23,63,53,.18); }
.feedback-dialog-sheet[data-tone="warning"] .feedback-dialog-submit { background: #b87422; box-shadow: 0 9px 20px rgba(184,116,34,.2); }
.feedback-dialog-sheet[data-tone="error"] .feedback-dialog-submit { background: var(--danger); box-shadow: 0 9px 20px rgba(185,71,62,.2); }
.feedback-dialog-submit:focus-visible,
.feedback-dialog-actions .action-button-secondary:focus-visible { outline: 3px solid rgba(23,63,53,.14); outline-offset: 2px; }
.app-toast { position: fixed; left: 50%; bottom: 24px; z-index: 5000; max-width: calc(100% - 32px); padding: 13px 18px; border-radius: 13px; background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); font-size: .85rem; font-weight: 700; opacity: 0; visibility: hidden; transform: translate(-50%, 18px); transition: opacity .22s ease, transform .28s cubic-bezier(.2,.85,.25,1), visibility 0s linear .28s; }
.app-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.app-toast.error { background: var(--danger); }
@keyframes fieldReveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.mobile-cart-backdrop { display: none; }
.floating-cart-btn { display: none; }

@media (max-width: 1100px) {
    body { display: block; height: 100dvh; overflow: hidden; }
    .products-section { height: 100dvh; padding: 0 24px 34px; overflow-y: auto; }
    .cart-indicator { display: flex; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
    .card.freshness-alert { min-height: 218px; }
    .card.freshness-alert .card-footer { flex-direction: column; align-items: stretch; }
    .card.freshness-alert .card-quick-actions { width: 100%; max-width: none; }
    .card.freshness-alert .btn-anti-gaspi { width: 100%; }
    .mobile-cart-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1400;
        background: rgba(16,32,27,.42);
        backdrop-filter: blur(2px);
    }
    .mobile-cart-backdrop.open { display: block; }
    .cart-section {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 1500;
        width: min(420px, 92vw);
        max-width: none;
        padding: 24px;
        border: 0;
        box-shadow: -20px 0 60px rgba(23,63,53,.2);
        transform: translateX(105%);
        visibility: hidden;
        pointer-events: none;
        transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s;
    }
    .cart-section.open { transform: translateX(0); visibility: visible; pointer-events: auto; transition-delay: 0s; }
    .cart-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--surface-muted); color: var(--text-dark); cursor: pointer; }
}

@media (max-width: 768px) {
    body { display: block; height: 100dvh; overflow: hidden; }
    .products-section { height: 100dvh; padding: 0 15px 104px; overflow-y: auto; }
    .sticky-header-container { margin: 0 -1px 14px; padding: 14px 1px 12px; }
    .header-title { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 15px; }
    .brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 13px; }
    .brand-mark::before { left: 8px; top: 7px; }
    .brand-mark::after { right: 7px; top: 7px; }
    .brand-title { font-size: 1.25rem; }
    .brand-subtitle { margin-top: 4px; font-size: .62rem; }
    .header-actions { margin-left: auto; }
    .icon-button { width: 44px; justify-content: center; padding: 0; }
    .icon-button .action-label { display: none; }
    .cart-indicator { display: none; }
    .catalog-tools { display: block; margin-bottom: 10px; }
    .catalog-heading { display: none; }
    .search-box { width: 100%; }
    .search-box input { min-height: 44px; }
    .category-filters { margin: 0 -15px; padding: 1px 15px 7px; }
    .chip { min-height: 44px; padding: 8px 14px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: 16px; }
    .card { min-height: 150px; padding: 14px; border-radius: 16px; }
    .card.freshness-alert { min-height: 218px; }
    .card-title { padding-right: 6px; font-size: .94rem; }
    .card-category { max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .stock-badge { top: 10px; right: 10px; min-width: 30px; }
    .stock-badge::before { content: ""; }
    .btn-waste { display: none; }
    .card-quick-actions { max-width: 58%; }
    .card.freshness-alert .card-quick-actions { max-width: none; }
    .btn-anti-gaspi { min-height: 44px; font-size: .62rem; }
    .qty-badge { width: 28px; height: 28px; font-size: .75rem; }

    .cart-section {
        position: fixed;
        inset: 5vh 0 0;
        z-index: 1500;
        width: 100%;
        max-width: none;
        padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -20px 60px rgba(23,63,53,.22);
        transform: translateY(105%);
        transition: transform .28s cubic-bezier(.2,.8,.2,1);
    }
    .cart-section::before { content: ""; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 4px; background: var(--line); }
    .cart-section.open { transform: translateY(0); }
    .cart-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--surface-muted); color: var(--text-dark); }
    .client-box, .options-box { padding: 12px; }
    #cart-list { min-height: 80px; }
    .floating-cart-btn {
        display: flex;
        right: 15px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        left: 15px;
        transform: none;
        min-height: 62px;
        justify-content: space-between;
        padding: 10px 14px 10px 19px;
        border: 0;
        border-radius: 18px;
        background: var(--primary);
        box-shadow: 0 14px 34px rgba(23,63,53,.3);
    }
    .floating-cart-btn:hover { transform: none; background: var(--primary); }
    .floating-cart-main { display: flex; align-items: center; gap: 10px; }
    .floating-cart-count { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(255,255,255,.15); }
    .floating-cart-label { text-align: left; line-height: 1.15; }
    .floating-cart-label small { display: block; margin-top: 3px; opacity: .68; font-size: .68rem; font-weight: 500; }
    .floating-cart-total { padding: 10px 12px; border-radius: 12px; background: #fff; color: var(--primary); }
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-content { width: 100%; max-width: none; max-height: 92dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
    .action-dialog { align-items: flex-end; padding: 0; }
    .action-dialog-sheet { width: 100%; max-width: none; max-height: 94dvh; overflow-y: auto; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); border: 0; border-radius: 24px 24px 0 0; transform: translateY(105%); opacity: 1; }
    .action-dialog.is-open .action-dialog-sheet { transform: translateY(0); }
    .action-dialog-handle { display: block; width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 4px; background: var(--line); }
    .reason-options { grid-template-columns: 1fr 1fr; }
    .custom-price-row { grid-template-columns: minmax(0, 1fr) 112px; }
    .action-dialog-actions.custom-price-actions { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
    .action-dialog-actions { grid-template-columns: 1fr; }
    .action-button-danger { grid-row: 1; }
    .feedback-dialog-sheet { padding-top: 16px; }
    .feedback-dialog-actions { grid-template-columns: 1fr; }
    .feedback-dialog-submit { grid-row: 1; min-height: 52px; }
    .app-toast { bottom: calc(92px + env(safe-area-inset-bottom)); width: max-content; }
}

@media (max-width: 370px) {
    .grid { grid-template-columns: 1fr; }
    .card { min-height: 128px; }
    .custom-price-row { grid-template-columns: 1fr; }
    .custom-quantity-panel { grid-template-columns: 1fr; }
    .custom-quantity-stepper { grid-template-columns: 44px 1fr 44px; }
    .custom-quantity-stepper input { width: 100%; }
    .action-dialog-actions.custom-price-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .page-transition-layer { transition-duration: .01ms !important; }
    .products-section, .cart-section { animation-duration: .01ms !important; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
