:root {
    --navy: #0a1a2f;
    --navy-mid: #123a5e;
    --accent: #09a1d2;
    --accent-text: #067aa1;
    --surface: #ffffff;
    --surface-alt: #f3f6f9;
    --text: #1c2733;
    --muted: #5b6876;
    --border: #d9e0e7;
    --error: #b3261e;
    --success: #1b6e3c;
    --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    /* Keep the footer at the bottom on short pages: body fills the viewport, main takes the slack. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }

h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--navy-mid); }
img { max-width: 100%; height: auto; }
select:not(:disabled) { cursor: pointer; }
button:not(:disabled), summary { cursor: pointer; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; align-self: center; line-height: 0; }
.brand img { display: block; height: 62px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a:not(.button) { color: var(--navy); font-weight: 600; text-decoration: none; }
.site-nav a:not(.button):hover { color: var(--accent-text); }
.button.nav-account, .button.nav-orders { display: inline-flex; align-items: center; gap: 8px; }
/* The section the customer is in: filled, with an accent bar underneath. */
.site-nav .button.nav-active { background: var(--navy); color: #fff; box-shadow: 0 4px 0 -1px var(--accent); }
.site-nav .button.nav-active:hover { background: var(--navy-mid); }
.button.nav-account svg, .button.nav-orders svg { width: 18px; height: 18px; flex: none; }

/* Buttons */
.button {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--navy);
    border-radius: var(--radius);
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover { background: var(--navy-mid); border-color: var(--navy-mid); color: #fff; }
.button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.button-small { padding: 7px 14px; font-size: 0.9rem; }
.button-accent { background: var(--accent); border-color: var(--accent); color: var(--navy); }
.button-accent:hover { background: #fff; border-color: #fff; color: var(--navy); }
.button-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.6); }
.button-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* Hero */
.hero { position: relative; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%); color: #dbe7f2; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.6fr 1fr; align-items: center; gap: 56px; padding-top: 88px; padding-bottom: 150px; }
/* Tilted white oval behind the logo, so its navy keeps the original colours on the navy hero. */
.hero-logo { position: relative; isolation: isolate; display: grid; place-items: center; }
.hero-logo img { display: block; width: 80%; }
.hero-logo::before,
.hero-logo::after { content: ""; position: absolute; border-radius: 50%; }
.hero-logo::before {
    z-index: -1;
    inset: 8% -6%;
    background: radial-gradient(ellipse at 35% 30%, #fff 55%, #e6f0f8 100%);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 0 0 0 12px rgba(255, 255, 255, 0.07);
    transform: rotate(-10deg);
}
/* Accent ring tilted a little further, echoing the swoosh in the logo. */
.hero-logo::after {
    z-index: -2;
    inset: 5% -9%;
    border: 3px solid var(--accent);
    opacity: 0.75;
    transform: rotate(-17deg);
}
.hero h1 { color: #fff; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; }
.hero-lead { font-size: 1.2rem; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-swoosh { position: absolute; left: 0; bottom: 0; width: 100%; height: 110px; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--surface-alt); }
.section h2::after { content: ""; display: block; width: 56px; height: 5px; margin-top: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--navy-mid)); }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin-top: 18px; }

/* Audience */
.audience-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 40px 0 0; padding: 0; list-style: none; }
.audience-list li { padding: 22px; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); }
.audience-list p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; }
.steps p { margin: 0; color: var(--muted); }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.contact-facts { margin: 28px 0 0; }
.contact-facts dt { color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.contact-facts dd { margin: 0 0 16px; font-weight: 600; overflow-wrap: anywhere; }
.contact-panel { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; color: var(--navy); font-weight: 600; font-size: 0.95rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid #aab6c2; border-radius: 8px; background: #fff; color: var(--text); font: inherit; }
.field textarea { resize: vertical; }
.field-invalid input, .field-invalid textarea { border-color: var(--error); }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 0.9rem; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 8px; font-weight: 600; }
.notice-success { background: #e6f4ea; color: var(--success); }
.notice-error { background: #fbe9e7; color: var(--error); }
.notice-warning { background: #fff4d6; color: #7a4b00; }

/* Footer */
.site-footer { background: var(--navy); color: #b9c7d6; padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.footer-inner p { margin: 0; }
.footer-brand { display: flex; flex-direction: column; align-items: center; }
/* The logo is navy; render it white so it shows on the navy footer. */
.footer-logo { display: block; width: 120px; margin: -14px 0 -18px; filter: brightness(0) invert(1); transform: translateX(3px); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-legal { font-size: 0.85rem; }
.footer-links { font-size: 0.9rem; }

/* Legal pages */
.legal-page { padding: 48px 0 80px; }
.legal-content { max-width: 760px; }
.legal-content h1 { margin-bottom: 4px; }
.legal-updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 32px; }
.legal-content h2 { font-size: 1.25rem; margin-top: 36px; }
.legal-content ul { padding-left: 22px; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { text-decoration: none; font-weight: 600; }

/* Messages page */
.messages-page { padding: 48px 0 80px; }
.login-form { max-width: 360px; }
.message-list { margin: 32px 0 0; padding: 0; list-style: none; }
.message-item { padding: 20px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.message-meta { color: var(--muted); font-size: 0.9rem; }
.message-body { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.messages-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Account pages */
.auth-page { padding: 48px 0 80px; background: var(--surface-alt); }
.auth-card { max-width: 440px; margin: 0 auto; padding: 32px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.auth-card h1 { margin-top: 0; font-size: 1.6rem; }
.auth-card .notice { margin-bottom: 20px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.auth-tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--accent); }
.auth-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.auth-actions .button { width: 100%; }
.button-link { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; }
.button-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #fff; color: var(--text); border: 1px solid #aab6c2; text-decoration: none; }
.button-google:hover { background: var(--surface-alt); color: var(--text); border-color: var(--navy-mid); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 0.9rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.account-page { padding: 48px 0 80px; }
.account-page h1 { margin-top: 0; font-size: 1.6rem; }
.account-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.account-card { padding: 24px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.account-card h2 { margin-top: 0; font-size: 1.2rem; }
.status-banner { padding: 20px 24px; margin-bottom: 24px; border-radius: var(--radius); background: var(--navy); color: #fff; }
.status-banner p { margin: 0 0 12px; }
.status-banner .notice { margin: 16px 0 0; }
.status-banner .field label { color: #fff; }
.status-banner .button { background: var(--accent); border-color: var(--accent); color: var(--navy); }
.status-pending { background: #e7f6fc; color: var(--navy); }
.status-pending .field label { color: var(--navy); }
.status-enabled { background: #e6f4ea; color: var(--navy); }
.status-enabled .field label { color: var(--navy); }
.status-enabled .button { background: var(--success); border-color: var(--success); color: #fff; }
.catalog-links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
/* Enabled account strip on /pedidos: check + text on the left, the catalog actions on the right. */
.status-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; padding: 18px 22px; border: 1px solid #cfe7d8; border-left: 5px solid var(--success); border-radius: var(--radius); background: linear-gradient(90deg, #edf8f1, #f8fcf9); }
.status-strip-text { display: flex; align-items: center; gap: 14px; min-width: 0; }
.status-strip-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--success); color: #fff; box-shadow: 0 4px 12px rgba(27, 110, 60, 0.25); }
.status-strip-icon svg { width: 20px; height: 20px; }
.status-strip-title { margin: 0; font-weight: 700; color: var(--navy); }
.status-strip-hint { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.status-strip-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status-strip-actions .button { background: var(--success); border-color: var(--success); color: #fff; }
.status-strip-actions .button:hover { background: #155a30; border-color: #155a30; }
.status-strip-actions .button-outline { background: transparent; color: var(--success); }
.status-strip-actions .button-outline:hover { background: var(--success); color: #fff; }
@media (max-width: 640px) {
    .status-strip { padding: 16px; }
    .status-strip-actions { width: 100%; }
    .status-strip-actions .button { flex: 1; text-align: center; }
}
.catalog-intro { color: var(--muted); margin-top: -8px; }
/* Catalog title: a small tracked kicker over a large gradient title, no underline. Centered on phones. */
.catalog-heading { margin: 0 0 20px; }
.catalog-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--accent-text); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.catalog-kicker::before, .catalog-kicker::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.catalog-kicker::after { display: none; }
.account-page h1.catalog-title { margin: 0; font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--navy); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .account-page h1.catalog-title { background: linear-gradient(100deg, var(--navy) 0%, var(--navy-mid) 45%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
.catalog-page .catalog-heading + .notice, .catalog-page .catalog-heading + .catalog-intro { margin-top: 0; }
@media (max-width: 640px) {
    .account-page.catalog-page { padding-top: 20px; }
    .catalog-heading { text-align: center; }
    .catalog-kicker::after { display: block; }
    .catalog-page .catalog-intro { text-align: center; }
}
.catalog-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.order-form .catalog-table-wrap { border: 0; border-radius: 0; }
.catalog-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.catalog-table th, .catalog-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.catalog-table thead th { background: var(--surface-alt); color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.catalog-table tbody tr:last-child td { border-bottom: 0; }
.catalog-table .numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog-code { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; }
.catalog-thumb { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.catalog-thumb-button { display: inline-block; vertical-align: middle; margin-right: 10px; padding: 0; border: 0; background: none; border-radius: 6px; cursor: zoom-in; line-height: 0; }
.catalog-thumb-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Product image preview: a floating card on hover (pointer devices) and a modal on click or tap. */
.image-preview { position: fixed; z-index: 60; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 16px 40px rgba(10, 26, 47, 0.22); pointer-events: none; opacity: 0; transform: translateY(6px) scale(0.98); transition: opacity 0.14s ease, transform 0.14s ease; }
.image-preview-visible { opacity: 1; transform: none; }
.image-preview img { display: block; width: 320px; max-width: calc(100vw - 48px); aspect-ratio: 1; object-fit: contain; border-radius: 6px; background: var(--surface-alt); }
.image-preview-loader { display: flex; align-items: center; justify-content: center; width: 320px; max-width: calc(100vw - 48px); aspect-ratio: 1; border-radius: 6px; background: var(--surface-alt); }
.image-preview-loader::after { content: ""; width: 36px; height: 36px; border: 4px solid var(--border); border-top-color: var(--navy-mid); border-radius: 50%; animation: image-modal-spin 0.8s linear infinite; }
.image-preview img[hidden], .image-preview-loader[hidden] { display: none; }
.image-preview-name { margin: 8px 0 0; max-width: 320px; font-size: 0.9rem; font-weight: 600; color: var(--navy); text-align: center; }
.image-modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 24px 16px; background: rgba(10, 26, 47, 0.78); }
.image-modal-open { display: flex; }
.image-modal-loader { width: 48px; height: 48px; border: 4px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: image-modal-spin 0.8s linear infinite; }
.image-modal-loader[hidden], .image-modal-card[hidden], .image-modal-card img[hidden], .image-modal-error[hidden] { display: none; }
.image-modal-error { margin: 0; padding: 32px 16px; color: var(--muted); font-weight: 600; text-align: center; }
@keyframes image-modal-spin { to { transform: rotate(360deg); } }
.image-modal-card { position: relative; max-width: min(92vw, 720px); max-height: 100%; padding: 16px; border-radius: var(--radius); background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); animation: image-modal-in 0.16s ease; }
.image-modal-card img { display: block; width: min(92vw - 32px, 640px); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; background: var(--surface-alt); }
.image-modal-name { margin: 12px 0 0; padding-right: 36px; font-weight: 600; color: var(--navy); }
.image-modal-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--navy); color: #fff; font: inherit; font-size: 1.5rem; line-height: 40px; text-align: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.image-modal-close:hover { background: var(--navy-mid); }
.image-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.image-modal-locked { overflow: hidden; }
@keyframes image-modal-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
    .image-modal { padding: 12px; }
    .image-modal-card { padding: 12px; }
    .image-modal-card img { width: calc(100vw - 48px); }
}

}
.catalog-empty, .catalog-footnote { color: var(--muted); }
.catalog-footnote { margin-top: 24px; }
/* Staff page: working headings, not marketing ones; actions in one aligned row. */
.admin-page h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: 0; margin: 0; }
.admin-page .messages-toolbar { align-items: baseline; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.admin-page .login-form { margin-top: 20px; }
.admin-page .notice { margin: 0 0 20px; }
.admin-table { min-width: 900px; }
.admin-table td { vertical-align: top; }
.admin-toolbar-links { display: flex; align-items: baseline; gap: 0; }
.admin-toolbar-links form { display: inline; }
.admin-toolbar-links > * + * { margin-left: 20px; padding-left: 20px; border-left: 1px solid var(--border); }
.admin-delete form { margin-top: 8px; }
.admin-delete[open] { padding: 10px 12px; margin: -10px -12px; background: #fbe9e7; border-radius: 8px; }
.admin-warning { margin: 8px 0 0; max-width: 260px; font-size: 0.9rem; color: var(--error); }
/* Text buttons: plain words that act, for staff pages. Pointer cursor, color change on hover, no underline. */
.text-button {
    display: inline-block;
    padding: 2px 0;
    background: none;
    border: 0;
    color: var(--accent-text);
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
}
.text-button:hover, .text-button:focus-visible { color: var(--navy); text-decoration: none; }
.text-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.text-button-danger { color: var(--error); }
.text-button-danger:hover, .text-button-danger:focus-visible { color: #7f1a14; }
summary.text-button { list-style: none; }
summary.text-button::-webkit-details-marker { display: none; }
.status-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 24px; }
.status-secondary .notice { flex: 1 1 280px; margin: 0; }
.status-meta { color: var(--muted); font-size: 0.9rem; }
.profile-details summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.profile-details form { margin-top: 16px; }
.button-outline { background: transparent; color: var(--navy); }
.button-outline:hover { background: var(--navy); color: #fff; }

@media (max-width: 760px) {
    html { scroll-padding-top: 72px; }
    .site-nav a:not(.button) { display: none; }
    .site-nav { gap: 8px; }
    .site-nav .button-small { padding: 7px 12px; }
    .brand img { height: 52px; }
    .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 120px; }
    .hero-logo { order: -1; width: 240px; margin: 0 auto; }
    .section { padding: 56px 0; }
    .contact-layout { grid-template-columns: 1fr; gap: 28px; }
    .contact-panel { padding: 20px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .account-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button { transition: none; }
}

/* Catalog order form: quantity controls, line totals, sticky summary bar. */
.catalog-table-order { min-width: 860px; }
.catalog-table .qty-head { text-align: center; }
.qty-cell { white-space: nowrap; }
.qty-control { display: inline-flex; align-items: center; gap: 4px; }
.qty-step, .qty-input { box-sizing: border-box; height: 36px; border-radius: 6px; font: inherit; line-height: 1; }
.qty-step { padding: 0 10px; min-width: 44px; border: 1px solid var(--navy-mid); background: var(--navy-mid); color: #fff; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.qty-step:hover { background: var(--navy); border-color: var(--navy); }
.qty-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qty-input { width: 64px; padding: 0 8px; border: 1px solid #aab6c2; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.catalog-table .current-price-head { text-align: center; }
.current-price-cell { white-space: nowrap; text-align: center; }
.current-price-control { display: inline-flex; align-items: center; gap: 6px; }
.current-price-toggle { box-sizing: border-box; height: 36px; padding: 0 12px; border: 1px solid var(--navy-mid); border-radius: 6px; background: #fff; color: var(--navy-mid); font: inherit; font-size: 0.85rem; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap; }
.current-price-toggle:hover { background: var(--surface-alt); }
.current-price-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.current-price-toggle[hidden], .current-price-field[hidden] { display: none; }
.current-price-field { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--navy-mid); border-radius: 6px; background: #fff; overflow: hidden; }
.current-price-field:focus-within { box-shadow: 0 0 0 3px rgba(9, 161, 210, 0.3); }
.current-price-prefix { padding: 0 2px 0 10px; color: var(--muted); font-weight: 600; }
.current-price-input { box-sizing: border-box; width: 80px; max-width: 80px; height: 100%; padding: 0 6px; border: 0; font: inherit; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.current-price-input:focus { outline: none; }
.current-price-remove { width: 36px; height: 100%; border: 0; border-left: 1px solid var(--border); background: var(--surface-alt); color: var(--muted); font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.current-price-remove:hover { background: var(--error); color: #fff; }
.current-price-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Confirmation dialog (replaces the native confirm). */
.confirm-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 26, 47, 0.6); }
.confirm-modal-open { display: flex; }
.confirm-modal-card { width: min(100%, 420px); padding: 24px; border-radius: var(--radius); background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); animation: image-modal-in 0.16s ease; }
.confirm-modal-title { margin: 0 0 8px; font-size: 1.15rem; color: var(--navy); }
.confirm-modal-text { margin: 0 0 20px; color: var(--text); }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.current-price-input::-webkit-outer-spin-button, .current-price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.catalog-row-selected td { background: #f3fafd; }
.line-total { font-weight: 600; }
.catalog-table-order td.line-total { font-size: 0.88rem; }
.order-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 16px; padding: 14px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 -6px 20px rgba(10, 26, 47, 0.08); }
.order-bar-summary { margin: 0; font-weight: 600; color: var(--navy); }
.order-bar .button:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 640px) {
    .order-bar { border-radius: var(--radius) var(--radius) 0 0; }
    .order-bar .button { width: 100%; }
}

/* Order review page. */
.order-items { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.order-item { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.order-item:last-child { border-bottom: 0; }
.order-item-product { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; color: var(--navy); }
.order-item-thumb { flex: 0 0 auto; }
.order-item-name { flex: 1 1 auto; min-width: 0; }
.order-item-details { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 24px; margin: 0; }
.order-item-detail { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: baseline; gap: 2px 8px; }
.order-item-detail dt { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.order-item-detail dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-item-current-price { color: var(--accent-text); }
.order-item-subtotal { justify-content: end; text-align: right; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 12px; padding-bottom: 12px; border-top: 2px solid var(--border); background: var(--surface-alt); font-size: 1.1rem; color: var(--navy); }
.order-total span { font-weight: 600; color: var(--muted); }
.order-total strong { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .order-item-details { grid-template-columns: 1fr; gap: 6px; }
    .order-item-detail { grid-template-columns: 1fr auto; justify-content: space-between; }
    .order-item-subtotal { justify-content: space-between; text-align: right; }
}
.order-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; align-items: start; }
.order-delivery { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.order-delivery dt { color: var(--muted); font-weight: 600; }
.order-delivery dd { margin: 0; }
.order-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.order-hint { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.order-actions + .order-hint { margin-top: 12px; }
@media (max-width: 760px) {
    .order-review-grid { grid-template-columns: 1fr; }
}

/* Orders list on the dashboard. */
.orders-table { min-width: 560px; }
.orders-table tbody tr.order-row { cursor: pointer; transition: background 0.12s ease; }
.orders-table tbody tr.order-row:hover td, .orders-table tbody tr.order-row:focus-within td { background: #f3fafd; }
.order-row-link { font-weight: 600; color: var(--accent-text); }
.order-row-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* One order, read only. */
.back-link { margin: 0 0 20px; }
.order-view-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.order-view-head h1 { margin: 0 0 6px; font-size: 1.5rem; }
.order-view-head .status-pill { margin-top: 10px; font-size: 0.95rem; padding: 6px 14px; }
.order-view-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; color: var(--muted); }
.order-view-meta strong { color: var(--navy); }
.order-view-locked { margin: 0 0 20px; }
.order-item-original { display: inline-block; margin-left: 6px; color: var(--muted); font-size: 0.85rem; text-decoration: line-through; }
.order-sheet-wrap { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 30px rgba(10, 26, 47, 0.06); overflow: hidden; }
.order-sheet { width: 100%; border-collapse: collapse; }
.order-sheet th, .order-sheet td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.order-sheet thead th { background: var(--surface-alt); color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.order-sheet .numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-sheet tbody tr:nth-child(even) td { background: #fbfcfd; }
.order-sheet-product { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--navy); }
.order-sheet-thumb { flex: none; display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--surface-alt); }
.order-sheet-thumb-empty { border: 1px dashed var(--border); }
.order-sheet-total th { color: var(--muted); font-weight: 600; text-align: right; }
.order-sheet-total th, .order-sheet-total td { border-top: 2px solid var(--border); border-bottom: 0; background: var(--surface-alt); font-size: 1.1rem; color: var(--navy); }
@media (max-width: 640px) {
    .order-sheet thead { display: none; }
    .order-sheet, .order-sheet tbody, .order-sheet tfoot, .order-sheet tr { display: block; }
    .order-sheet tbody tr { padding: 14px; border-bottom: 1px solid var(--border); }
    .order-sheet tbody tr:nth-child(even) td { background: transparent; }
    .order-sheet td { display: block; padding: 0; border: 0; }
    .order-sheet td.order-sheet-product { display: flex; margin-bottom: 12px; }
    .order-sheet-thumb { width: 64px; height: 64px; }
    .order-sheet td[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; white-space: normal; }
    .order-sheet td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
    .order-sheet-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; }
    .order-sheet-total th, .order-sheet-total td { display: block; padding: 0; border: 0; background: transparent; }
}

/* Contact modal (logged-in header button) */
.contact-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 26, 47, 0.6); overflow-y: auto; }
.contact-modal[hidden] { display: none; }
.contact-modal-card { position: relative; width: min(100%, 620px); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; border-radius: var(--radius); background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); animation: image-modal-in 0.16s ease; }
.contact-modal-title { margin: 0 0 4px; padding-right: 44px; font-size: 1.4rem; color: var(--navy); }
.contact-modal-lead { margin: 0 0 20px; color: var(--muted); }
.contact-modal-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-alt); color: var(--navy); font: inherit; font-size: 1.5rem; line-height: 40px; text-align: center; cursor: pointer; }
.contact-modal-close:hover { background: var(--border); }
.contact-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-whatsapp { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }
.contact-whatsapp-lead { margin: 0 0 12px; color: var(--muted); font-weight: 600; }
.contact-whatsapp-link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; background: #25d366; color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.contact-whatsapp-link:hover { background: #1ebe5b; color: #fff; }
.contact-whatsapp-icon { width: 26px; height: 26px; flex: none; }
body.contact-modal-locked { overflow: hidden; }

/* Toast: confirmation after the contact modal sends. */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; display: flex; align-items: center; gap: 12px; width: min(calc(100vw - 32px), 520px); padding: 14px 16px 14px 18px; border-radius: var(--radius); background: var(--success); color: #fff; font-weight: 600; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); transform: translateX(-50%); animation: toast-in 0.2s ease; }
.toast p { flex: 1; margin: 0; }
.toast-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff; font: inherit; font-size: 1.3rem; line-height: 32px; text-align: center; cursor: pointer; }
.toast-close:hover { background: rgba(255, 255, 255, 0.32); }
.toast-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 640px) {
    .contact-modal { padding: 12px; }
    .contact-modal-card { padding: 20px; }
    /* Phones: "Mis pedidos" and "Mi cuenta" (or "Iniciar sesión") sit on the logo's row, at the right. When a logged-in
       page also shows "Contacto", it takes a full-width row below. The nav dissolves so its buttons line up with the logo. */
    html { scroll-padding-top: 104px; }
    .header-inner { flex-wrap: wrap; justify-content: flex-start; min-height: 0; padding-top: 10px; padding-bottom: 10px; gap: 10px 8px; }
    .brand { margin-right: auto; }
    .brand img { height: 46px; }
    .site-nav { display: contents; }
    .site-nav .button-small { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 8px 10px; font-size: 0.85rem; white-space: nowrap; }
    .site-nav .button-small.nav-contact { order: 1; }
    .header-inner:has(.nav-orders) .nav-contact { flex: 1 0 100%; }
}
@media (max-width: 380px) {
    .header-inner { column-gap: 6px; }
    .site-nav .button-small { padding: 8px 7px; font-size: 0.8rem; }
    .button.nav-account, .button.nav-orders { gap: 5px; }
}
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.status-pill-success { background: #e6f4ea; color: var(--success); }
.status-pill-pending { background: #fff4d6; color: #7a4b00; }
.status-pill-error { background: #fbe9e7; color: var(--error); }
.status-pill-muted { background: var(--surface-alt); color: var(--muted); }
.order-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #e7f6fc; color: var(--navy); font-size: 0.8rem; font-weight: 600; }

/* Catalog group tabs and collapsible sections */
[hidden] { display: none !important; }
/* Category bar: square tiles (tinted, slightly rounded; the chosen one filled navy) with the category icon over its
   name, on a strip that sticks under the header. Round arrows (styled like the subcategory chevrons) at both ends say
   whether more categories hide that way: light blue when there are, pale grey when that end is reached; both stay
   hidden when every category fits. */
.catalog-toolbar { position: sticky; top: var(--header-height, 0px); z-index: 6; margin: 0 -16px 16px; padding: 10px 16px 12px; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: saturate(1.4) blur(6px); backdrop-filter: saturate(1.4) blur(6px); }
.catalog-toolbar:not(:has(> :not([hidden]))) { display: none; }
.catalog-tabs-bar { display: flex; align-items: center; gap: 8px; }
.catalog-search:not([hidden]) + .catalog-tabs-bar { margin-top: 10px; }
.catalog-tabs { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; gap: 8px; padding: 2px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.catalog-tabs::-webkit-scrollbar { display: none; }
.catalog-tabs.tabs-fade-start { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px); mask-image: linear-gradient(90deg, transparent 0, #000 28px); }
.catalog-tabs.tabs-fade-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%); }
.catalog-tabs.tabs-fade-start.tabs-fade-end { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
.catalog-tab { flex: none; scroll-snap-align: start; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 92px; min-height: 84px; padding: 10px 6px 8px; border: 1px solid #d5e0ea; border-radius: 8px; background: #edf2f7; color: var(--navy-mid); font: inherit; font-size: 0.8rem; font-weight: 700; line-height: 1.15; text-align: center; cursor: pointer; box-shadow: 0 1px 0 rgba(10, 26, 47, 0.06); transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.catalog-tab:hover { background: #dfe9f2; border-color: #c3d3e1; color: var(--navy); }
.catalog-tab-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: #fff; color: var(--accent-text); transition: background-color 0.2s ease, color 0.2s ease; }
.catalog-tab-icon svg { width: 26px; height: 26px; }
.catalog-tab-name { display: -webkit-box; max-width: 100%; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.catalog-tab[aria-selected="true"] .catalog-tab-icon { background: rgba(255, 255, 255, 0.14); color: #fff; }
.catalog-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.catalog-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 4px 10px -4px rgba(10, 26, 47, 0.55); }
.tabs-arrow { flex: none; align-self: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #e7f6fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067aa1' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat; cursor: pointer; transition: opacity 0.2s ease, background-color 0.2s ease; }
.tabs-arrow-prev { transform: scaleX(-1); }
.tabs-arrow:hover:not(:disabled) { background-color: #d3eef9; }
.tabs-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* That end is reached: the arrow stays in place but turns pale and inert. */
.tabs-arrow:disabled { background-color: var(--surface-alt); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab6c2' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E"); opacity: 0.6; cursor: default; }
.catalog-section { margin: 0; }
.catalog-section + .catalog-section { border-top: 1px solid var(--border); }
.catalog-section[open] { padding-bottom: 14px; }
.catalog-section:last-of-type { margin-bottom: 16px; }
.catalog-section-summary { display: flex; align-items: center; gap: 10px; padding: 10px 4px; cursor: pointer; color: var(--navy); font-weight: 700; font-size: 1.1rem; list-style: none; }
.catalog-section-summary::-webkit-details-marker { display: none; }
/* Chevron in a soft circle: points right when collapsed, turns down and fills navy when open. */
.catalog-section-summary::before { content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e7f6fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067aa1' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform 0.25s ease, background-color 0.25s ease; }
.catalog-section-summary:hover::before { background-color: #d3eef9; }
.catalog-section[open] > .catalog-section-summary::before { transform: rotate(90deg); background-color: var(--navy); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E"); }
.catalog-section.section-closing > .catalog-section-summary::before { transform: none; background-color: #e7f6fc; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067aa1' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E"); }
.catalog-section-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
    .catalog-section-summary::before { transition: none; }
}
/* Right side of a subcategory title: the number of products, big, beside "productos / disponibles" in two lines. */
.catalog-section-count { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); }
.catalog-section-number { min-width: 1.4em; color: var(--navy); font-size: 1.35rem; font-weight: 800; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.catalog-section-label { font-size: 0.7rem; font-weight: 600; line-height: 1.15; text-align: left; text-transform: lowercase; }
@media (max-width: 640px) {
    .catalog-tab { width: 80px; min-height: 76px; padding: 8px 4px 7px; font-size: 0.75rem; }
    .catalog-tab-icon { width: 36px; height: 36px; }
    .catalog-tab-icon svg { width: 24px; height: 24px; }
    .tabs-arrow { width: 26px; height: 26px; background-size: 16px; }
}

/* Phones: each product becomes a card and the quantity stepper spans the full width with thumb-sized buttons. */
@media (max-width: 640px) {
    .catalog-table-wrap { overflow-x: hidden; }
    .catalog-table-order { min-width: 0; width: 100%; }
    .catalog-table-order, .catalog-table-order tbody { display: block; }
    .catalog-table-order thead { display: none; }
    .catalog-table-order tr.catalog-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "current current" "qty qty" "total total"; gap: 10px 12px; padding: 14px; border-bottom: 1px solid var(--border); }
    .catalog-table-order tr.catalog-row:last-child { border-bottom: 0; }
    .catalog-table-order td { display: block; padding: 0; border: 0; white-space: normal; }
    .catalog-table-order td.catalog-name { grid-area: name; display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); }
    .catalog-table-order td.catalog-price { grid-area: price; align-self: center; text-align: right; }
    .catalog-table-order td.current-price-cell { grid-area: current; text-align: left; }
    .catalog-table-order td.qty-cell { grid-area: qty; }
    .catalog-table-order td.line-total { grid-area: total; display: flex; justify-content: space-between; align-items: baseline; }
    .catalog-table-order td.line-total::before { content: "Subtotal"; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
    .catalog-thumb-button { margin-right: 0; }
    .catalog-row-selected { background: #f3fafd; }
    .qty-cell { white-space: normal; }
    .qty-control { display: flex; width: 100%; gap: 4px; }
    .qty-step, .qty-input { height: 40px; }
    .qty-step { flex: 1; min-width: 0; padding: 0; font-size: 0.9rem; }
    .qty-input { flex: 1.3; width: auto; min-width: 0; font-size: 1.05rem; font-weight: 700; }
    .current-price-control { width: 100%; }
    .current-price-cell { white-space: normal; }
    .current-price-field, .current-price-toggle { height: 40px; }
    .current-price-input { width: 80px; font-size: 1rem; }
    .current-price-remove { width: 40px; }
    /* Product cards: the title runs the full width and the thumb sits at the left spanning the rows below it. Buy:
       list price (right-aligned), quantity stepper, subtotal. Pre-buy adds "Informar precio" left of the list price. */
    .catalog-table-order tr.catalog-row { grid-template-columns: auto 1fr; grid-template-areas: "name name" "thumb price" "thumb qty" "thumb total"; }
    .catalog-table-order td.catalog-name { display: contents; }
    .catalog-table-order .catalog-name-text { grid-area: name; font-weight: 600; color: var(--navy); }
    .catalog-table-order .catalog-thumb-button { grid-area: thumb; align-self: center; }
    .catalog-table-order .catalog-thumb { width: 120px; height: 120px; }
    .catalog-table-order td.catalog-price { grid-area: price; align-self: center; text-align: right; }
    .catalog-table-order td.line-total { justify-content: space-between; gap: 12px; }
    .catalog-table-order td.line-total::before { font-size: 0.8rem; }
    .catalog-table-prebuy tr.catalog-row { grid-template-columns: auto 1fr auto; grid-template-areas: "name name name" "thumb current price" "thumb qty qty" "thumb total total"; }
    .catalog-table-prebuy td.current-price-cell { grid-area: current; align-self: center; min-width: 0; text-align: center; }
    .catalog-table-prebuy .current-price-control { justify-content: center; }

    /* An open subcategory's title sticks under the header (height measured by catalog.js) for a quick close. */
    .catalog-section[open] > .catalog-section-summary { position: sticky; top: calc(var(--header-height, 0px) + var(--tabs-height, 0px)); z-index: 5; margin: 0 -16px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 6px 12px -10px rgba(10, 26, 47, 0.35); }
}

/* "Old draft" reminder on the catalog: what the draft holds, grouped and collapsed, and keep / discard. */
.draft-modal { overflow-y: auto; }
.draft-modal-card { width: min(100%, 520px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.draft-modal-heading { margin: 0 0 8px; color: var(--navy); font-weight: 700; }
.draft-modal-groups { margin: 0 0 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.draft-modal-group + .draft-modal-group { border-top: 1px solid var(--border); }
.draft-modal-group-summary { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; color: var(--navy); font-weight: 700; list-style: none; }
.draft-modal-group-summary::-webkit-details-marker { display: none; }
.draft-modal-group-summary::before { content: "▸"; color: var(--accent-text); transition: transform 0.15s ease; }
.draft-modal-group[open] > .draft-modal-group-summary::before { transform: rotate(90deg); }
.draft-modal-group-count { margin-left: auto; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.draft-modal-items { margin: 0; padding: 0 14px 10px; list-style: none; }
.draft-modal-item { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 12px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: 0.92rem; }
.draft-modal-item-qty { color: var(--muted); font-variant-numeric: tabular-nums; }
.draft-modal-item-net { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.draft-modal-item-current { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; }
.draft-modal-total { display: flex; justify-content: space-between; margin: 0 0 16px; color: var(--navy); }
.draft-modal .confirm-modal-actions form { margin: 0; }
@media (max-width: 640px) {
    .draft-modal .confirm-modal-actions, .draft-modal .confirm-modal-actions form, .draft-modal .confirm-modal-actions .button { width: 100%; }
    .draft-modal .confirm-modal-actions { flex-direction: column-reverse; }
}

/* Product search, above the categories: a soft rounded field with a leading icon; the count of matches in the chosen
   category and the clear button sit inside it at the right. */
.catalog-search { position: relative; display: flex; align-items: center; height: 44px; border: 1px solid #d5e0ea; border-radius: 10px; background: #f7fafc; box-shadow: inset 0 1px 2px rgba(10, 26, 47, 0.05); transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
.catalog-search:hover { border-color: #c3d3e1; }
.catalog-search:focus-within { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(9, 161, 210, 0.15); }
.catalog-search-icon { flex: none; width: 20px; height: 20px; margin: 0 4px 0 14px; color: var(--muted); transition: color 0.2s ease, transform 0.2s ease; }
.catalog-search:focus-within .catalog-search-icon { color: var(--accent-text); }
.catalog-search-input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 8px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; outline: none; -webkit-appearance: none; appearance: none; }
.catalog-search-input:focus, .catalog-search-input:focus-visible { outline: none; box-shadow: none; }
.catalog-search-input::placeholder { color: #8795a3; transition: color 0.2s ease; }
/* Focus says "type to filter": the border and icon turn blue, the icon nudges, and the placeholder names the category. */
.catalog-search:focus-within .catalog-search-icon { transform: scale(1.12); }
.catalog-search:focus-within .catalog-search-input::placeholder { color: var(--accent-text); }
.catalog-search-input::-webkit-search-cancel-button, .catalog-search-input::-webkit-search-decoration { -webkit-appearance: none; }
.catalog-search-count { flex: none; margin-right: 10px; padding: 2px 8px; border-radius: 6px; background: #e7f6fc; color: var(--accent-text); font-size: 0.78rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog-search-count:empty { display: none; }
.catalog-search-clear { flex: none; width: 28px; height: 28px; margin: 0 8px 0 -4px; padding: 0; border: 0; border-radius: 50%; background: #dfe7ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123a5e' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 14px no-repeat; cursor: pointer; transition: background-color 0.2s ease; }
.catalog-search-clear:hover { background-color: #c9d6e2; }
.catalog-search-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.catalog-search-mark { padding: 0 1px; border-radius: 3px; background: #fff1b8; color: inherit; box-shadow: 0 0 0 1px #f3dc7a; }
.catalog-search-empty { margin: 24px 0; padding: 28px 16px; border: 1px dashed #c3d3e1; border-radius: var(--radius); background: #f7fafc; color: var(--muted); text-align: center; }
.catalog-search-empty strong { color: var(--navy); }
@media (max-width: 640px) {
    .catalog-search { height: 42px; }
    .catalog-search-input { font-size: 16px; }
}

/* "Install the app" banner (install.js): a floating card at the bottom with the app icon, the site's message, Instalar and an X. */
.install-banner { position: fixed; left: 50%; bottom: 16px; z-index: 70; display: flex; align-items: center; gap: 12px; width: min(calc(100vw - 24px), 520px); padding: 12px 12px 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 18px 44px rgba(10, 26, 47, 0.28); transform: translateX(-50%); animation: install-banner-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes install-banner-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.install-banner-icon { flex: none; width: 48px; height: 48px; border-radius: 10px; }
.install-banner-text { flex: 1 1 auto; min-width: 0; }
.install-banner-title { margin: 0; color: var(--navy); font-weight: 800; line-height: 1.2; }
.install-banner-lead { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.3; }
.install-banner-action { flex: none; }
.install-banner-close { flex: none; align-self: flex-start; width: 26px; height: 26px; margin: -4px -4px 0 0; padding: 0; border: 0; border-radius: 50%; background: var(--surface-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6876' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 12px no-repeat; cursor: pointer; }
.install-banner-close:hover { background-color: var(--border); }
.install-banner-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .install-banner { animation: none; }
}

/* Price dialog (catalog.js): product name, a large "$" field and the Cancelar / Aceptar pair. */
.price-modal-card { width: min(100%, 380px); }
.price-modal-product { margin: 0 0 16px; color: var(--navy); font-weight: 700; line-height: 1.3; }
.price-modal-label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.price-modal-field { display: flex; align-items: center; height: 52px; border: 1px solid #c3d3e1; border-radius: 10px; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.price-modal-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(9, 161, 210, 0.15); }
.price-modal-prefix { padding: 0 4px 0 14px; color: var(--muted); font-size: 1.2rem; font-weight: 700; }
.price-modal-input { flex: 1; min-width: 0; height: 100%; padding: 0 14px 0 4px; border: 0; background: transparent; color: var(--navy); font: inherit; font-size: 1.35rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.price-modal-input:focus, .price-modal-input:focus-visible { outline: none; }
.price-modal-hint { margin: 8px 0 20px; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.current-price-input[readonly] { cursor: pointer; }
