:root {
  --cream: #fbf1e3;
  --paper: #fffaf2;
  --choco: #4a2415;
  --caramel: #e08a1e;
  --pink: #e8447a;
  --line: #ecd9bf;
  --wa: #1fa855;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; background: var(--cream); color: var(--choco);
  font-family: "Nunito", system-ui, sans-serif; line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h2 { font-family: "Dancing Script", cursive; font-size: 2.2rem; margin: 0 0 12px; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; background: rgba(251, 241, 227, .95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: "Dancing Script", cursive; font-weight: 700; font-size: 1.6rem; text-decoration: none; margin-right: auto; }
.topbar nav { display: flex; gap: 16px; font-weight: 600; }
.topbar nav a { text-decoration: none; }
@media (max-width: 480px) { .topbar nav { display: none; } }

.cart-btn, .icon-btn {
  position: relative; background: none; border: 0; color: inherit; cursor: pointer;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.cart-btn:active, .icon-btn:active { background: var(--line); }
.badge {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--pink); color: #fff; font-size: .75rem; font-weight: 700;
  border-radius: 10px; display: grid; place-items: center;
}

.hero { text-align: center; padding: 24px 16px 40px; max-width: 720px; margin: 0 auto; }
.hero-logo { width: min(100%, 460px); margin: 0 auto 8px; border-radius: 20px; mix-blend-mode: multiply; }
.hero-text { font-size: 1.1rem; margin: 0 auto 20px; max-width: 480px; }

.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--choco); color: #fff; padding: 12px 24px; border-radius: 999px; text-decoration: none;
  min-height: 44px;
}
.btn:active { transform: scale(.97); }
.btn.wa { background: var(--wa); width: 100%; }

.menu { padding: 16px; max-width: 1100px; margin: 0 auto; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--paper); color: inherit; font: inherit;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--choco); color: #fff; border-color: var(--choco); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--line); }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; font-size: .95rem; opacity: .85; }
.card select { font: inherit; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; min-height: 40px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.price { font-size: 1.25rem; font-weight: 700; color: var(--caramel); }
.add { background: var(--caramel); padding: 10px 18px; }

.contact { display: flex; gap: 24px; align-items: center; padding: 40px 16px; max-width: 800px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.contact img { width: 220px; border-radius: 18px; mix-blend-mode: multiply; }
.contact a { font-weight: 700; }
footer { text-align: center; padding: 24px 16px; font-size: .9rem; opacity: .7; }

.overlay { position: fixed; inset: 0; background: rgba(40, 20, 10, .5); z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 420px); z-index: 40;
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.32, .72, 0, 1);
  visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.8rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 16px; }
.empty { text-align: center; padding: 40px 0; opacity: .7; }
.line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.line-info { flex: 1; min-width: 0; font-size: .95rem; }
.line-info strong { display: block; }
.line-info small { opacity: .7; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer; color: inherit; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }

.drawer-foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; background: #fff; }
.drawer-foot label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.drawer-foot input, .drawer-foot select, .drawer-foot textarea {
  font: inherit; font-size: 16px; /* evita zoom en iOS */ padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: inherit;
}
.total-row { display: flex; justify-content: space-between; font-size: 1.2rem; }
.hint { font-size: .8rem; opacity: .7; margin: 0; text-align: center; }
[hidden] { display: none !important; }

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

.card-hint { opacity: .7; font-size: .8rem; }
.price small { font-size: .8rem; font-weight: 600; opacity: .8; }
.story { max-width: 640px; margin: 0 auto; padding: 32px 16px 8px; text-align: center; }
.story p { margin: 0 0 12px; }
.credit { display: block; margin-top: 6px; font-size: .75rem; opacity: .8; }
.credit a { text-decoration: underline; }
