:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  --ink: #32211c;
  --cream: #fcf8f1;
  --paper: #fffdf9;
  --muted: #69574e;
  --line: #e6d7cc;
  --accent: #79383c;
  --accent-hover: #60282c;
  --focus: #a55d64;
  --tint: #f4e8dc;
  --photo-bg: #f2e4da;
  --serif: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .wordmark { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.85rem, 5.4vw, 5.9rem); letter-spacing: -.058em; line-height: .96; }
h2 { font-size: clamp(2.2rem, 3.6vw, 3.7rem); letter-spacing: -.045em; line-height: 1; }
h3 { font-size: 1.55rem; }
.eyebrow { font-size: .83rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.site-header, .site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 5vw, 5rem); border-bottom: 1px solid var(--line);
}
.site-header nav { display: flex; gap: clamp(.7rem, 3vw, 2.5rem); }
.site-header a, .site-footer a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.site-footer { border: 0; border-top: 1px solid var(--line); color: var(--muted); }
.wordmark { font-size: clamp(1.25rem, 2.5vw, 1.85rem); }
.button, .outline, .chip {
  min-height: 44px; padding: .65rem 1rem; border: 1px solid transparent; border-radius: .35rem;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
}
.button { background: var(--accent); color: white; }
.button:hover { background: var(--accent-hover); }
.outline, .chip { background: transparent; border-color: var(--line); color: var(--ink); }
.outline:hover, .chip:hover { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
#cart-count { border-radius: 50%; background: var(--tint); min-width: 1.5rem; text-align: center; }
.hero { display: grid; grid-template-columns: .95fr 1.05fr; min-height: clamp(25rem, 45vw, 41rem); background: var(--tint); }
.hero-copy { display: grid; align-content: center; justify-items: start; gap: 1.3rem; padding: clamp(2rem, 7vw, 7rem); }
.hero-copy #intro, .about p:last-child { max-width: 38ch; line-height: 1.7; color: var(--muted); }
.hero > img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }
.section { padding: clamp(2.7rem, 5vw, 5rem) clamp(1rem, 5vw, 5rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading h2, .about h2 { margin-top: .45rem; }
.filters, .chips, .toolbar { display: flex; flex-wrap: wrap; gap: .65rem; }
label { display: grid; gap: .35rem; font-size: .9rem; }
input, select, textarea {
  color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: .35rem; min-height: 44px; padding: .6rem .75rem; width: 100%;
}
input[type=checkbox] { width: auto; min-height: auto; }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: white; }
#results-status { margin: 1.1rem 0 .75rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.product { overflow: hidden; border: 1px solid var(--line); border-radius: .55rem; background: var(--paper); }
.product-photo { width: 100%; padding: 0; border: 0; display: block; background: var(--photo-bg); }
.photo { aspect-ratio: 4 / 3; background: var(--photo-bg); display: grid; place-items: center; overflow: hidden; }
.photo > img { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.product-body { padding: 1.15rem; display: grid; gap: .5rem; }
.product-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.text-button { border: 0; padding: .35rem 0; background: transparent; color: var(--accent); text-decoration: underline; }
.about { background: var(--tint); }
.about p:last-child { margin-top: 1rem; max-width: 57ch; }
dialog {
  padding: 0; max-width: min(46rem, calc(100% - 2rem)); max-height: calc(100% - 2rem);
  border: 1px solid var(--line); border-radius: .8rem; color: var(--ink); background: var(--paper);
}
dialog::backdrop { background: #2c1d19a5; }
.close-form { position: absolute; right: .65rem; top: .65rem; z-index: 1; }
.icon-button { border: 1px solid var(--line); width: 44px; height: 44px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 1.45rem; }
#product-detail { display: grid; grid-template-columns: 1fr 1fr; }
#product-detail > .photo { aspect-ratio: auto; min-height: 22rem; }
.detail-copy { padding: 3.2rem 1.45rem 1.45rem; display: grid; align-content: start; gap: 1rem; }
.detail-copy h2 { font-size: 2.2rem; }
.detail-copy p { line-height: 1.6; color: var(--muted); }
.detail-copy form, .editor-form { display: grid; gap: .8rem; }
.cart-dialog, .editor-dialog { padding: 1.6rem; width: min(40rem, calc(100% - 2rem)); }
.cart-dialog h2, .editor-dialog h2 { padding-right: 2.2rem; margin-bottom: 1rem; font-size: 2.2rem; }
.cart-line, .cart-total { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.quantity { display: flex; align-items: center; gap: .55rem; }
.quantity button { width: 44px; padding: 0; }
.cart-total { margin-bottom: 1rem; }
#editor-status { margin-top: .6rem; overflow-wrap: anywhere; white-space: pre-line; }
.panel-body { max-width: 68rem; margin: auto; }
.panel-body .section > * + * { margin-top: 1.1rem; }
.panel-list { list-style: none; padding: 0; }
.panel-list li { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.editor-form .checkbox { display: flex; align-items: center; }
.variant-row { display: grid; grid-template-columns: minmax(0, 1fr) 7rem auto; align-items: end; gap: .5rem; margin: .5rem 0; }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .site-header nav { display: none; }
  .hero, #product-detail { grid-template-columns: 1fr; }
  .hero > img { max-height: 19rem; }
  #product-detail > .photo { min-height: 0; max-height: 18rem; }
  .detail-copy { padding-top: 1.3rem; }
  .product-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
}

#order-details { margin-bottom: 1rem; }
#order-details summary { cursor: pointer; color: var(--accent); }
.order-fields { display: grid; gap: .65rem; margin-top: .65rem; }
@media (max-width: 400px) {
  .variant-row { grid-template-columns: minmax(0, 1fr) 5.5rem; }
  .variant-row button { justify-self: start; }
}

.shop-logo { display: inline-flex; align-items: center; gap: .65rem; }
.shop-logo img, .editor-logo {
  display: block;
  width: auto;
  max-width: 112px;
  height: 44px;
  object-fit: contain;
}
.shop-logo img { max-width: clamp(42px, 12vw, 112px); }
.whatsapp-button { background: #087a50; color: #fff; font-weight: 650; }
.whatsapp-button:hover { background: #056441; }
.whatsapp-button svg { width: 1.2rem; height: 1.2rem; }
.order-notice { margin-top: .6rem; font-size: .9rem; }

.presentation-section {
  padding: clamp(1rem, 2.6vw, 1.8rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .7rem;
  scroll-margin-top: 1rem;
}
.presentation-section h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 1.35rem; }
.presentation-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.6rem; }
.presentation-fields { min-width: 0; display: grid; align-content: start; gap: 1rem; }
.presentation-fields label { font-weight: 550; }
.presentation-fields input, .presentation-fields select, .presentation-fields textarea { font-weight: 400; }
.presentation-fields textarea { resize: vertical; line-height: 1.55; }
.presentation-contact { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.whatsapp-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; }
.field-hint { color: var(--muted); font-size: .85rem; font-weight: 400; }
.branding-fields { border-top: 1px solid var(--line); padding-top: 1rem; }
.branding-fields .checkbox { display: flex; align-items: center; }
.presentation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
#inventario { scroll-margin-top: 1rem; }
@media (max-width: 740px) {
  .presentation-layout { grid-template-columns: 1fr; }
  .presentation-contact { border-left: 0; border-top: 1px solid var(--line); padding: 1rem 0 0; }
}
@media (max-width: 360px) { .whatsapp-fields { grid-template-columns: 1fr; } }

.country-field { display: grid; align-content: start; gap: .35rem; font-size: .9rem; font-weight: 550; min-width: 0; }
.country-picker { position: relative; min-width: 0; font-weight: 400; }
.country-picker summary {
  display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: .35rem; background: var(--paper); cursor: pointer;
  list-style: none;
}
.country-picker summary::-webkit-details-marker { display: none; }
.country-picker summary span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-search-icon {
  width: .75rem; height: .75rem; position: relative; flex: 0 0 auto; border: 1.5px solid currentColor;
  border-radius: 50%; color: var(--accent);
}
.country-search-icon::after {
  content: ''; position: absolute; width: .35rem; height: 1.5px; background: currentColor;
  bottom: -.18rem; right: -.27rem; transform: rotate(45deg);
}
.country-options {
  position: absolute; z-index: 2; top: calc(100% + .35rem); left: 0;
  width: min(18rem, calc(100vw - 3.5rem)); padding: .55rem;
  border: 1px solid var(--line); border-radius: .45rem; background: var(--paper);
  box-shadow: 0 .45rem 1.3rem #32211c24;
}
.country-results { list-style: none; margin: .35rem 0 0; padding: 0; max-height: 12.5rem; overflow: auto; }
.country-option {
  width: 100%; min-height: 40px; text-align: left; padding: .5rem .65rem;
  background: transparent; border: 0; border-radius: .25rem; color: var(--ink);
}
.country-option:hover, .country-option[aria-pressed=true] { background: var(--tint); }
.country-empty { padding: .55rem .65rem; }

.theme-sample { padding: .8rem; background: var(--tint); border-radius: .45rem; color: var(--ink); }
.theme-sample p { font-family: var(--serif); font-size: 1.25rem; margin-bottom: .6rem; }
.theme-sample .button { min-height: auto; padding: .35rem .65rem; font-size: .85rem; }

.catalog-inventory > * + * { margin-top: 1.1rem; }
.hero.hero-without-photo { grid-template-columns: 1fr; }
.hero .hero-logo { object-fit: contain; max-height: 30rem; padding: clamp(1.5rem, 4vw, 4rem); }
