﻿:root {
  --red: rgb(107, 153, 222);
  --black: #111;
  --text: #1a1a1a;
  --muted: #6f6f6f;
  --line: #e8e8e8;
  --bg: #fff;
  --soft: #f6f6f6;
  --shadow: 0 8px 24px rgba(0, 0, 0, .08);
  --radius: 10px;
  --radius-sm: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Montserrat, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.topbar {
  background: var(--black);
  color: #fff;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 8px 16px;
  font-weight: 600;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 22px;
  align-items: center;
}
.logo-img { height: 36px; width: auto; display: block; }
.search-box {
  display: flex;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  outline: none;
}
.search-box button,
.icon-btn {
  flex: 0 0 auto;
  border: 0;
  background: var(--black);
  color: #fff;
  padding: 0 16px;
  min-width: 88px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 700;
}
.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 520px;
}
.user-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  line-height: 1.25;
}
.user-chip b { display: block; color: var(--black); font-size: 13px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--black);
  background: #fff;
  color: var(--black);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .02em;
  border-radius: var(--radius-sm);
}
.btn[hidden],
a.btn[hidden] {
  display: none !important;
}
.btn:hover { opacity: .86; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-black { background: var(--black); color: #fff; }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-ghost { border-color: var(--line); }
.cart-btn { position: relative; }
.cart-count {
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
}
.cart-count[hidden] { display: none; }
.main-nav {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
@media (max-width: 860px) {
  .main-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 12px;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .main-nav button {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 12px;
  }
}
.main-nav button {
  border: 0;
  background: transparent;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--text);
  border-bottom: 2px solid transparent;
}
.main-nav button.active,
.main-nav button:hover { border-bottom-color: var(--red); color: var(--red); }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 22px 110px;
}
.catalog-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.filters {
  position: sticky;
  top: 132px;
  border: 1px solid var(--line);
  padding: 18px;
  background: #fff;
  border-radius: var(--radius);
}
.filters h2 {
  margin: 0 0 16px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.filters-grid { display: grid; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  outline: none;
  border-radius: var(--radius-sm);
}
.field textarea { min-height: 78px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--black); }
.content-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
}
.content-head h3 { margin: 0; font-size: 22px; font-weight: 700; }
.content-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.view-tools { display: flex; gap: 8px; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.product {
  display: flex;
  flex-direction: column;
  background: #fff;
  content-visibility: auto;
  contain-intrinsic-size: 0 420px;
}
.catalog-status {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.grid-sentinel {
  width: 100%;
  margin: 18px 0 8px;
}
.grid-sentinel[hidden] { display: none !important; }
.thumb {
  aspect-ratio: 1;
  background: #f3f3f3;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  display: block;
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 999px;
}
.info { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 36px;
}
.price {
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.price.muted { color: var(--muted); font-size: 15px; }
.price-original {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78em;
}
.price-current {
  color: inherit;
  font-weight: inherit;
}
.meta { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 7px;
  font-weight: 600;
  border-radius: 999px;
}
.desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 4px 6px;
  color: #444;
  border-radius: 10px;
}
.swatch-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  padding: 4px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}
.swatch-photo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #f3f3f3;
  border-radius: 8px;
}
.swatch-photo span { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.2; }
.color-photo-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 92px;
  padding: 8px 6px 10px;
  border-radius: 12px;
}
.color-photo-chip img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: #f3f3f3;
  border-radius: 8px;
}
.color-photo-chip .color-dot {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.color-photo-chip span { font-size: 13px; text-align: center; line-height: 1.2; }
.choice-chip.active .color-dot { border-color: rgba(255, 255, 255, .55); }
.card-actions { margin-top: auto; display: flex; gap: 8px; }
.card-actions .btn { flex: 1; font-size: 12px; padding: 9px 8px; }
.empty {
  display: none;
  text-align: center;
  border: 1px dashed var(--line);
  padding: 48px 20px;
  color: var(--muted);
  border-radius: var(--radius);
}
.list .grid { grid-template-columns: 1fr; }
.list .product { display: grid; grid-template-columns: 180px 1fr; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; contain-intrinsic-size: 0 200px; }
.list .thumb { width: 180px; }
.list .info h4 { min-height: 0; }
.footer-note { color: var(--muted); font-size: 12px; margin-top: 28px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-card {
  background: #fff;
  max-width: 1080px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) 1fr;
  border-radius: var(--radius);
  align-items: stretch;
}
.modal-img {
  background: #f3f3f3;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 0;
  max-height: 92vh;
  position: relative;
}
.modal-img img { width: 100%; height: 100%; max-height: 92vh; object-fit: contain; object-position: center; }
.modal-photo-edit {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.modal-photo-edit[hidden] { display: none !important; }
.modal-photo-edit .btn { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.modal-photo-hint {
  margin: 0;
  flex: 1 1 100%;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.modal-body { padding: 28px; overflow: auto; min-height: 0; max-height: 92vh; }
.modal-body h3 { margin: 0 0 8px; font-size: 26px; line-height: 1.15; }
.modal-code { font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.modal-price { font-size: 28px; font-weight: 800; color: var(--red); margin: 8px 0 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.modal-price .price-original { font-size: 0.55em; }
.modal-price.muted { color: var(--muted); }
.close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  background: #fff;
  font-size: 24px;
  cursor: pointer;
  border-radius: 999px;
}
.table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.table td { border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 13px; vertical-align: top; }
.table td:first-child { color: var(--muted); font-weight: 700; width: 120px; }
.cart-form { margin: 16px 0; padding: 16px; border: 1px solid var(--line); background: var(--soft); border-radius: var(--radius); }
.cart-form .field { margin-bottom: 12px; }
.surtido-note {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chip {
  border: 2px solid var(--line);
  background: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
}
.choice-chip.active { border-color: var(--black); background: var(--black); color: #fff; }
.qty-stepper {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 8px;
  max-width: 220px;
}
.qty-stepper button {
  border: 2px solid var(--black);
  background: #fff;
  font-size: 22px;
  font-weight: 800;
  border-radius: var(--radius);
  cursor: pointer;
}
.qty-stepper input {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
.a11y-tools { display: flex; gap: 4px; }
.a11y-tools .btn { min-width: 44px; font-size: 16px; padding: 10px 12px; }
.order-dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0,0,0,.08);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
}
.order-dock[hidden] { display: none !important; }
.order-dock div { flex: 1; min-width: 0; }
.order-dock b { display: block; font-size: 16px; }
.order-dock span { font-size: 13px; color: var(--muted); }
.order-dock .btn { min-height: 48px; }
.cart-notes {
  padding: 0 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cart-notes label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cart-notes textarea {
  width: 100%;
  min-height: 88px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  resize: vertical;
  font: inherit;
}
.cart-panel-foot .btn-red { flex: 1.4; }

html[data-text="lg"] { font-size: 18px; }
html[data-text="lg"] .btn,
html[data-text="lg"] .choice-chip { font-size: 16px; min-height: 52px; }
html[data-text="lg"] .info h4 { font-size: 18px; min-height: 0; }
html[data-text="lg"] .price { font-size: 22px; }
html[data-text="xl"] { font-size: 20px; }
html[data-text="xl"] .btn,
html[data-text="xl"] .choice-chip { font-size: 18px; min-height: 56px; }
html[data-text="xl"] .info h4 { font-size: 20px; min-height: 0; }
html[data-text="xl"] .price { font-size: 24px; }
html[data-text="xl"] .search-box input { font-size: 18px; padding: 16px; }

.cart-import {
  padding: 0 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-import-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cart-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cart-import-file { cursor: pointer; display: inline-flex; align-items: center; }
.cart-form-msg { margin: 10px 0 0; font-size: 13px; font-weight: 700; }
.cart-form-msg.ok { color: #1a7a3c; }
.cart-form-msg.err { color: var(--red); }

.cart-drawer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.cart-drawer.open { pointer-events: auto; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.cart-drawer.open .cart-backdrop { opacity: 1; }
.cart-panel {
  position: absolute;
  top: 0; right: 0; height: 100%;
  width: min(440px, 100%);
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  transition: transform .22s ease;
}
.cart-drawer.open .cart-panel { transform: translateX(0); }
.cart-panel-head, .cart-panel-foot { padding: 18px; border-bottom: 1px solid var(--line); }
.cart-panel-foot { border-bottom: 0; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.cart-panel-foot .btn { flex: 1; }
.cart-panel-head h2 { margin: 0; font-size: 20px; }
.cart-panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.cart-items { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cart-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.cart-line { border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; border-radius: var(--radius); }
.cart-line-code { font-weight: 800; }
.cart-line-name { font-size: 13px; color: #444; }
.cart-line-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: var(--muted); }
.cart-line-meta b { color: var(--black); }
.cart-line-meta .price-original { margin-right: 4px; }
.cart-line-meta .price-current { color: var(--red); }
.cart-line-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cart-qty-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cart-qty-label input { width: 72px; border: 1px solid var(--line); padding: 8px; border-radius: var(--radius-sm); }
.cart-total { font-weight: 800; font-size: 16px; }

.login-page { background: #fff; }
.login-wrap {
  min-height: calc(100vh - 34px);
  display: grid;
  place-items: center;
  padding: 40px 16px;
}
.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  padding: 32px 28px;
  border-radius: var(--radius);
}
.login-card h1 { margin: 18px 0 8px; font-size: 24px; }
.login-card p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.login-card form { display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.login-card input { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.form-error { color: var(--red); font-size: 13px; font-weight: 600; margin: 0; }
.brand-link { display: flex; justify-content: center; }

.admin-header .header-row { grid-template-columns: 160px 1fr auto; }
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.admin-tabs button {
  border: 0;
  background: transparent;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.admin-tabs button.active { border-bottom-color: var(--red); color: var(--red); }
.admin-tabs .admin-tab-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.admin-tabs .admin-tab-link:hover { border-bottom-color: var(--black); }
.admin-scope-blurb {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}
body.admin-brasil-scope .admin-scope-blurb {
  background: #eef5f9;
  border-color: #c5d8e4;
}
body.admin-brasil-scope .col-local-only { display: none; }
.col-brasil-only { display: none; }
body.admin-brasil-scope .col-brasil-only { display: table-cell; }
.admin-section-title {
  margin: 22px 0 4px;
  font-size: 16px;
}
.admin-section-copy { margin: 0 0 10px; font-size: 13px; }
body.brasil-mode .topbar { background: #0b3d5c; }
body.brasil-mode .topbar span:nth-child(2) { font-weight: 800; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar input, .toolbar select {
  border: 1px solid var(--line);
  padding: 10px 12px;
  min-width: 180px;
  border-radius: var(--radius-sm);
}
.admin-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { background: var(--soft); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.admin-table tr:hover { background: #fafafa; }
.admin-table input[type="text"],
.admin-table input[type="number"] {
  width: 130px;
  border: 1px solid var(--line);
  padding: 7px 8px;
  border-radius: var(--radius-sm);
}
.thumb-mini { width: 44px; height: 44px; object-fit: contain; background: var(--soft); border-radius: var(--radius-sm); }
.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.status-pill.on { color: #1a7a3c; border-color: #b7e0c4; background: #f1faf4; }
.status-pill.off { color: var(--muted); }
.panel { display: none; }
.panel.active { display: block; }
.muted { color: var(--muted); }
.danger { color: var(--red); }
.user-form, .list-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: var(--radius);
}
.user-form .btn, .list-form .btn { align-self: end; }
.flash {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f1faf4;
  border: 1px solid #b7e0c4;
  color: #1a7a3c;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.flash.err { background: #fff1f1; border-color: #f0b4b4; color: var(--red); }

.offer-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  color: #fff;
  max-width: 58%;
  text-align: center;
  line-height: 1.2;
}
.offer-tag.tag-promo { background: var(--red); }
.offer-tag.tag-last { background: #111; }
.offer-tag.tag-sale { background: #c45c00; }
.offer-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.offer-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  text-align: left;
  font: inherit;
}
.offer-card b { display: block; font-size: 14px; margin-bottom: 4px; }
.offer-card span { font-size: 12px; color: var(--muted); font-weight: 600; }
.offer-card.tag-promo { border-left: 4px solid var(--red); }
.offer-card.tag-last { border-left: 4px solid #111; }
.offer-card.tag-sale { border-left: 4px solid #c45c00; }
.offer-card.active { box-shadow: var(--shadow); border-color: #111; }
.offer-card:hover { opacity: .9; }

.thumb-edit {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.mini-tag {
  margin-top: 6px;
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 7px;
  border-radius: 999px;
}
.mini-tag.tag-promo { background: var(--red); }
.mini-tag.tag-last { background: #111; }
.mini-tag.tag-sale { background: #c45c00; }
.label-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}
.label-form .field { min-width: 180px; }
.label-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.admin-table input[type="color"] {
  width: 56px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.admin-table .sort-order-input {
  width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.editor-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: auto;
}
.editor-drawer[hidden] { display: none !important; }
.editor-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.editor-panel {
  position: absolute;
  top: 0; right: 0; height: 100%;
  width: min(560px, 100%);
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.editor-body {
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.editor-preview {
  aspect-ratio: 1;
  background: #f3f3f3;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.add-color-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.add-color-form input { flex: 1; min-width: 0; }
.editor-colors {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.editor-color-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.editor-color-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f3f3;
  display: grid;
  place-items: center;
}
.editor-color-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.editor-color-empty {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  padding: 4px;
}
.editor-color-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.editor-color-info strong { font-size: 14px; }
.editor-color-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.editor-stock-wrap {
  overflow: auto;
  max-height: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.editor-stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.editor-stock-table th,
.editor-stock-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
}
.editor-stock-table th:first-child,
.editor-stock-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  font-weight: 700;
  z-index: 1;
}
.editor-stock-table thead th {
  position: sticky;
  top: 0;
  background: #f7f7f7;
  z-index: 2;
  font-size: 11px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-stock-table thead th:first-child { z-index: 3; }
.editor-stock-table input {
  width: 56px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font: inherit;
}
.choice-chip.is-oos {
  opacity: .45;
  text-decoration: line-through;
}
.choice-chip .chip-stock {
  display: block;
  font-size: 11px;
  font-weight: 700;
  opacity: .75;
  margin-top: 2px;
}
.choice-chip.active .chip-stock { opacity: .95; }
.stock-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.stock-hint.warn { color: #a34b00; font-weight: 700; }
.stock-hint.ok { color: #1b6b3a; font-weight: 700; }
.product-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6f0;
  color: #1b6b3a;
  font-size: 12px;
  font-weight: 700;
}
.product-stock-pill.out {
  background: #f7efe8;
  color: #a34b00;
}
.editor-color-upload {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* ===== MOBILE MENU BUTTON ===== */
.mobile-menu-btn {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

/* ===== FILTERS TOGGLE MOBILE ===== */
.filters-toggle {
  display: none;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}
.filters-toggle::after {
  content: '▼';
  font-size: 10px;
  transition: transform .2s;
}
.filters-toggle.open::after {
  transform: rotate(180deg);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-form, .list-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  /* Header layout - compact single row with logo and actions */
  .header-row, .admin-header .header-row { 
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 8px 12px;
    align-items: center;
  }
  
  /* Logo stays left */
  .header-row > a:first-child {
    display: flex;
    justify-content: flex-start;
  }
  .logo-img { height: 28px; }
  
  /* Search box in middle - compact */
  .search-box {
    order: 0;
  }
  .search-box input {
    padding: 8px 10px;
    font-size: 13px;
  }
  .search-box button {
    padding: 0 10px;
    min-width: 60px;
    font-size: 12px;
  }
  
  /* Header actions - only essential buttons */
  .header-actions {
    justify-content: flex-end;
    max-width: none;
    order: 0;
    gap: 6px;
  }
  .header-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  /* Hide non-essential elements on mobile */
  .user-chip { display: none; }
  .a11y-tools { display: none; }
  .header-actions .btn-ghost { display: none; }
  
  /* Keep only Salir and Pedido buttons */
  #logoutBtn, #cartBtn { display: inline-flex; }
  
  /* Catalog layout */
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  
  /* Show filters toggle */
  .filters-toggle { display: flex; }
  
  /* Collapse filters by default */
  .filters.collapsed .filters-grid {
    display: none;
  }
  .filters.collapsed {
    border: 0;
    padding: 0;
    background: transparent;
  }
  .filters.collapsed h2 { display: none; }
  
  /* Topbar - hide completely on mobile for more space */
  .topbar { display: none; }
  
  /* Forms */
  .user-form, .list-form { grid-template-columns: 1fr; }
  .offer-cards { grid-template-columns: 1fr; }
  
  /* Main nav scrollable - more compact */
  .main-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav button {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 11px;
  }
  
  /* Wrap padding - less top padding */
  .wrap { padding: 10px 10px 100px; }
}

@media (max-width: 760px) {
  /* Modal full screen on mobile */
  .modal { padding: 0; }
  .modal-card { 
    grid-template-columns: 1fr; 
    grid-template-rows: auto 1fr;
    max-height: 100vh;
    max-width: 100%;
    border-radius: 0;
    height: 100%;
  }
  .modal-img { 
    max-height: 45vh;
    min-height: 220px;
    aspect-ratio: auto;
    padding: 8px;
  }
  .modal-img img {
    width: 100%;
    height: 100%;
    max-height: 44vh;
    object-fit: contain;
    object-position: center;
  }
  .modal-body { 
    padding: 16px; 
    max-height: 55vh;
    overflow-y: auto;
  }
  .modal-body h3 { font-size: 20px; }
  .modal-price { font-size: 24px; margin: 6px 0 12px; }
  .close {
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 10;
  }
  
  /* Cart form compact */
  .cart-form { padding: 12px; margin: 12px 0; }
  .choice-chips { gap: 6px; }
  .choice-chip { 
    padding: 8px 12px; 
    font-size: 13px;
    min-height: 40px;
  }
  .qty-stepper { max-width: 180px; grid-template-columns: 44px 1fr 44px; }
  
  /* List view */
  .list .product { grid-template-columns: 90px 1fr; gap: 10px; }
  .list .thumb { width: 90px; }
  
  /* Grid 2 columns */
  .grid { 
    grid-template-columns: 1fr 1fr; 
    gap: 12px;
  }
  
  /* Product cards compact */
  .product .info { padding: 8px 2px 0; gap: 6px; }
  .info h4 { font-size: 13px; min-height: 32px; }
  .price { font-size: 16px; }
  .card-actions .btn { padding: 8px 6px; font-size: 11px; }
  
  /* Order dock - stack buttons */
  .order-dock { 
    flex-wrap: wrap; 
    padding: 10px 12px;
    gap: 8px;
  }
  .order-dock div { 
    flex: 1 1 100%; 
    text-align: center;
  }
  .order-dock b { font-size: 14px; }
  .order-dock span { font-size: 12px; }
  .order-dock .btn { 
    flex: 1 1 auto; 
    min-height: 44px;
    font-size: 12px;
  }
  
  /* Content head */
  .content-head { 
    flex-direction: column; 
    align-items: flex-start;
    gap: 12px;
  }
  .content-head h3 { font-size: 18px; }
  .view-tools { width: 100%; }
  .view-tools .btn { flex: 1; }
  
  /* Cart drawer */
  .cart-panel { width: 100%; }
  .cart-panel-head, .cart-panel-foot { padding: 14px; }
  .cart-panel-head h2 { font-size: 18px; }
  .cart-items { padding: 10px; gap: 8px; }
  .cart-line { padding: 10px; }
  .cart-panel-foot { 
    flex-wrap: wrap; 
    gap: 6px;
  }
  .cart-panel-foot .btn { 
    flex: 1 1 45%;
    font-size: 12px;
    padding: 10px 8px;
  }
  .cart-panel-foot .btn-red { flex: 1 1 100%; }
  
  /* Editor drawer */
  .editor-panel { width: 100%; }
  
  /* Thumb smaller */
  .thumb { border-radius: var(--radius-sm); }
}

@media (max-width: 480px) {
  /* Single column grid */
  .grid { grid-template-columns: 1fr; }
  
  /* Bigger touch targets */
  .btn { min-height: 40px; }
  
  /* Header even more compact */
  .header-row {
    padding: 6px 10px;
    gap: 8px;
  }
  
  /* Logo smaller */
  .logo-img { height: 24px; }
  
  /* Search very compact */
  .search-box input { padding: 6px 8px; font-size: 12px; }
  .search-box button { 
    padding: 0 8px; 
    min-width: 50px;
    font-size: 11px;
  }
  
  /* Header buttons minimal */
  .header-actions .btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  #cartBtn { padding: 5px 8px; }
  .cart-count {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }
  
  /* Main nav even smaller */
  .main-nav { padding: 0 8px; }
  .main-nav button { padding: 6px 10px; font-size: 10px; }
  
  /* Product info tighter */
  .info h4 { font-size: 14px; min-height: 0; }
  .price { font-size: 17px; }
  .card-actions { margin-top: 8px; }
  .card-actions .btn { padding: 10px 8px; font-size: 12px; }
  
  /* Modal body */
  .modal-img { 
    max-height: 40vh; 
    min-height: 180px;
    padding: 4px;
  }
  .modal-img img {
    max-height: 38vh;
  }
  .modal-body { 
    padding: 14px; 
    max-height: 60vh;
  }
  .modal-body h3 { font-size: 18px; }
  .modal-code { font-size: 12px; }
  
  /* Table in modal */
  .table td { padding: 6px 0; font-size: 12px; }
  .table td:first-child { width: 90px; }
  
  /* Filters compact */
  .filters { padding: 14px; }
  .filters h2 { font-size: 14px; margin-bottom: 12px; }
  .field label { font-size: 10px; }
  .field input, .field select, .field textarea { padding: 10px; font-size: 14px; }
  
  /* Photo edit buttons */
  .modal-photo-edit { 
    padding: 8px 10px;
    gap: 6px;
  }
  .modal-photo-edit .btn { 
    font-size: 11px; 
    padding: 6px 10px;
    min-height: 36px;
  }
}

/* ===== TOUCH FRIENDLY ===== */
@media (hover: none) and (pointer: coarse) {
  .btn, .choice-chip, button { min-height: 44px; }
  .field input, .field select, .field textarea { min-height: 44px; }
  .cart-qty-label input { min-height: 40px; }
}

.pedido-page .pedido-header-row {
  grid-template-columns: 120px 1fr auto;
}
.pedido-header-copy h1 {
  margin: 0;
  font-size: 20px;
}
.pedido-header-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.pedido-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
  padding-bottom: 40px;
}
.pedido-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.pedido-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.pedido-thumb {
  aspect-ratio: 1;
  background: #f3f3f3;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.pedido-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pedido-thumb-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.pedido-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pedido-code { font-size: 12px; color: var(--muted); }
.pedido-card-body h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}
.pedido-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--muted);
}
.pedido-meta b { color: var(--black); }
.pedido-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.pedido-side {
  position: sticky;
  top: 110px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pedido-side textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  resize: vertical;
  font: inherit;
}
.pedido-side-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pedido-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
@media (max-width: 980px) {
  .pedido-wrap { grid-template-columns: 1fr; }
  .pedido-side { position: static; }
}

@media (max-width: 760px) {
  .pedido-page .pedido-header-row { 
    grid-template-columns: 1fr; 
    text-align: center;
    gap: 12px;
  }
  .pedido-page .pedido-header-row > a:first-child {
    justify-content: center;
  }
  .pedido-header-copy h1 { font-size: 17px; }
  .pedido-header-copy p { font-size: 12px; }
  .pedido-page .header-actions {
    justify-content: center;
  }
  .pedido-grid { gap: 10px; }
  .pedido-card-body { padding: 10px; gap: 6px; }
  .pedido-card-body h3 { font-size: 14px; }
}

/* ===== ADMIN RESPONSIVE ===== */
@media (max-width: 860px) {
  .admin-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs button,
  .admin-tabs .admin-tab-link {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar input, .toolbar select {
    width: 100%;
    min-width: 0;
  }
  .toolbar .btn {
    width: 100%;
  }
  .toolbar .muted {
    text-align: center;
    padding: 8px 0;
  }
  
  .admin-table-wrap {
    margin: 0 -12px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .admin-table input[type="text"],
  .admin-table input[type="number"] {
    width: 80px;
    padding: 6px;
  }
  
  .label-form {
    flex-direction: column;
    align-items: stretch;
  }
  .label-form .field { min-width: 0; }
  .label-form .btn { width: 100%; }
}

@media (max-width: 480px) {
  .admin-tabs button,
  .admin-tabs .admin-tab-link {
    padding: 8px 10px;
    font-size: 11px;
  }
  
  .admin-scope-blurb {
    font-size: 12px;
    padding: 10px 12px;
  }
  
  .admin-table th, .admin-table td { 
    padding: 6px 8px;
    font-size: 11px;
  }
  .thumb-mini { width: 36px; height: 36px; }
}


/* Visitantes sin usuario: catálogo sin precios */
.guest-cta { margin: 16px 0; padding: 16px; border: 1px solid var(--line); background: var(--soft); border-radius: var(--radius); display: grid; gap: 10px; }
.guest-cta p { margin: 0; line-height: 1.5; }
.guest-mode .price { color: var(--muted); font-size: 14px; font-weight: 500; }
.login-alt { margin-top: 16px; font-size: 13px; color: var(--muted); }
.login-alt a { color: inherit; text-decoration: underline; }
