@font-face {
    font-family: "Montserrat";
    src: url('/fonts/montserrat-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}
:root {
    --blue: #163987;
    --navy: #112855;
    --red: #c6293d;
    --red-dark: #a9192d;
    --white: #fff;
    --ink: #172842;
    --muted: #53657d;
    --line: #dce4ef;
    --paper: #f4f7fc;
    --soft-blue: #eaf1ff;
    --radius: 14px;
    font-family: "Montserrat", "Avenir Next", "Segoe UI", system-ui, sans-serif;
    font-weight: 400;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
    font-feature-settings: "tnum" 1;
    line-height: 1.48;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--red-dark); }
button, input, select, textarea { font: inherit; }
input, select, textarea { font-weight: 400; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid #4975db; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, b { font-weight: 500; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.045em; line-height: 1.12; }
h2 { font-size: 1.28rem; letter-spacing: -.025em; line-height: 1.2; }
h3 { font-size: 1.04rem; line-height: 1.25; }
p + p { margin-top: .5rem; }
small { font-size: .79rem; color: var(--muted); }
.frame { width: min(100% - 3rem, 1240px); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 1.18rem; font-weight: 500; line-height: 1.1; color: inherit; white-space: nowrap; }
.brand small { display: block; margin-top: .24rem; font-size: .74rem; font-weight: 500; }
.mark { display: inline-grid; grid-auto-flow: column; width: 48px; height: 48px; place-content: center; align-items: baseline; flex: none; background: var(--blue); border-radius: 13px; color: white; font-size: 1.45rem; font-weight: 500; letter-spacing: -.08em; }
.mark span { color: #ff7280; }
.storefront {
    --store-card-shadow: 0 2px 6px rgb(17 25 66 / 5%), 0 8px 24px rgb(17 25 66 / 5%);
}
.store-nav { background: white; box-shadow: 0 1px 8px rgb(17 25 66 / 5%); }
.navinner { min-height: 73px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.navinner nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.7rem, 2.3vw, 2rem); }
.navinner nav a, .navinner .text-button { color: var(--ink); font-size: .91rem; font-weight: 500; text-decoration: none; }
.navinner nav a:hover { color: var(--red); }
.customer-greeting {
    min-width: 0;
    max-width: min(100%, 22rem);
    color: var(--blue);
    font-size: .9rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.navinner .office-link { border-inline-start: 1px solid var(--line); padding-inline-start: 1.2rem; color: var(--blue); }
.store-main { padding-top: 1.6rem; min-height: 73vh; }
.footer { display: flex; justify-content: space-between; gap: .6rem; border-top: 1px solid var(--line); padding: 1.1rem 0; margin-top: 3rem; font-size: .85rem; color: var(--muted); }
.hero { border-radius: 20px; background: #e2e9fd url('/portada-empaques.webp') no-repeat right center / cover; color: white; min-height: 355px; display: flex; align-items: center; overflow: hidden; }
.hero-copy { padding: clamp(1.5rem, 5.5vw, 4.3rem); width: min(58%, 610px); }
.hero h1 { font-size: clamp(2.35rem, 4.65vw, 4.2rem); letter-spacing: -.045em; }
.hero p { color: #f1f5ff; max-width: 32ch; margin: 1rem 0 1.3rem; font-size: 1.04rem; }
.store-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; margin-top: 2rem; }
.filters { display: flex; gap: .6rem; margin-bottom: 1rem; align-items: end; }
.filters .search { flex: 1; }
.products { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.product-card { display: flex; flex-direction: column; min-width: 0; gap: .4rem; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; min-height: 192px; }
.product-card > strong { font-size: 1.17rem; color: var(--blue); margin-top: auto; }
.product-card h3 { margin: .15rem 0 .4rem; }
.product-meta { display: flex; align-items: center; gap: .4rem; justify-content: space-between; color: var(--muted); font-size: .72rem; line-height: 1.2; }
.product-meta span:first-child { color: var(--blue); background: var(--soft-blue); border-radius: 4px; padding: .28rem .4rem; }
.add { display: grid; grid-template-columns: minmax(48px, .55fr) minmax(0, 1fr); gap: .35rem; margin-top: .3rem; }
.add button { padding-inline: .42rem; }
.basket { position: sticky; top: 1rem; }
.basket h2 { margin-bottom: .8rem; }
.basket > small { margin-top: .6rem; display: block; }
.basket-line { display: flex; align-items: center; gap: .55rem; justify-content: space-between; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.basket-line strong { font-size: .9rem; }
.basket-line small { display: block; }
.basket-total { display: flex; justify-content: space-between; gap: .4rem; align-items: baseline; padding: .85rem 0; font-size: .92rem; }
.basket-total strong { font-size: 1.3rem; color: var(--blue); }
.backoffice { display: grid; grid-template-columns: 235px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; align-self: start; gap: 1.6rem; padding: 1.55rem 1rem 1rem; background: var(--navy); color: white; }
.sidebar .brand { padding: .15rem .35rem; }
.sidebar .brand:hover, .sidebar a:hover { color: white; }
.sidebar .brand small { color: #c6d6f5; }
.sidebar .mark { background: white; color: var(--navy); }
.sidebar .mark span { color: var(--red); }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a, .storelink { text-decoration: none; color: #dce7fb; padding: .66rem .74rem; line-height: 1.25; font-size: .92rem; font-weight: 500; border-radius: 8px; }
.sidebar nav a:hover, .storelink:hover { background: #243d6b; }
.sidebar nav a.active { background: #294886; color: white; box-shadow: inset 3px 0 #ff6474; }
.storelink { margin-top: auto; }
.userline { display: flex; align-items: center; gap: .52rem; font-size: .82rem; border-top: 1px solid #365079; padding-top: .8rem; }
.userline form { margin-left: auto; }
.sidebar .text-button { color: #e4edff; }
.avatar { width: 32px; height: 32px; border-radius: 10px; background: #294886; display: grid; place-items: center; flex: none; font-weight: 500; }
.workspace { width: min(100%, 1550px); padding: clamp(1.15rem, 3.4vw, 3.2rem); }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.45rem; }
.page-title.compact { align-items: center; margin-bottom: .8rem; }
.page-title h2 { font-size: 1.58rem; }
.page-title p { margin: .35rem 0; }
.context { text-transform: capitalize; font-weight: 500; color: var(--blue); font-size: .85rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.15rem; }
.metric { display: grid; gap: .33rem; padding: 1.07rem 1.15rem; background: white; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 12px; }
.metric:nth-child(2) { border-top-color: var(--red); }
.metric > span { font-size: .92rem; color: var(--muted); font-weight: 500; }
.metric strong { font-size: clamp(1.27rem, 2.8vw, 2.02rem); letter-spacing: -.04em; }
.panel { border: 1px solid var(--line); background: white; border-radius: var(--radius); padding: 1.15rem; min-width: 0; }
.panel.flush { padding: 0; }
.panel > h2 { margin-bottom: .85rem; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .65rem; }
.flush .panel-heading { padding: 1.1rem 1.1rem 0; }
.panel-heading.stacked { align-items: flex-start; flex-direction: column; }
.panel-heading.stacked label { width: 100%; }
.panel-heading a { font-size: .85rem; }
.narrow { max-width: 490px; }
.login { width: min(100%, 460px); margin: 2.4rem auto; padding: clamp(1.4rem, 4vw, 2.2rem); }
.login p { margin: .65rem 0; }
.login form { margin-top: 1rem; }
.two-col, .pos-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; align-items: start; margin-bottom: 1.1rem; }
.pos-grid { grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); }
.table-wrap { overflow-x: auto; }
table { width: 100%; text-align: left; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .65rem .74rem; border-bottom: 1px solid #e8edf5; vertical-align: middle; }
th { color: var(--muted); font-size: .77rem; font-weight: 500; background: #f5f8fe; }
tbody tr:last-child > td { border-bottom-width: 0; }
td small { display: block; }
.num { text-align: right; white-space: nowrap; }
.table-link { font-weight: 500; text-decoration: none; }
.pill { color: #34445c; background: #eff2f7; border-radius: 99px; font-size: .76rem; padding: .28rem .52rem; font-weight: 500; white-space: nowrap; }
.status-completed { background: #e3f5ee; color: #136348; }
.status-reserved { background: #e7efff; color: #224b9e; }
.status-returned, .status-expired, .status-cancelled { background: #faeaf0; color: #951b40; }
.stack { display: grid; gap: .72rem; }
.stack > .btn { justify-self: start; }
.stack > .btn.full { justify-self: stretch; }
label { display: grid; gap: .26rem; font-size: .86rem; font-weight: 500; color: var(--ink); }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #bdcade; border-radius: 8px; padding: .53rem .65rem; color: var(--ink); background: white; }
input[type=checkbox] { width: auto; align-self: start; margin-top: .25rem; }
.check { display: flex; align-items: start; gap: .45rem; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-decoration: none; color: var(--blue); background: white; border: 1px solid #bdcade; border-radius: 8px; min-height: 40px; padding: .46rem .82rem; white-space: nowrap; font-size: .88rem; font-weight: 500; }
.btn:hover { border-color: var(--blue); color: var(--blue); background: var(--soft-blue); }
.btn.primary, .btn.danger { color: white; background: var(--red); border-color: var(--red); }
.btn.primary:hover, .btn.danger:hover { background: var(--red-dark); border-color: var(--red-dark); color: white; }
.btn.white { border-color: white; }
.btn.full { width: 100%; }
.btn.square { width: 38px; min-height: 36px; padding: 0; font-size: 1.2rem; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 500; padding: .25rem; white-space: nowrap; font-size: .83rem; }
.text-button:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 1.4rem .3rem; }
.notice { background: #e2f2fb; border-left: 4px solid var(--blue); color: var(--navy); padding: .75rem 1rem; margin-bottom: .9rem; border-radius: 6px; }
.notice.error { background: #fbedf0; border-left-color: var(--red); color: #82182a; }
.notice ul { margin: .3rem 0 0; padding-left: 1.15rem; }
.pay-fields, .fields { display: grid; gap: .7rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.payment-change { display: flex; justify-content: space-between; gap: .5rem; font-size: .87rem; color: var(--muted); }
.pos-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) 68px auto; }
.record { border-top: 1px solid var(--line); padding: .62rem 0; }
summary { color: var(--blue); font-weight: 500; }
.inset { margin-top: .7rem; }
.pager { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: center; margin-top: 1rem; color: var(--muted); font-size: .86rem; }
.receipt { max-width: 575px; margin: 0 auto .8rem; }
.receipt-head { display: flex; gap: .65rem; align-items: center; margin-bottom: .8rem; }
.receipt-head small { display: block; }
.receipt-meta { display: flex; gap: .55rem; align-items: center; padding: .5rem 0 .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.section-gap { margin-bottom: 1.05rem; }
@media (max-width: 1150px) {
    .products { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .store-grid { grid-template-columns: minmax(0,1fr) 290px; }
}
@media (max-width: 900px) {
    .backoffice { grid-template-columns: 185px minmax(0,1fr); }
    .pos-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 685px) {
    .frame { width: calc(100% - 1.35rem); }
    .navinner { min-height: 66px; gap: .5rem; }
    .brand { font-size: 1rem; gap: .4rem; }
    .mark { width: 38px; height: 38px; font-size: 1.2rem; }
    .navinner nav { gap: .4rem .68rem; justify-content: flex-end; }
    .navinner nav a, .navinner .text-button { font-size: .8rem; }
    .customer-greeting { flex-basis: 100%; order: -1; font-size: .8rem; text-align: end; }
    .navinner .office-link { padding-inline-start: .55rem; }
    .hero { min-height: 280px; background-position: 58% center; position: relative; }
    .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#102b7a 1%,#102b7aee 37%,#102b7a00 100%); }
    .hero-copy { position: relative; width: 91%; }
    .hero h1 { font-size: clamp(1.85rem, 8.8vw, 3rem); }
    .store-grid { grid-template-columns: 1fr; }
    .basket { position: static; }
    .backoffice { display: block; }
    .sidebar { position: static; min-height: 0; padding: .75rem; gap: .7rem; }
    .sidebar nav { display: flex; gap: .25rem; overflow-x: auto; }
    .sidebar nav a { white-space: nowrap; font-size: .78rem; padding: .5rem; }
    .sidebar .userline { grid-area: 1 / 2; border: 0; padding: 0; justify-content: end; }
    .sidebar .userline > span { display: none; }
    .sidebar .userline form { margin: 0; }
    .sidebar .storelink { display: none; }
    .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .sidebar nav { grid-column: 1 / -1; }
    .sidebar .brand { padding: 0; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .metric:nth-child(3) { grid-column: span 2; }
    .page-title { align-items: start; flex-wrap: wrap; }
}
@media (max-width: 390px) {
    .products { grid-template-columns: 1fr; }
    .filters { flex-wrap: wrap; }
}
@media print {
    :root, body, .workspace { background: white; color: black; }
    .sidebar, .no-print, .notice { display: none !important; }
    .backoffice { display: block; }
    .workspace { padding: 0; }
    .receipt { box-shadow: none; border: 0; padding: 0; }
}

/* AM Distribuidora */
:root {
    --blue: #102181;
    --navy: #111942;
    --red: #c61b2c;
    --red-dark: #a50e20;
    --paper: #f6f8fd;
    --ink: #192246;
}
.brand-logo { width: 92px; height: 65px; position: relative; overflow: hidden; display: inline-block; flex: none; background: #fff; border-radius: 8px; }
.storefront .store-footer { border-top: 0; }
.store-main :is(.panel, .product-card) {
    border: 0;
    box-shadow: var(--store-card-shadow);
}
.store-main .basket-line { border-bottom: 0; }
.store-main :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
    border: 0;
    background: var(--paper);
}
.store-main .catalog-toolbar input[type="search"] {
    background: var(--white);
    box-shadow: 0 1px 6px rgb(17 25 66 / 7%);
}
.brand-logo img { position: absolute; width: 138px; height: auto; left: -23px; top: -47px; max-width: none; }
.sidebar .brand-logo, .receipt-head .brand-logo { transform-origin: left center; width: 72px; height: 52px; }
.sidebar .brand-logo img, .receipt-head .brand-logo img { width: 112px; left: -20px; top: -39px; }
.sidebar .brand-logo-white { background: transparent; border-radius: 0; }
.sidebar .brand-logo-white img { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero { min-height: 340px; background-color: #e2e9fd; background-size: cover; background-position: right center; position: relative; color: var(--ink); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #e2e9fd55 14%, #e2e9fd00 66%); }
.hero-copy { position: relative; padding-inline-end: 1rem; }
.hero p { color: #34476a; }
.product-photo { width: 100%; aspect-ratio: 1.42; object-fit: cover; border-radius: 10px; background-color: #eef2fb; }
.product-photo.sample { background-image: url('/empaques-catalogo.webp'); background-size: 300% 200%; }
.sample-1 { background-position: 0 0; } .sample-2 { background-position: 50% 0; } .sample-3 { background-position: 100% 0; }
.sample-4 { background-position: 0 100%; } .sample-5 { background-position: 50% 100%; } .sample-6 { background-position: 100% 100%; }
.product-card { gap: .45rem; }
.product-order { margin-top: .2rem; }
.product-order label { font-size: .78rem; }
.product-order label:has(select) { font-size: 0; }
.product-order select { font-size: .8rem; }
.stock-warning { color: var(--red-dark); }
.variant-link { font-size: .82rem; width: fit-content; }
@media (max-width: 685px) {
    .hero { padding-top: 187px; background-position: right -9px top; background-size: auto 208px; min-height: 0; }
    .hero::before { background: linear-gradient(180deg, #e2e9fd00 155px, #e2e9fd 209px); }
    .hero-copy { width: 100%; padding: 1.05rem 1.35rem 1.4rem; }
    .store-grid .filters { flex-wrap: wrap; }
    .store-grid .filters .search { flex: 1 1 100%; }
    .store-grid .filters label:has(select) { flex: 1; }
    .brand-logo { width: 75px; height: 52px; }
    .brand-logo img { width: 115px; left: -20px; top: -40px; }
}
.line-picker { max-height: 290px; overflow-y: auto; }
.picker-row { display: grid; grid-template-columns: 1fr 78px; gap: .5rem; align-items: center; padding: .55rem .25rem; border-bottom: 1px solid var(--line); }
.picker-row small { display: block; }
.report-filters { flex-wrap: wrap; margin-bottom: 0; }

@media (min-width: 686px) and (max-width: 900px) {
    .store-grid { grid-template-columns: minmax(0, 1fr); }
    .basket { position: static; }
}

.catalog-intro.hero { min-height: 220px; background-position: center 54%; }
.catalog-intro .hero-copy { width: 48%; padding: 1.75rem 0 1.75rem clamp(1.25rem, 4vw, 3.25rem); }
.catalog-intro h1 { font-size: clamp(1.75rem, 4vw, 3.3rem); max-width: 13ch; }
.catalog-intro p { margin: .7rem 0 0; max-width: 34ch; }
.catalog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
    padding-block: .2rem .5rem;
    scroll-margin-top: 1rem;
}
.catalog-category {
    flex: 0 0 clamp(118px, 19vw, 172px);
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .55rem .7rem;
    background: var(--blue);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    border-radius: 12px;
    transition: background-color 140ms ease, box-shadow 140ms ease;
}
.catalog-category:is(:hover, :focus-visible) {
    background: var(--red-dark);
    color: var(--white);
    box-shadow: 0 4px 12px #11194224;
}
.catalog-category:focus-visible { outline-color: var(--red-dark); }
.catalog-category[aria-current="page"] { text-decoration: underline; text-underline-offset: .22em; }
@media (prefers-reduced-motion: reduce) {
    .catalog-category { transition: none; }
}
.catalog-flow.store-grid { grid-template-columns: minmax(0, 1fr); margin-top: 1rem; }
.catalog-toolbar { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.catalog-toolbar .filters { margin: 0 0 0 auto; width: min(48%, 440px); }
.catalog-flow .products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.catalog-flow .product-card { padding: .72rem; border-radius: 13px; gap: .42rem; }
.catalog-flow .product-card h3 { margin: .25rem 0 0; }
.catalog-flow .product-card > strong { font-size: 1rem; }
.catalog-flow .product-photo { aspect-ratio: 1.55; }
.catalog-flow .product-order { display: grid; gap: .45rem; }
.catalog-flow .product-order select { text-overflow: ellipsis; }
.catalog-description { font-size: .78rem; }
.catalog-stock { font-size: .73rem; }
.catalog-stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; border: 1px solid var(--line); border-radius: 8px; }
.catalog-stepper[hidden], .catalog-buy [hidden] { display: none; }
.catalog-stepper .btn { border: 0; min-height: 42px; padding: 0; }
.catalog-basket { position: static; width: min(100%, 520px); }
.cart-count { display: inline-grid; place-items: center; min-width: 1.4rem; min-height: 1.4rem; padding: 0 .25rem; border-radius: 1rem; background: #edf0fa; font-size: .76rem; }
.recent-purchases { margin-top: .65rem; }
.recent-purchases .panel-heading a { font-size: .85rem; }
.recent-purchases .basket-line { flex-wrap: wrap; }
.recent-purchases .basket-line > div { flex: 1 1 14rem; overflow-wrap: anywhere; }
.floating-cart {
    position: fixed;
    z-index: 10;
    inset-inline-end: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: .5rem .8rem;
    background: var(--blue);
    color: var(--white);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgb(17 25 66 / 22%);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.floating-cart:hover { background: var(--red-dark); color: var(--white); }
.floating-cart .cart-count { background: var(--white); color: var(--blue); }
.storefront:has(.floating-cart) .store-footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
    .catalog-flow .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 685px) {
    .catalog-intro.hero { min-height: 155px; padding-top: 0; background-size: auto 100%; background-position: right center; }
    .catalog-intro::before { background: linear-gradient(90deg, #e2e9fd 8%, #e2e9fdec 44%, transparent 75%); }
    .catalog-intro .hero-copy { width: 64%; padding: .85rem; }
    .catalog-intro p { font-size: .85rem; }
    .catalog-toolbar { flex-wrap: wrap; }
    .catalog-toolbar .filters { width: 100%; flex-wrap: nowrap; }
    .catalog-flow .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-flow .product-card { min-height: 0; padding: .57rem; }
    .catalog-flow .product-card h3 { font-size: .86rem; }
    .catalog-category { flex-basis: calc((100% - 1.8rem) / 4); font-size: .75rem; padding: .38rem; }
}
@media (max-width: 390px) {
    .catalog-category { flex-basis: calc((100% - .6rem) / 2); }
}
@media (max-width: 340px) {
    .catalog-flow .products { grid-template-columns: minmax(0, 1fr); }
}

.settings-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.settings-tabs [aria-current="page"] { color: var(--blue); border-color: var(--blue); background: var(--soft-blue); }
.settings-panel { max-width: 835px; }
.settings-fields { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.settings-wide { grid-column: 1 / -1; }
.settings-image { width: min(170px, 100%); max-height: 110px; object-fit: contain; object-position: left; }
.preserve-lines { white-space: pre-line; overflow-wrap: anywhere; }
.settings-permissions { min-width: min(19rem, 65vw); }
.catalog-promotion { padding: .65rem .9rem; border-radius: .65rem; background: var(--soft-blue); margin-top: .65rem; overflow-wrap: anywhere; }
.brand-logo.brand-logo-custom img { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.store-footer { flex-wrap: wrap; gap: .65rem 1.25rem; }
.store-footer p { margin-top: .25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem .85rem; }
@media (max-width: 640px) { .settings-fields { grid-template-columns: minmax(0, 1fr); } }
[data-address][hidden] { display: none; }

.office-menu-toggle, .pos-phone-actions { display: none; }
.table-wrap:focus-visible { outline-offset: 0; }

@media screen and (max-width: 685px) {
    .store-main { padding-top: 1rem; }
    .navinner nav a, .navinner .text-button { display: inline-flex; min-height: 44px; align-items: center; }
    .catalog-flow .product-card :is(.btn, select) { min-height: 44px; }
    .catalog-flow .product-order select { font-size: 1rem; }

    .sidebar { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .55rem; }
    .sidebar .brand { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
    .sidebar .brand-logo { width: 56px; }
    .sidebar .userline { grid-area: 1 / 3; }
    .sidebar .userline .text-button { min-height: 44px; padding-inline: .35rem; }
    .office-menu-toggle {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding-inline: .65rem;
        border: 1px solid #667ba9;
        border-radius: 8px;
        color: var(--white);
        background: transparent;
        font-size: .85rem;
    }
    .office-menu-toggle[aria-expanded="true"] { background: #294886; }
    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.25rem), 1fr));
        max-height: 55vh;
        overflow: auto;
    }
    .sidebar nav a { display: flex; align-items: center; min-height: 44px; white-space: normal; }

    .workspace { padding: 1rem .75rem 1.5rem; }
    .workspace h1 { font-size: clamp(1.65rem, 7vw, 2.25rem); }
    .workspace .panel { padding: .9rem; }
    .page-title, .panel-heading { gap: .6rem; }
    :is(.workspace, .store-main) .panel-heading { flex-wrap: wrap; }
    :is(.workspace, .store-main) :is(.btn, summary) { min-height: 44px; }
    :is(.workspace, .store-main) .btn { max-width: 100%; white-space: normal; text-align: center; }
    :is(.workspace, .store-main) :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
        min-height: 44px;
        font-size: 1rem;
    }
    .workspace .filters { flex-wrap: wrap; align-items: end; }
    .workspace .filters > label { flex: 1 1 min(100%, 10rem); min-width: 0; }
    .workspace .filters > .btn { flex: 0 1 auto; }
    .workspace :is(.fields, .pay-fields, .settings-fields) { grid-template-columns: minmax(0, 1fr); }
    .workspace .panel :is(p, h2, summary), .workspace .basket-line > div, .store-main .basket-line > div { overflow-wrap: anywhere; }
    .workspace .basket-line, .store-main .basket-line { flex-wrap: wrap; }
    .workspace .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .workspace .metric { padding: .75rem; overflow-wrap: anywhere; }
    .workspace .table-wrap :is(th, td), .store-main .table-wrap :is(th, td) { padding-inline: .55rem; }
    .table-wrap[data-horizontal-scroll] { border-inline-end: 2px solid var(--line); }

    .pos-phone-actions { display: flex; margin-bottom: .75rem; }
    #venta-actual { scroll-margin-top: .75rem; }
}

@media screen and (max-width: 360px) {
    .workspace .metrics { grid-template-columns: minmax(0, 1fr); }
    .workspace .metric:nth-child(3) { grid-column: auto; }
    .navinner nav { column-gap: .55rem; }
    .storefront .navinner .brand-logo { width: 57px; }
}

.catalog-format-list { min-inline-size: 0; padding: .7rem; border: 1px solid var(--line); border-radius: 8px; }
.catalog-format-list legend { color: var(--ink); font-weight: 500; }

.order-field, .mobile-presentation-note { display: none; }
.storefront { overflow-wrap: anywhere; }

@media screen and (max-width: 685px) {
    .storefront .frame {
        width: auto;
        margin-inline: max(.8rem, env(safe-area-inset-left)) max(.8rem, env(safe-area-inset-right));
    }
    .storefront .navinner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
        gap: .2rem;
        padding-block: max(.4rem, env(safe-area-inset-top)) .4rem;
    }
    .storefront .navinner nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));
        width: 100%;
        gap: .25rem;
        align-items: stretch;
    }
    .storefront .navinner nav :is(a, .text-button) {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        gap: .28rem;
        padding: .3rem .12rem;
        text-align: center;
        white-space: normal;
    }
    .storefront .navinner nav form, .storefront .navinner nav .text-button { width: 100%; }
    .storefront .customer-greeting {
        grid-column: 1 / -1;
        max-width: none;
        text-align: start;
        padding-block: .2rem;
    }
    .storefront .store-main { padding-top: .9rem; }
    .catalog-intro .hero-copy { width: min(100%, 27rem); padding: 1.05rem; }
    .catalog-intro::before { background: linear-gradient(90deg, #e2e9fd 12%, #e2e9ff2 52%, #e2e9fda1); }
    .catalog-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .catalog-toolbar .filters {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .catalog-category {
        flex-basis: calc((100% - .6rem) / 2);
        font-size: .8rem;
    }
    .catalog-flow .product-card h3 { font-size: .94rem; }
    .catalog-flow .product-order select { max-width: 100%; }
    .mobile-presentation-note { display: block; }
    .catalog-stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
    .catalog-basket { scroll-margin-top: .75rem; }
    .catalog-basket .basket-line > div { flex: 1 1 10rem; min-width: 0; }
    .catalog-basket .basket-line button { min-height: 44px; white-space: normal; }
    .basket-total { flex-wrap: wrap; }
    .storefront .page-title { align-items: start; justify-content: start; }
    .storefront .page-title > :is(h1, div) { flex-basis: 100%; }
    .storefront .login { margin-block: .8rem 1.4rem; padding: 1rem; }
    .storefront :is(.fields, .pay-fields) { grid-template-columns: minmax(0, 1fr); }
    .floating-cart { max-width: calc(100% - 2rem); }
    .storefront:has(:is(input, textarea, select):focus) .floating-cart { visibility: hidden; }
    .storefront .store-footer { margin-top: 1.6rem; }
    .storefront .footer-links { align-items: center; }
    .storefront .footer-links a { padding-block: .55rem; }

    .customer-order-list { overflow: visible; }
    .customer-order-list thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    .customer-order-list :is(table, tbody) { display: block; }
    .customer-order-list tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
        padding-block: .8rem;
    }
    .customer-order-list tbody tr + tr { border-top: 1px solid var(--line); }
    .customer-order-list tbody td, .customer-order-list tbody td.num {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        text-align: start;
        white-space: normal;
    }
    .customer-order-list .order-field {
        display: block;
        font-size: .76rem;
        color: var(--muted);
    }
    .customer-order-list .pill { display: inline-block; white-space: normal; }
    .customer-order-list .order-actions {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .4rem;
    }
    .customer-order-list .order-actions form { margin: 0; }
    .customer-order-list .order-actions a { padding-block: .65rem; }
}
@media screen and (max-width: 420px) {
    .catalog-flow .products { grid-template-columns: minmax(0, 1fr); }
}

.catalog-cart-summary > .btn { margin-top: .75rem; }
.cart-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
    align-items: start;
    gap: 1rem;
}
.cart-page > section:only-child { grid-column: 1 / -1; }
.cart-item-list { list-style: none; margin: .65rem 0 0; padding: 0; display: grid; gap: .65rem; }
.cart-item {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) minmax(7.25rem, auto);
    align-items: start;
    gap: .8rem;
}
.cart-item .product-photo { aspect-ratio: 1.25; }
.cart-photo-placeholder { display: grid; place-items: center; padding: .3rem; text-align: center; font-size: .75rem; color: var(--muted); }
.cart-item-details { display: grid; gap: .25rem; min-width: 0; }
.cart-item-controls { display: grid; justify-items: end; gap: .4rem; min-width: 0; }
.cart-item-controls strong { color: var(--blue); }
.cart-item-controls form { display: grid; justify-items: end; min-width: 0; }
.cart-item-controls .catalog-stepper { width: min(100%, 8rem); }
.cart-item-controls .text-button { min-height: 44px; }
.cart-totals { display: grid; gap: .55rem; }
.cart-totals .basket-total { padding-block: .55rem; }
.pager .page-current { min-width: 40px; color: white; background: var(--blue); border-color: var(--blue); }
.pager a[aria-label] { min-width: 40px; padding-inline: .55rem; }
@media (max-width: 820px) {
    .cart-page { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
    .cart-item { grid-template-columns: minmax(4rem, 5.25rem) minmax(0, 1fr); padding: .78rem; }
    .cart-item-controls {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    .cart-item-controls form { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
    .cart-item-controls .catalog-stepper { width: 7.25rem; }
    .pager :is(.page-current, a[aria-label]) { min-width: 44px; }
}
