:root {
  --cream: #fbf6ef;
  --ivory: #fffaf6;
  --rose: #f3e4dc;
  --blush: #e7cfc6;
  --chocolate: #3a2418;
  --ink: #2c1d16;
  --muted: #7a655b;
  --bordeaux: #7a2438;
  --line: rgba(58, 36, 24, 0.12);
  --shadow: 0 18px 40px rgba(58, 36, 24, 0.08);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --tab: calc(64px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  padding-bottom: var(--tab);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 0.35em; }
h1 { font-size: clamp(2.15rem, 9vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 7vw, 3.3rem); }
p { margin: 0 0 0.75em; }

.container { width: min(1120px, calc(100% - 1.5rem)); margin-inline: auto; }
.eyebrow { margin: 0 0 0.55rem; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bordeaux); font-weight: 700; }
.text-link { color: var(--bordeaux); font-weight: 650; text-decoration: none; }

.btn, .primary-button, .whatsapp-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 48px; padding: 0.7rem 1.15rem; border-radius: 999px;
  border: 1px solid transparent; text-decoration: none; cursor: pointer; font-weight: 650;
}
.btn-solid, .primary-button { background: var(--chocolate); color: #fffaf6; }
.btn-line { background: transparent; border-color: var(--chocolate); color: var(--chocolate); }
.btn-small { min-height: 42px; font-size: 0.92rem; width: 100%; }
.whatsapp-button { background: #25d366; color: white; width: 100%; }
.whatsapp-button .icon-wa { width: 20px; height: 20px; flex-shrink: 0; }

.topline { display: none; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: #fbf6ef;
  border-bottom: 1px solid var(--line);
}
.header-main { display: flex; align-items: center; gap: 0.55rem; min-height: 64px; padding: 0.45rem 0; }
.brand { font-family: var(--serif); font-size: 1.45rem; text-decoration: none; letter-spacing: -0.03em; white-space: nowrap; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }
.header-search { display: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  border: 1px solid var(--line); background: var(--ivory); color: var(--chocolate);
  text-decoration: none; padding: 0; cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn--wa { background: #25d366; color: white; border-color: transparent; }
.icon-btn--wa .icon-wa { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--bordeaux); color: white;
  font-size: 0.68rem; display: grid; place-items: center;
}
.cart-count[hidden] { display: none; }
.main-nav {
  display: none; position: absolute; left: 0.75rem; right: 0.75rem; top: 68px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 18px;
  padding: 0.4rem; box-shadow: var(--shadow); flex-direction: column;
}
.main-nav.is-open { display: flex; }
.main-nav a { text-decoration: none; padding: 0.85rem 1rem; border-radius: 12px; }
.main-nav a.is-active, .main-nav a:hover { background: var(--rose); }

.hero { display: grid; background: var(--ivory); }
.hero-photo { order: -1; margin: 0; height: 72vw; min-height: 240px; max-height: 420px; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-copy { padding: 1.35rem 1rem 1.6rem; }
.hero-copy p { color: var(--muted); }
.hero-actions { display: grid; gap: 0.65rem; margin-top: 0.4rem; }
.hero-actions .btn { width: 100%; }

.band { padding: 2.2rem 0; }
.band--rose { background: linear-gradient(180deg, #f7ebe4, var(--cream)); }
.band-head, .section-topline {
  display: flex; justify-content: space-between; align-items: end; gap: 0.8rem;
  margin-bottom: 1rem;
}
.card-grid, .product-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem;
}
.taste-card, .product-card {
  background: var(--ivory); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0;
}
.taste-card__photo, .product-visual { aspect-ratio: 4 / 3; background: #f3ebe4; overflow: hidden; position: relative; }
.taste-card--course .taste-card__photo,
.taste-card__photo--poster { aspect-ratio: 3 / 4; }
.taste-card__photo--poster { position: relative; }
.poster-title {
  position: absolute; left: 9%; right: 9%; bottom: 6%;
  text-align: center; color: #3a2418;
  font-family: var(--serif); font-size: clamp(1.2rem, 2.5vw, 1.85rem); line-height: 1.12;
}
.taste-card__photo--full { aspect-ratio: auto; background: #fff; }
.taste-card__photo--full img { height: auto; object-fit: contain; }
.taste-card__photo img, .product-visual img { width: 100%; height: 100%; object-fit: cover; }
.taste-card__body, .product-content { padding: 0.9rem 0.95rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.taste-card__cat, .product-category { color: var(--bordeaux); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.taste-card h2, .taste-card h3, .product-name { font-size: 1.55rem; line-height: 1.15; }
.taste-card a, .product-name a { text-decoration: none; }
.taste-card__stock, .product-meta { color: var(--muted); font-size: 0.86rem; }
.product-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding-top: 0.35rem; }
.card-actions { display: flex; gap: 0.4rem; align-items: center; margin-left: auto; }
.view-product { text-decoration: none; font-size: 0.88rem; }
.quick-add {
  border: 0; background: var(--chocolate); color: white;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
}
.product-badge {
  position: absolute; left: 0.65rem; top: 0.65rem; background: white;
  border-radius: 999px; padding: 0.22rem 0.55rem; font-size: 0.66rem; letter-spacing: 0.08em;
}
.about-split, .contact-grid, .detail-sheet, .cart-layout { display: grid; gap: 1.1rem; }
.about-note, .cart-summary, .enroll { background: var(--ivory); border-radius: 22px; padding: 1.15rem; }

.page { padding-bottom: 1rem; }
.page-intro { padding: 1.4rem 0 0.6rem; }
.page-intro p, .lead { color: var(--muted); }
.meta-list { padding: 0; margin: 0.4rem 0 0.8rem; list-style: none; color: var(--muted); }
.detail-sheet { padding-top: 1rem; }
.detail-sheet__photo img, .main-image-wrap img { width: 100%; border-radius: 22px; object-fit: cover; max-height: 420px; }
.detail-sheet__photo--poster { position: relative; }
.detail-sheet__photo--poster img { aspect-ratio: 3 / 4; max-height: none; object-fit: cover; }
.detail-sheet__photo--full img { aspect-ratio: auto; max-height: none; object-fit: contain; background: #fff; }
.prose { padding-top: 0.4rem; }
.program { padding-left: 1.1rem; }
.program li { margin: 0.65rem 0; }
.program span { display: block; color: var(--muted); }
.enroll { margin: 1rem auto 1.4rem; }
.enroll-form, .cart-summary { display: grid; gap: 0.7rem; }
.header-search input, .enroll-form input, .enroll-form textarea, .enroll-form select, .cart-summary input {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 14px; padding: 0.75rem 0.9rem;
}
.notice { padding: 0.8rem 1rem; border-radius: 14px; }
.notice--ok { background: #e7f3ea; }
.notice--bad { background: #fde8e8; }

.category-strip { margin-bottom: 0.4rem; }
.category-cards {
  display: flex; gap: 0.45rem; overflow-x: auto; padding: 0.2rem 0 0.7rem;
  scrollbar-width: none;
}
.category-cards::-webkit-scrollbar { display: none; }
.category-card {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--ivory);
  border-radius: 999px; padding: 0.55rem 0.95rem; cursor: pointer;
}
.category-card.selected { background: var(--chocolate); color: white; border-color: var(--chocolate); }
.catalog-layout { display: grid; gap: 0.8rem; }
.filter-panel {
  display: none; background: var(--ivory); border-radius: 18px; padding: 0.9rem;
}
.filter-panel.open { display: block; }
.filter-heading { display: flex; justify-content: space-between; align-items: center; }
.reset-link { border: 0; background: none; color: var(--bordeaux); cursor: pointer; }
.filter-options label { display: flex; gap: 0.45rem; margin: 0.4rem 0; }
.catalog-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: center; margin-bottom: 0.8rem; }
.mobile-filter-button { border: 1px solid var(--line); background: var(--ivory); border-radius: 999px; min-height: 40px; padding: 0 0.9rem; }
.pagination { margin: 1rem 0; }
.empty-state { padding: 1.4rem 0; }

.detail-main { padding: 1rem 0 1.5rem; }
.detail-layout { display: grid; gap: 1rem; }
.breadcrumb { color: var(--muted); font-size: 0.84rem; margin-bottom: 0.7rem; overflow-wrap: anywhere; }
.breadcrumb a { color: inherit; }
.main-image-wrap { position: relative; }
.thumbnail-list { display: flex; gap: 0.45rem; margin-top: 0.6rem; overflow-x: auto; }
.thumbnail { border: 1px solid transparent; padding: 0; background: none; border-radius: 12px; overflow: hidden; cursor: pointer; flex: 0 0 auto; }
.thumbnail.active { border-color: var(--chocolate); }
.thumbnail img { width: 64px; height: 64px; object-fit: cover; }
.image-zoom { position: absolute; right: 0.7rem; bottom: 0.7rem; border: 0; background: white; width: 40px; height: 40px; border-radius: 50%; }
.detail-price { font-family: var(--serif); font-size: 2.1rem; display: block; }
.detail-price-row[hidden] { display: none; }
.detail-purchase { display: grid; gap: 0.65rem; margin: 0.8rem 0; }
.quantity-control { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; width: max-content; background: white; }
.quantity-control button, .quantity-control input { border: 0; background: white; width: 44px; height: 44px; text-align: center; }
.add-detail-button { width: 100%; }
.tabs { display: flex; gap: 0.7rem; margin: 1.4rem 0 0.6rem; overflow-x: auto; }
.tab-button { border: 0; background: transparent; border-bottom: 2px solid transparent; padding: 0.45rem 0; cursor: pointer; white-space: nowrap; }
.tab-button.active { border-color: var(--bordeaux); }
.spec-row { display: grid; gap: 0.15rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.related-section { margin-top: 1.8rem; }
.image-lightbox { position: fixed; inset: 0; background: rgba(28, 16, 12, 0.86); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.image-lightbox[hidden] { display: none; }
.image-lightbox img { max-width: 100%; max-height: 86vh; border-radius: 16px; }

.cart-line {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 0.7rem; align-items: center;
  background: var(--ivory); border-radius: 18px; padding: 0.6rem; margin-bottom: 0.65rem;
}
.cart-line img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.cart-qty { display: flex; gap: 0.35rem; align-items: center; margin-top: 0.35rem; }
.cart-qty button, .cart-remove { border: 0; background: var(--rose); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; }

.site-footer { background: var(--chocolate); color: #f6efe8; padding: 2rem 0 1rem; margin-top: 1.5rem; }
.footer-main { display: grid; gap: 1.2rem; }
.site-footer a { color: inherit; text-decoration: none; display: block; margin: 0.2rem 0; }
.site-footer .brand { color: #fffaf6; }
.footer-bottom { padding-top: 1rem; color: #d9c7ba; font-size: 0.82rem; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: rgba(255, 250, 246, 0.96); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 0.3rem 0.2rem env(safe-area-inset-bottom);
}
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.12rem; min-height: 54px; text-decoration: none; color: var(--muted); font-size: 0.62rem; font-weight: 650;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--bordeaux); }
.cart-count--tab { top: 2px; right: calc(50% - 22px); }

.whatsapp-float {
  display: none; position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 35;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: white;
  place-items: center; box-shadow: var(--shadow);
}
.whatsapp-float .icon-wa { width: 30px; height: 30px; }
.tabbar a[data-wa] .icon-wa { width: 23px; height: 23px; }
.whatsapp-float[hidden] { display: none; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + 10px); transform: translateX(-50%) translateY(8px);
  background: var(--chocolate); color: white; border-radius: 999px; padding: 0.7rem 1rem;
  opacity: 0; pointer-events: none; transition: 180ms ease; z-index: 45; max-width: calc(100% - 2rem); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 720px) {
  .container { width: min(1120px, calc(100% - 2.4rem)); }
  .card-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-small { width: auto; align-self: flex-start; }
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: auto; }
  .hero-photo { max-height: 460px; height: 42vw; }
  .detail-purchase { grid-template-columns: auto 1fr; align-items: center; }
  .add-detail-button, .whatsapp-button { width: auto; }
  .spec-row { grid-template-columns: 180px 1fr; gap: 1rem; }
  .footer-main { grid-template-columns: 1.3fr 0.8fr 1fr; }
  .about-split, .contact-grid, .detail-sheet, .cart-layout { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .topline { display: block; background: var(--chocolate); color: #f6efe8; font-size: 0.82rem; }
  .topline-inner { display: flex; justify-content: space-between; padding: 0.4rem 0; }
  .topline a { color: inherit; text-decoration: none; }
  .tabbar { display: none; }
  .whatsapp-float:not([hidden]) { display: grid; }
  .mobile-toggle, .icon-btn--wa { display: none; }
  .header-search { display: block; position: relative; }
  .search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
  .search-icon svg { width: 16px; height: 16px; }
  .header-search input { min-width: 190px; padding-left: 2.2rem; border-radius: 999px; }
  .main-nav { display: flex; position: static; flex-direction: row; background: none; border: 0; box-shadow: none; padding: 0; margin-left: auto; gap: 0.3rem; }
  .main-nav a { padding: 0.4rem 0.7rem; }
  .brand { font-size: 1.75rem; }
  .hero { grid-template-columns: 0.9fr 1.1fr; min-height: 78vh; align-items: stretch; }
  .hero-photo { order: 2; height: auto; max-height: none; min-height: 560px; }
  .hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4.5rem); }
  .hero-actions { display: flex; flex-wrap: wrap; }
  .band { padding: 4.2rem 0; }
  .toast { bottom: 1.4rem; }
  .filter-panel { display: block; }
  .catalog-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .mobile-filter-button { display: none; }
  .detail-layout { grid-template-columns: 1.05fr 0.95fr; gap: 2rem; }
}

@media (min-width: 1100px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid--courses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
