:root {
  color-scheme: light;
  --wine: #4b1828;
  --wine-2: #6b263c;
  --cream: #fbf7ef;
  --paper: #fffdf9;
  --gold: #c89b55;
  --ink: #261d20;
  --muted: #6f6467;
  --line: #e8ded1;
  --green: #1f7a50;
  --shadow: 0 18px 55px rgba(55, 24, 34, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
body.panel-open { overscroll-behavior: contain; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(200, 155, 85, .5);
  outline-offset: 2px;
}
.offline-notice { margin: 0; padding: 14px 18px; background: #fff1c7; color: #5e4219; border-bottom: 1px solid #e6c878; font-size: .9rem; }
.offline-notice strong { display: block; }
.js .offline-notice { display: none; }
.mobile-intro { display: none; }
.mobile-progress { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(18px, 4vw, 64px);
  background: rgba(255, 253, 249, .94);
  border-bottom: 1px solid rgba(75, 24, 40, .10);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--wine); text-decoration: none; }
.brand-logo { width: clamp(148px, 17vw, 220px); height: 50px; object-fit: contain; object-position: left center; }
.brand-city { padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.summary-trigger {
  border: 0; border-radius: 999px; padding: 10px 12px 10px 18px; display: flex; align-items: center; gap: 12px;
  background: var(--wine); color: #fff; cursor: pointer; box-shadow: 0 8px 24px rgba(75,24,40,.16);
}
.summary-trigger strong { color: #f5dba9; }
.count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: #fff; color: var(--wine); font-weight: 800; }

main { overflow: hidden; }
.hero {
  min-height: 590px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); align-items: stretch;
  background: var(--wine); color: #fff;
}
.hero-copy { align-self: center; padding: clamp(64px, 8vw, 120px) clamp(28px, 7vw, 110px); }
.eyebrow { display: block; color: var(--wine-2); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow, .eyebrow.light { color: #e5bd7b; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.05; letter-spacing: -.025em; }
h1 { max-width: 650px; margin-top: 16px; font-size: clamp(2.8rem, 5.5vw, 5.6rem); }
.hero p { max-width: 590px; margin: 24px 0 30px; color: #eadde1; font-size: clamp(1rem, 1.4vw, 1.22rem); }
.primary-link { display: inline-flex; align-items: center; gap: 14px; color: var(--wine); background: #fff; border-radius: 999px; padding: 14px 22px; font-weight: 800; text-decoration: none; }
.primary-link span { color: var(--gold); }
.hero img { width: 100%; height: 100%; min-height: 590px; object-fit: cover; object-position: 62% center; }

.steps {
  max-width: 1160px; margin: -34px auto 0; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; box-shadow: var(--shadow); border-radius: 20px; overflow: hidden;
}
.steps > div { min-height: 105px; display: flex; align-items: center; gap: 14px; padding: 24px 28px; border-right: 1px solid var(--line); }
.steps > div:last-child { border-right: 0; }
.steps span { flex: 0 0 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--wine); color: #fff; font-weight: 800; }
.steps p, .steps strong { display: block; margin: 0; }
.steps p { color: var(--muted); font-size: .92rem; }
.steps strong { margin-bottom: 3px; color: var(--ink); font-size: 1rem; }

.builder { max-width: 1180px; margin: 0 auto; padding: 110px 24px 90px; }
.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading h2, .wine-heading h2 { margin-top: 8px; color: var(--wine); font-size: clamp(2rem, 3vw, 3.25rem); }
.section-heading p { margin: 12px 0 0; color: var(--muted); }
.section-heading.compact { margin-bottom: 24px; }
.product-heading { margin-top: 90px; }
.wine-jump { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding: 10px 15px; border: 1px solid rgba(75,24,40,.22); border-radius: 999px; color: var(--wine); background: #fff; font-size: .86rem; font-weight: 850; text-decoration: none; }
.wine-jump span { color: var(--gold); }

.quick-start { margin: 0 0 88px; padding: clamp(24px, 5vw, 48px); border: 1px solid #dfd1c4; border-radius: 26px; background: linear-gradient(135deg, #fffaf2 0%, #f3e5d4 100%); }
.quick-start[hidden] { display: none; }
.ready-flow #bases, .ready-flow #baseGrid, .ready-flow #progressBase { display: none; }
.ready-flow .quick-start { margin-bottom: 40px; }
.ready-flow .product-heading { margin-top: 0; }
.quick-start .section-heading { max-width: 850px; }
.preset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.preset-card { position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(75,24,40,.14); border-radius: 18px; background: rgba(255,255,255,.88); box-shadow: 0 10px 28px rgba(55,24,34,.07); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.preset-card:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(55,24,34,.12); }
.preset-card.selected { border: 2px solid var(--wine); box-shadow: 0 0 0 2px rgba(75,24,40,.08), 0 15px 34px rgba(55,24,34,.12); }
.preset-card-image { position: relative; height: clamp(285px, 30vw, 360px); overflow: hidden; background: #f4ede4; }
.preset-card-image img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.preset-card-image::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(38,20,27,.35)); }
.preset-level { position: absolute; z-index: 2; left: 14px; bottom: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--wine); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.preset-content { flex: 1; display: flex; flex-direction: column; padding: 18px; }
.preset-content h3 { margin: 0; color: var(--wine); font-family: Georgia, serif; font-size: 1.42rem; line-height: 1.12; }
.preset-content > p { margin: 8px 0 13px; color: var(--muted); font-size: .88rem; }
.preset-items { flex: 1; margin: 0 0 18px; padding: 0; list-style: none; color: var(--ink); font-size: .82rem; }
.preset-items li { position: relative; margin-top: 7px; padding-left: 15px; }
.preset-items li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.preset-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.preset-price small { display: block; color: var(--muted); font-size: .68rem; }
.preset-price strong { color: var(--wine); font-size: 1.18rem; }
.preset-button { min-height: 42px; border: 0; border-radius: 999px; padding: 10px 14px; background: var(--wine); color: #fff; cursor: pointer; font-size: .78rem; font-weight: 850; }
.preset-card.selected .preset-button { background: var(--green); }
.ready-basket .preset-card-image { width: 100%; height: auto; aspect-ratio: 1 / 1; background: #f4ede4; }
.preset-grid .preset-card-image:not(.preset-card-gallery) { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.ready-basket .preset-card-image:not(.preset-card-gallery) img { object-fit: cover; object-position: center; }
.ready-basket .preset-card-image::after { display: none; }
.ready-basket .preset-level { background: rgba(75,24,40,.92); color: #fff; }
.ready-basket .pending-status { flex: 1; }
.ready-basket .preset-card-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; align-items: center; }
.ready-basket .preset-card-gallery figure { min-width: 0; height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ready-basket .preset-card-gallery img { width: 100%; height: calc(100% - 28px); object-fit: contain; }
.ready-basket .preset-card-gallery figcaption { height: 24px; color: #6f5c50; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; }
.ready-basket .preset-card-gallery .preset-level { z-index: 1; }
.preset-card:not(.ready-basket) .preset-card-image { height: auto; aspect-ratio: 1 / 1; }
.preset-card:not(.ready-basket) .preset-card-image img { object-fit: cover; }
.preset-card:not(.ready-basket) .preset-card-image::after { display: none; }
.preset-items.pending-items { flex: 1; margin: 0 0 18px; border: 0; }
.preset-items.pending-items li { position: relative; margin-top: 7px; padding: 0 0 0 15px; border: 0; }
.preset-items.pending-items li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }

.preset-age { display: inline-block; margin-left: 6px; color: var(--wine-2); font-size: .72rem; font-weight: 850; }

.base-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.base-card {
  position: relative; padding: 16px; min-height: 360px; display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; text-align: left; color: inherit;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.base-card:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(55, 24, 34, .08); }
.base-card.selected { border: 2px solid var(--wine); box-shadow: 0 12px 34px rgba(75, 24, 40, .13); }
.base-card .selection { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border: 1px solid #cdbfc2; border-radius: 50%; display: grid; place-items: center; color: transparent; }
.base-card.selected .selection { background: var(--wine); border-color: var(--wine); color: #fff; }
.base-image { width: 100%; aspect-ratio: 4 / 3; margin-bottom: 18px; border-radius: 12px; object-fit: cover; background: var(--cream); }
.base-image-contain { object-fit: contain; background: var(--cream); }
.base-card small { color: var(--wine-2); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.base-card h3 { max-width: 80%; margin: 10px 0 4px; font-family: Georgia, serif; font-size: 1.4rem; }
.base-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.base-card strong { margin-top: 18px; color: var(--wine); font-size: 1.3rem; }

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.filter-button { border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; background: #fff; color: var(--muted); cursor: pointer; font-weight: 700; }
.filter-button.active { border-color: var(--wine); background: var(--wine); color: #fff; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -4px 0 16px; }
.catalog-tools p { margin: 0; color: var(--muted); white-space: nowrap; font-size: .9rem; }
.search-box { width: min(560px, 100%); min-height: 52px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid #d9cbbd; border-radius: 14px; background: #fff; box-shadow: 0 6px 22px rgba(55,24,34,.05); }
.search-box > span { color: var(--wine); font-size: 1.7rem; line-height: 1; transform: rotate(-18deg); }
.search-box input { min-width: 0; border: 0; padding: 12px 0; outline: 0; box-shadow: none; }
.search-box button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream); color: var(--wine); cursor: pointer; font-size: 1.3rem; }
.product-grid, .wine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; overflow: hidden; box-shadow: 0 8px 24px rgba(55,24,34,.05); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(55,24,34,.09); }
.product-card.selected { border-color: var(--wine); box-shadow: 0 0 0 1px var(--wine), 0 12px 30px rgba(75,24,40,.12); }
.selected-badge { position: absolute; z-index: 2; top: 19px; right: 19px; min-width: 32px; height: 28px; padding: 0 9px; display: grid; place-items: center; border-radius: 999px; background: var(--wine); color: #fff; box-shadow: 0 4px 14px rgba(75,24,40,.24); font-size: .78rem; font-weight: 900; }
.product-photo { position: relative; grid-column: 1 / -1; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 13px; background: #f7f0e6; }
.product-photo > img:not(.bottle-sticker) { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s ease; }
.product-card:hover .product-photo > img:not(.bottle-sticker) { transform: scale(1.025); }
.product-photo .bottle-sticker { position: absolute; z-index: 2; top: 39%; left: 42%; width: clamp(18px, 8%, 34px); height: auto; aspect-ratio: 1; object-fit: contain; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.product-photo.placeholder { display: grid; place-items: center; color: rgba(75, 24, 40, .5); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; }
.product-info { min-width: 0; }
.product-card h3 { margin: 0 0 5px; font-size: .98rem; line-height: 1.25; }
.product-card small { color: var(--muted); }
.details-link { display: block; margin: 7px 0 0; padding: 0; border: 0; background: none; color: var(--wine-2); cursor: pointer; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.product-card .price { display: block; margin-top: 10px; color: var(--wine); font-weight: 850; }
.add-button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--wine); color: #fff; font-size: 1.5rem; cursor: pointer; box-shadow: 0 5px 14px rgba(75,24,40,.18); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--cream); color: var(--wine); cursor: pointer; font-weight: 900; }
.qty-control strong { min-width: 18px; text-align: center; }
.empty-results { padding: 26px; border: 1px dashed #d9cbbd; border-radius: 14px; color: var(--muted); text-align: center; background: var(--cream); }

.wine-section { position: relative; isolation: isolate; overflow: hidden; margin-top: 90px; padding: clamp(28px, 5vw, 56px); border-radius: 26px; background: var(--wine); color: #fff; }
.wine-section::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(rgba(75,24,40,.84), rgba(75,24,40,.94)), url("./assets/catalogo/arteviva.webp") center / cover; opacity: .72; }
.wine-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.wine-heading h2 { color: #fff; }
.wine-heading p { max-width: 740px; margin: 14px 0 0; color: #e8d9dd; }
.age-badge { flex: 0 0 64px; height: 64px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; display: grid; place-items: center; color: #f2d4a1; font-weight: 900; font-size: 1.2rem; }
.age-check { display: inline-flex; align-items: center; gap: 10px; margin: 24px 0 22px; padding: 12px 16px; border-radius: 10px; background: rgba(255,255,255,.09); cursor: pointer; }
.age-check input { width: 20px; height: 20px; accent-color: var(--gold); }
.age-info { max-width:650px; margin:18px 0 22px; padding:11px 14px; border-left:3px solid var(--gold); border-radius:0 10px 10px 0; background:rgba(255,255,255,.08); color:#f2e7df; font-size:.88rem; line-height:1.45; }
.wine-filters { margin-bottom: 22px; }
.wine-filters .filter-button { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; }
.wine-filters .filter-button.active { border-color: #fff; background: #fff; color: var(--wine); }
.wine-refiners { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin:-5px 0 24px; }
.wine-refiners[hidden], .wine-type-group[hidden] { display:none; }
.wine-type-group { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.wine-type-group .filter-button { border-color:rgba(255,255,255,.35); background:rgba(255,255,255,.08); color:#fff; }
.wine-type-group .filter-button.active { border-color:#fff; background:#fff; color:var(--wine); }
.refiner-label { margin-right:3px; color:#f1e4d0; font-size:.9rem; font-weight:800; }
.wine-country { display:grid; gap:5px; min-width:min(230px,100%); color:#f1e4d0; font-size:.82rem; font-weight:800; }
.wine-country select { min-height:44px; padding:8px 34px 8px 12px; border:1px solid rgba(255,255,255,.55); border-radius:12px; background:#fff; color:var(--wine); font-weight:700; }
.wine-grid .product-card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.15); }
.wine-grid .product-card.selected { border-color: #f2d4a1; box-shadow: 0 0 0 1px #f2d4a1, 0 12px 30px rgba(0,0,0,.18); }
.wine-grid .selected-badge { background: #fff; color: var(--wine); }
.wine-grid .product-card h3, .wine-grid .product-card .price { color: #fff; }
.wine-grid .product-card small { color: #e6dadd; }
.wine-grid .details-link { color: #f2d4a1; }
.wine-grid .add-button { background: #fff; color: var(--wine); }
.wine-grid .add-button:disabled { cursor: not-allowed; opacity: .42; }
.wine-grid .qty-control button { background: #fff; border-color: #fff; }
.wine-empty { border-color: rgba(255,255,255,.3); color: #eadde1; background: rgba(255,255,255,.06); }

.details { margin-top: 90px; padding: clamp(24px, 5vw, 50px); background: var(--cream); border: 1px solid var(--line); border-radius: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid label span { color: var(--wine); font-weight: 750; }
.form-grid .full { grid-column: 1 / -1; }
.field-help { color: var(--muted); font-size: .8rem; line-height: 1.35; }
input, select, textarea { width: 100%; border: 1px solid #d9cbbd; border-radius: 11px; background: #fff; color: var(--ink); padding: 13px 14px; }
textarea { resize: vertical; }
.hidden { display: none !important; }
.service-note { margin: 20px 0 0; padding-left: 16px; border-left: 3px solid var(--gold); color: var(--muted); }

.checkout-details { margin: 24px 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); }
.checkout-heading span { color: var(--wine-2); font-size: .74rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.checkout-heading h2 { margin: 5px 0 6px; color: var(--wine); font-size: 1.65rem; }
.checkout-heading p { margin: 0 0 18px; color: var(--muted); }
.checkout-form { grid-template-columns: 1fr; gap: 13px; }

.product-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 24px; overflow: auto; background: #fff; color: var(--ink); box-shadow: 0 24px 90px rgba(37,15,22,.32); }
.product-dialog::backdrop { background: rgba(26,12,17,.65); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; z-index: 3; top: 14px; right: 14px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(75,24,40,.92); color: #fff; cursor: pointer; font-size: 1.5rem; }
.detail-image { min-height: 330px; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #fffaf4, #f2e7d8); }
.detail-image img { width: 100%; height: 330px; object-fit: contain; }
.detail-content { padding: 28px; }
.detail-category { color: var(--wine-2); font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.detail-content h2 { margin: 8px 0 12px; color: var(--wine); font-family: Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.05; }
.detail-content > p { color: var(--muted); line-height: 1.65; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.detail-meta span { min-width: 120px; padding: 12px 14px; border-radius: 12px; background: var(--cream); }
.detail-meta small, .detail-meta strong { display: block; }
.detail-meta small { color: var(--muted); font-size: .72rem; }
.detail-meta strong { margin-top: 3px; color: var(--wine); }
.detail-age { padding: 11px 13px; border-radius: 10px; background: #fff3d8; color: #6f4d13 !important; }
.detail-add { width: 100%; min-height: 52px; border: 0; border-radius: 13px; background: var(--wine); color: #fff; cursor: pointer; font-weight: 850; }
.detail-add:disabled { opacity: .45; cursor: not-allowed; }

.order-panel {
  position: fixed; z-index: 60; inset: 0 0 0 auto; width: min(460px, 100%); padding: 28px; background: #fff;
  transform: translateX(105%); transition: transform .25s ease; overflow-y: auto; box-shadow: -20px 0 60px rgba(37, 15, 22, .18);
}
.order-panel.open { transform: translateX(0); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin-top: 6px; color: var(--wine); font-size: 2rem; }
.close-panel { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--wine); cursor: pointer; font-size: 1.6rem; line-height: 1; }
.order-empty { display: grid; place-items: center; text-align: center; min-height: 220px; color: var(--muted); }
.order-empty span { display: block; color: var(--gold); font-size: 3rem; }
.basket-preview { margin: 22px 0 4px; padding: 14px; border: 1px solid #dfd1c4; border-radius: 18px; background: linear-gradient(145deg, #fffaf3, #f3e7d9); }
.order-panel.ready-only-order .basket-preview { display: none; }
.add-more-baskets-button { width: 100%; margin: 10px 0 0; padding: 16px 20px; border: 1px solid var(--wine); border-radius: 14px; background: #fff; color: var(--wine); font: inherit; font-weight: 800; cursor: pointer; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.preview-heading small { display: block; color: var(--wine-2); font-size: .66rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.preview-heading h3 { margin: 2px 0 0; color: var(--wine); font-family: Georgia, serif; font-size: 1.2rem; }
.preview-heading > span { padding: 6px 9px; border: 1px solid #ddcbb9; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.72); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.preview-stage { position: relative; min-height: 265px; overflow: hidden; border-radius: 14px; background: radial-gradient(circle at 50% 30%, #fff 0, #fbf4e9 46%, #eadbc9 100%); box-shadow: inset 0 0 0 1px rgba(75,24,40,.06); }
.preview-stage::after { content: ""; position: absolute; z-index: 0; left: 10%; right: 10%; bottom: 13px; height: 28px; border-radius: 50%; background: rgba(64,35,24,.18); filter: blur(13px); }
.preview-base { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 15px; height: 128px; overflow: hidden; padding: 0; border: 4px solid rgba(255,255,255,.9); border-radius: 18px 18px 26px 26px; background: #e8d4bc; box-shadow: 0 10px 20px rgba(54,28,20,.18); color: inherit; cursor: pointer; }
.preview-base img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 64%; }
.preview-base span { position: absolute; left: 10px; bottom: 9px; max-width: calc(100% - 20px); padding: 5px 9px; overflow: hidden; border-radius: 999px; background: rgba(38,20,27,.86); color: #fff; font-size: .7rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.preview-base > span:only-child { inset: 0; max-width: none; display: grid; place-items: center; border-radius: 0; background: transparent; color: var(--muted); }
.preview-items { position: absolute; z-index: 3; inset: 14px 14px 92px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; pointer-events: none; }
.preview-unit { position: relative; flex: 0 1 58px; width: 58px; height: 70px; overflow: visible; border: 3px solid #fff; border-radius: 10px; background: #f9f2e7; box-shadow: 0 8px 15px rgba(42,20,27,.18); transform: translateY(var(--lift)) rotate(var(--tilt)); }
.preview-unit.tall { height: 98px; flex-basis: 52px; }
.preview-unit.wide { width: 70px; height: 58px; flex-basis: 70px; }
.preview-unit img { width: 100%; height: 100%; display: block; border-radius: 7px; object-fit: contain; background: #f7f0e6; }
.preview-placeholder { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 7px; color: rgba(75,24,40,.55); font-family: Georgia, serif; font-weight: 800; }
.preview-unit b { position: absolute; top: -9px; right: -9px; min-width: 25px; height: 25px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 999px; background: var(--wine); color: #fff; font-size: .68rem; }
.preview-empty { position: absolute; z-index: 4; top: 42%; left: 18px; right: 18px; margin: 0; color: var(--muted); text-align: center; font-size: .84rem; font-weight: 700; pointer-events: none; }
.preview-overflow { position: absolute; z-index: 5; right: 12px; top: 12px; padding: 6px 9px; border-radius: 999px; background: var(--wine); color: #fff; font-size: .7rem; font-weight: 850; }
.basket-preview:not(.is-empty) .preview-empty { display: none; }
.basket-preview.is-empty .preview-items { display: none; }
.preview-disclaimer { margin: 10px 2px 0; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.order-lines { padding: 20px 0; }
.order-line { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.order-line-basket { grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; }
.order-line-basket > img { width: 58px; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fbf7ef; }
.order-line p { margin: 0; font-weight: 700; }
.order-line small { display: block; margin-top: 3px; color: var(--muted); }
.remove-line { border: 0; background: transparent; color: #9d3c49; cursor: pointer; text-decoration: underline; font-size: .82rem; }
.add-more-items-button { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 24px; padding: 14px 18px; border: 0; border-radius: 13px; background: var(--wine); color: #fff; cursor: pointer; font-size: .95rem; font-weight: 850; }
.add-more-items-button span { font-size: 1.2rem; }
.minimum-items-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 24px; padding: 14px 16px; border: 1px solid #e3c8a1; border-radius: 13px; background: #fff7e8; color: #71501d; font-size: .86rem; }
.minimum-items-note strong,.minimum-items-note span { display: block; }
.minimum-items-note span { text-align: right; }
.minimum-items-note.complete { border-color: #bcd9c9; background: #edf8f1; color: #17643f; }
.totals { padding: 18px 0; border-top: 1px solid var(--line); }
.totals > div { display: flex; justify-content: space-between; gap: 20px; margin: 9px 0; }
.totals span { color: var(--muted); }
.grand-total { padding-top: 14px; margin-top: 14px !important; border-top: 1px solid var(--line); font-size: 1.25rem; }
.grand-total span, .grand-total strong { color: var(--wine); }
.panel-note { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.whatsapp-button, .copy-button { width: 100%; min-height: 52px; border-radius: 12px; padding: 15px; cursor: pointer; font-weight: 850; }
.whatsapp-button { border: 0; background: #177b4f; color: #fff; }
.whatsapp-button:disabled { background: #6f6669; color: #f0eaec; cursor: not-allowed; opacity: .78; }
.copy-button { margin-top: 10px; border: 1px solid var(--wine); background: #fff; color: var(--wine); }
.clear-order-button { width: 100%; margin-top: 13px; padding: 8px; border: 0; background: transparent; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .88rem; }
.status-message { min-height: 24px; margin-top: 10px; color: var(--green); text-align: center; font-size: .9rem; }
.backdrop { position: fixed; z-index: 50; inset: 0; background: rgba(30, 13, 19, .48); opacity: 0; visibility: hidden; transition: opacity .25s ease; }
.backdrop.show { opacity: 1; visibility: visible; }
body.panel-open { overflow: hidden; }
.mobile-cart { display: none; }
.live-toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 999px; background: #26141b; color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.22); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; text-align: center; font-size: .9rem; }
.live-toast.show { opacity: 1; transform: translate(-50%, 0); }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 36px clamp(24px, 6vw, 80px); background: #26141b; color: #fff; }
footer span { color: #d9cdd0; }

@media (max-width: 900px) {
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { padding: 70px 24px 58px; }
  .hero img { min-height: 340px; max-height: 480px; }
  .steps { margin: 0; border-radius: 0; box-shadow: none; }
  .preset-grid, .base-grid, .product-grid, .wine-grid { grid-template-columns: repeat(2, 1fr); }
  .builder { padding-top: 74px; }
}

@media (max-width: 640px) {
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  main { width: 100%; max-width: 100%; overflow-x: clip; }
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 64px; padding: 9px 14px; box-shadow: 0 5px 18px rgba(55,24,34,.07); }
  .brand-city, .summary-trigger > span:first-child { display: none; }
  .brand-logo { width: 132px; height: 42px; }
  .summary-trigger { gap: 8px; padding: 8px 9px 8px 13px; }
  .mobile-progress { position: sticky; top: 64px; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: rgba(255,253,249,.96); backdrop-filter: blur(12px); }
  .ready-flow .mobile-progress { grid-template-columns: repeat(3, 1fr); }
  .mobile-progress a { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 800; }
  .mobile-progress span { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #d5c8bb; border-radius: 50%; font-size: .67rem; }
  .mobile-progress a.done { color: var(--green); }
  .mobile-progress a.done span { border-color: var(--green); background: var(--green); color: #fff; }
  .hero, .steps { display: none; }
  .builder { width: 100%; max-width: 100%; padding: 18px 16px 42px; }
  .mobile-intro { display: block; margin-bottom: 28px; padding: 20px; border-radius: 18px; color: #fff; background: linear-gradient(130deg, var(--wine), #70243d); }
  .mobile-intro .eyebrow { color: #e5bd7b; }
  .mobile-intro strong { display: block; margin-top: 6px; font-family: Georgia, serif; font-size: 2rem; }
  .mobile-intro p { margin: 7px 0 0; color: #eadde1; font-size: .9rem; }
  .mobile-intro a { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: #fff; font-size: .85rem; font-weight: 850; text-decoration: none; }
  .section-heading { margin-bottom: 18px; }
  .section-heading, .wine-heading, .catalog-tools { min-width: 0; }
  .section-heading h2, .wine-heading h2 { overflow-wrap: anywhere; }
  .wine-jump { width: 100%; justify-content: center; }
  .section-heading h2, .wine-heading h2 { font-size: 1.85rem; }
  .base-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: 100%; padding: 0; margin: 0; }
  .base-card { width: 100%; min-width: 0; min-height: 0; padding: 13px; }
  .base-card h3 { max-width: calc(100% - 34px); overflow-wrap: anywhere; }
  .base-image { aspect-ratio: 16 / 10; margin-bottom: 14px; }
  .product-grid, .wine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { min-height: 258px; padding: 8px; gap: 8px; border-radius: 14px; }
  .product-photo { border-radius: 10px; }
  .product-card h3 { font-size: .82rem; line-height: 1.2; }
  .product-card small { font-size: .7rem; line-height: 1.15; display: block; }
  .product-card .price { margin-top: 7px; font-size: .94rem; }
  .add-button { width: 38px; height: 38px; font-size: 1.35rem; }
  .qty-control { grid-column: 1 / -1; justify-content: space-between; }
  .qty-control button { width: 38px; height: 38px; }
  .selected-badge { top: 13px; right: 13px; }
  .quick-start { width: 100%; margin: 0 0 46px; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .quick-start .section-heading { width: 100%; }
  .preset-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; width: 100%; overflow: visible; padding: 0; margin: 0; }
  .preset-card, .preset-card:last-child { width: 100%; min-width: 0; flex: initial; grid-column: auto; }
  .preset-card-image { height: clamp(205px, 58vw, 280px); }
  .preset-content { min-width: 0; padding: 16px; }
  .preset-content h3 { font-size: 1.3rem; overflow-wrap: anywhere; }
  .preset-items { overflow-wrap: anywhere; }
  .preset-footer { align-items: stretch; flex-wrap: wrap; }
  .preset-button { width: 100%; min-height: 48px; flex: 1 1 100%; font-size: .86rem; }
  .catalog-tools { display: block; margin-bottom: 12px; }
  .catalog-tools p { margin: 8px 2px 0; font-size: .78rem; white-space: normal; }
  .search-box { min-height: 48px; border-radius: 12px; }
  .filters { flex-wrap: wrap; overflow: visible; gap: 8px; padding-bottom: 0; }
  .filter-button { flex: 0 1 auto; max-width: 100%; padding: 9px 12px; font-size: .82rem; white-space: normal; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .product-heading, .wine-section, .details { margin-top: 66px; }
  .wine-section, .details { border-radius: 20px; padding: 24px 18px; }
  .wine-heading { gap: 14px; }
  .wine-refiners { align-items:stretch; flex-direction:column; gap:14px; }
  .wine-country { min-width:0; width:100%; }
  .age-badge { flex-basis: 52px; height: 52px; }
  .order-panel { inset: auto 0 0; width: 100%; max-height: 90dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; transform: translateY(105%); }
  .order-panel.open { transform: translateY(0); }
  .preview-stage { min-height: 235px; }
  .preview-base { height: 114px; }
  .preview-items { inset: 12px 10px 82px; }
  .preview-unit { flex-basis: 50px; width: 50px; height: 62px; }
  .preview-unit.tall { flex-basis: 46px; height: 86px; }
  .preview-unit.wide { flex-basis: 60px; width: 60px; height: 52px; }
  .mobile-cart { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px 9px 16px; border: 0; border-radius: 17px; background: #26141b; color: #fff; box-shadow: 0 12px 34px rgba(38,20,27,.28); cursor: pointer; }
  .mobile-cart > span { display: grid; text-align: left; }
  .mobile-cart small { color: #d9cdd0; font-size: .72rem; }
  .mobile-cart strong { color: #f5dba9; font-size: 1.12rem; }
  .mobile-cart b { padding: 10px 12px; border-radius: 11px; background: var(--wine-2); font-size: .84rem; white-space: nowrap; }
  .mobile-cart:not(.active) { background: #4d4447; }
  .live-toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  footer { flex-direction: column; padding-bottom: 48px; }
}

@media (max-width: 370px) {
  .product-card { min-height: 240px; }
  .product-card h3 { font-size: .78rem; }
  .product-card .price { font-size: .88rem; }
  .add-button { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
