/* O'Poulé — Components */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
  line-height: 1;
}

.btn:hover  { transform: translate(-2px, -2px); box-shadow: var(--shadow-sticker-md); }
.btn:active { transform: translate(0, 0); box-shadow: none; }

.btn-primary { background: var(--ink); color: #fff; }
.btn-yellow  { background: var(--y);   color: var(--ink); }
.btn-ghost   { background: #fff;       color: var(--ink); }
.btn-warm    { background: var(--warm); color: #fff; border-color: var(--warm-deep); }

.btn-sm { font-size: 12px; padding: 8px 14px; }
.btn-lg { font-size: 16px; padding: 16px 28px; }

/* ── Sticker ── */
.sticker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 4px;
  border: 2px solid var(--ink);
  background: var(--y);
  color: var(--ink);
  letter-spacing: .02em;
  box-shadow: var(--shadow-sticker-sm);
}

.sticker--dark  { background: var(--ink); color: var(--y); }
.sticker--warm  { background: var(--warm); color: #fff; border-color: var(--warm-deep); }
.sticker--white { background: #fff; color: var(--ink); }
.sticker--sm    { font-size: 10px; padding: 4px 8px; }
.sticker--lg    { font-size: 16px; padding: 10px 16px; }

/* ── Bubble (speech bubble) ── */
.bubble {
  position: relative;
  display: inline-block;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 16px;
  font-family: var(--font-hand);
  font-size: 17px;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(0,0,0,.15);
}

.bubble::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: inherit;
  border-right: 2px solid var(--ink);
}

.bubble--bl::after { left: 22px; bottom: -9px; border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.bubble--br::after { right: 22px; bottom: -9px; border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.bubble--tl::after { left: 22px; top: -9px; border-top: 2px solid var(--ink); transform: rotate(225deg); }

/* ── Tile (card hover) ── */
.tile {
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
  cursor: pointer;
}
.tile:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

/* ── Marquee ticker ── */
.ticker {
  background: var(--ink);
  color: var(--y);
  overflow: hidden;
  padding: 10px 0;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.ticker__track {
  display: inline-flex;
  gap: 32px;
  padding-right: 32px;
  animation: marquee 40s linear infinite;
}

.ticker__inner { display: flex; width: fit-content; }

/* ── Stats strip ── */
.stats-strip {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stats-strip__item {
  padding: 20px 26px;
  border-right: 1.5px dashed rgba(255,255,255,.18);
}
.stats-strip__item:last-child { border-right: none; }

.stats-strip__val {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  color: var(--y);
}

.stats-strip__key {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--muted-lt);
  letter-spacing: .02em;
}

@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip__item:nth-child(2) { border-right: none; }
}

/* ── Product card ── */
.product-card {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  min-height: 160px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sticker-sm);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.product-card--dark { background: var(--ink); color: #fff; }
.product-card--yellow { background: var(--y); }

.product-card__img {
  position: absolute;
  right: -6px;
  top: -10px;
  width: 130px;
  transform: rotate(-8deg);
  pointer-events: none;
}

.product-card__tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--warm);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.product-card--dark .product-card__tag { color: var(--y); }

.product-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  margin: 0;
}

.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-2);
}

.product-card__price {
  font-weight: 800;
  font-size: 16px;
}

.add-to-cart-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--y);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s;
}

.add-to-cart-btn:hover { transform: scale(1.1); }
.product-card--dark .add-to-cart-btn { background: var(--y); color: var(--ink); }

/* ── Category tile ── */
.cat-tile {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sticker-sm);
}

.cat-tile__title {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  margin: 0;
}

.cat-tile__count {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.cat-tile__img {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 120px;
  pointer-events: none;
}

.cat-tile__link {
  position: absolute;
  bottom: 16px;
  left: 22px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  color: inherit;
}

/* ── Restaurant card ── */
.resto-card {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  padding: 14px;
  position: relative;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform .2s, box-shadow .2s;
}

.resto-card:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-sticker-sm); }
.resto-card--active { background: var(--y); box-shadow: var(--shadow-sticker-md); }

.resto-card__header { display: flex; justify-content: space-between; align-items: flex-start; }
.resto-card__name { font-family: var(--font-display); font-size: 18px; line-height: 1; }
.resto-card__addr { font-size: 12px; margin-top: 6px; color: #3f3a32; }
.resto-card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11px; }
.resto-card__dist { color: var(--muted); }
.resto-card__cmd  { font-weight: 800; }

.badge-open   { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 4px; color: var(--success); background: var(--success-bg); letter-spacing: .04em; }
.badge-closed { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 4px; color: var(--danger); background: var(--danger-bg); letter-spacing: .04em; }
.badge-new    { position: absolute; top: -8px; right: 12px; background: var(--warm); color: #fff; font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 4px; letter-spacing: .05em; }

/* ── Form inputs ── */
.inp {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.inp:focus { border-color: var(--y); box-shadow: 0 0 0 3px rgba(255,206,0,.25); }

.inp--dark {
  background: transparent;
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.inp--dark::placeholder { color: rgba(255,255,255,.5); }
.inp--dark:focus { border-color: var(--y); }

label .inp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 4px;
}

/* ── Quantity selector ── */
.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.qty-ctrl button {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-ctrl span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--y);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 300;
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Sticky cart ── */
.sticky-cart {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 14px 22px;
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform .2s;
}

.sticky-cart:hover { transform: translate(-2px, -2px); }
.sticky-cart.visible { display: flex; }
.sticky-cart__mascot { width: 38px; height: 38px; }
.sticky-cart__badge  { background: var(--y); color: var(--ink); border-radius: var(--r-pill); padding: 4px 10px; font-size: 12px; font-weight: 800; }

/* ── Popup / modal ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 150;
  display: none;
  place-items: center;
}
.overlay.open { display: grid; }

.modal {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-sticker-lg);
  position: relative;
}

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* ── Review card ── */
.review-card {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 16px;
}

.review-card__header { display: flex; justify-content: space-between; }
.review-card__name   { font-weight: 800; font-size: 13px; }
.review-card__stars  { color: var(--warm); font-size: 13px; }
.review-card__body   { font-size: 13px; margin-top: var(--sp-2); color: #3f3a32; }

/* ── How it works ── */
.how-step {
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-sticker-md);
  min-height: 220px;
  overflow: hidden;
}

.how-step__n { font-family: var(--font-display); font-size: 64px; line-height: 1; opacity: .25; }
.how-step__title { font-family: var(--font-display); font-size: 24px; margin: 8px 0 6px; line-height: 1; }
.how-step__body { font-size: 14px; margin: 0; line-height: 1.5; max-width: 260px; }
.how-step__mascot { position: absolute; right: 8px; bottom: 8px; width: 120px; }

/* ── Page section spacing ── */
.section { padding-block: 90px; }
.section--sm { padding-block: 48px; }

/* ── Checkbox / radio ── */
.choice-btn {
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 7px 13px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.choice-btn.active, .choice-btn:checked { background: var(--ink); color: #fff; }
.choice-btn--yellow.active              { background: var(--y); color: var(--ink); }

/* ── Accordion (details) ── */
details summary {
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255,255,255,.2);
  list-style: none;
  font-size: 14px;
}
details summary::-webkit-details-marker { display: none; }
details[open] summary { border-color: transparent; }
details p { color: var(--muted-lt); padding: 8px 0 0; font-size: 13px; margin: 0; }

/* ── Dotted background ── */
.dotted-bg {
  background-image: radial-gradient(rgba(0,0,0,.12) 1.5px, transparent 2px);
  background-size: 24px 24px;
  background-position: 0 0;
}

/* ── Diagonal stripe ── */
.stripe-bg {
  background-image: repeating-linear-gradient(45deg, transparent 0 80px, rgba(0,0,0,.04) 80px 82px);
}

/* ── Mobile burger nav ── */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--y);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding: var(--sp-8);
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }

.mobile-drawer__close {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--ink);
  color: var(--y);
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer a {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--ink);
  text-decoration: none;
  padding: var(--sp-2) 0;
  border-bottom: 1.5px solid rgba(0,0,0,.12);
  display: block;
}

.mobile-drawer a:hover { color: var(--warm); }

/* ── Responsive helpers ── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ── Pop'fid dots ── */
.fid-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--y);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.fid-dot.filled { background: var(--y); }

/* ── Cart item ── */
.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 20px;
  align-items: center;
  border-bottom: 1.5px dashed rgba(0,0,0,.1);
}
.cart-item:last-child { border-bottom: none; }

.cart-item__img {
  width: 70px;
  height: 70px;
  background: var(--y);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.cart-item__img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item__name    { font-family: var(--font-display); font-size: 17px; line-height: 1; }
.cart-item__desc    { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cart-item__price   { font-family: var(--font-display); font-size: 18px; min-width: 80px; text-align: right; flex-shrink: 0; }

.cart-item__remove {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
