/* =========================================================
   Trincanelas · Bolachas Artesanais
   Mobile-first: estilos base = telemóvel; @media = ecrãs maiores
   ========================================================= */

:root {
  --creme: #FBF3E2;
  --bege: #DCC3A1;
  --bege-escuro: #C9AC86;
  --rosa: #E8649E;
  --rosa-escuro: #C94A82;
  --rosa-po: #FBE3EC;
  --biscoito: #F1E4D2;   /* fundo de etiquetas neutras */
  --cacau: #7A5545;      /* detalhes castanhos suaves */
  --chocolate: #4A2C22;
  --preto: #2B2424;
  --branco: #FFFFFF;
  --menta: #CDE8E6;
  --lilas: #C9C3EE;

  --f-logo: 'Great Vibes', cursive;
  --f-titulo: 'Courgette', cursive;
  --f-texto: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --raio: 20px;
  --sombra: 0 6px 18px rgba(74, 44, 34, .10);
  --gutter: 16px;
  --callbar-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 17px;
  line-height: 1.55;
  color: var(--chocolate);
  background: var(--creme);
  /* espaço para a barra fixa no telemóvel */
  padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom));
  /* "clip" em vez de "hidden": o hidden estraga o scroll no Safari do iPhone */
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
strong { font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--chocolate); color: #fff; padding: 10px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--rosa); outline-offset: 3px; border-radius: 6px; }

/* ---------- Riscas (motivo do cartão) ---------- */
.hero,
.section--stripes {
  background-color: var(--bege);
  background-image: repeating-linear-gradient(
    90deg,
    var(--creme) 0 14px,
    var(--bege) 14px 28px
  );
}

/* ---------- Cabeçalho ---------- */
.hero {
  padding: calc(28px + env(safe-area-inset-top)) var(--gutter) 34px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: min(64vw, 260px);
  height: min(64vw, 260px);
  border-radius: 50%;
  filter: drop-shadow(0 8px 18px rgba(43, 36, 36, .18));
  position: relative;
  z-index: 1;
}
.hero__logo img { width: 100%; height: 100%; border-radius: 50%; }

.hero__tagline {
  margin: 14px 0 0;
  background: rgba(255, 255, 255, .85);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
}

.hero__nav {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  position: relative;
  z-index: 3;
}
.hero__nav a {
  text-decoration: none;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--branco);
  box-shadow: var(--sombra);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .12s, filter .12s;
}
.hero__nav a.is-pink { background: var(--rosa); color: #fff; }
.hero__nav a:active { transform: scale(.96); filter: brightness(.95); }

/* ---------- Fita (títulos) ---------- */
.ribbon {
  --cor: var(--rosa);
  position: relative;
  display: inline-block;
  margin: 0 auto 10px;
  padding: 0 28px;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .08));
}
.ribbon h1,
.ribbon h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 8px 22px 10px;
  background: var(--cor);
  color: #fff;
  font-family: var(--f-titulo);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  text-align: center;
}
/* pontas da fita, com o "V" recortado */
.ribbon::before,
.ribbon::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: -8px;
  width: 44px;
  background: var(--rosa-escuro);
}
.ribbon::before { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 50%); }
.ribbon::after { right: 0; clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }

.ribbon--hero { margin-top: -26px; z-index: 2; }
.ribbon--hero h1 { font-size: 24px; padding: 8px 26px 10px; }
.ribbon--hero h1 span { display: inline-block; }

/* ---------- Ondas (rebordo das caixas) ---------- */
.wave {
  height: 18px;
  margin-top: -1px;
  background-repeat: repeat-x;
  background-size: 36px 18px;
}
.wave--cream {
  background-color: var(--creme);
  background-image: radial-gradient(circle at 18px 0, var(--bege) 17px, transparent 18px);
}
.wave--beige {
  background-color: var(--creme);
  background-image: radial-gradient(circle at 18px 18px, var(--bege) 17px, transparent 18px);
}

/* ---------- Secções ---------- */
.section {
  padding: 40px var(--gutter) 48px;
  text-align: center;
}
.section > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section--white { background: var(--branco); }

.section__intro {
  margin: 6px auto 22px;
  max-width: 34em;
}
.loading { color: var(--bege-escuro); font-weight: 600; }

/* ---------- Mais vendidas: carrossel no telemóvel ---------- */
.best {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px var(--gutter) 14px;
  margin: 0 calc(var(--gutter) * -1);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.best::-webkit-scrollbar { display: none; }

.best__item {
  flex: 0 0 72%;
  max-width: 260px;
  scroll-snap-align: center;
  background: var(--branco);
  border-radius: var(--raio);
  padding: 22px 16px 20px;
  box-shadow: var(--sombra);
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
}
/* Tamanho fixo (largura E altura) para ficar sempre redondo, também no Safari */
.best__photo {
  position: relative;
  width: 150px;
  height: 150px;
  flex: none;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid var(--preto);
  background: var(--branco);
}
/* moldura de pontos */
.best__photo::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 3px dotted var(--preto);
  pointer-events: none;
  z-index: 1;
}
.best__clip {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* recorte redondo fiável no Safari */
}

.badge {
  position: absolute;
  right: -10px;
  top: -6px;
  z-index: 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--rosa);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.05;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--rosa);
  transform: rotate(12deg);
}
.best__item h3 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
  color: var(--preto);
}
.best__item p { margin: 0; font-size: 15px; }

/* ---------- Pesquisa ---------- */
.search {
  position: relative;
  max-width: 520px;
  margin-bottom: 12px;
}
.search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: var(--bege-escuro);
  pointer-events: none;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px evita o zoom automático do iPhone */
  font-weight: 500;
  color: var(--chocolate);
  background: var(--creme);
  border: 2px solid var(--bege);
  border-radius: 999px;
  padding: 12px 18px 12px 46px;
  min-height: 50px;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: #A68E75; }
.search input:focus { outline: none; border-color: var(--bege-escuro); background: var(--branco); }

/* ---------- Excluir alergénios / ingredientes ---------- */
.filter-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--chocolate);
  background: var(--creme);
  border: 2px solid var(--bege);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
  touch-action: manipulation;
}
.filter-toggle svg { width: 16px; height: 16px; fill: var(--cacau); flex: none; }
.filter-toggle.is-open { border-color: var(--chocolate); background: var(--biscoito); }
.filter-toggle__n {
  background: var(--chocolate);
  color: #fff;
  border-radius: 999px;
  min-width: 22px;
  padding: 0 7px;
  font-size: 13px;
  line-height: 22px;
}

.panel {
  max-width: 620px;
  margin: 0 var(--gutter) 10px;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: left;
  background: var(--creme);
  border: 2px solid var(--bege);
  border-radius: 18px;
  padding: 16px;
}
.panel[hidden] { display: none; }
.panel__lead { margin: 0 0 6px; }
.panel__title {
  margin: 14px 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8B7360;
}
.panel__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.panel__empty { margin: 0; font-size: 14px; color: #8B7360; }
.panel__note { margin: 14px 0 0; font-size: 13px; color: #8B7360; }

.xchip {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #A68E75;
  background: transparent;
  border: 2px dashed var(--bege);
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 40px;
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: line-through;
  transition: background .15s, border-color .15s, color .15s;
}
.xchip[hidden] { display: none; }
.xchip.is-on {
  color: var(--chocolate);
  background: var(--branco);
  border: 2px solid var(--bege-escuro);
  text-decoration: none;
}
.xchip.is-on::before { content: "✓ "; color: var(--cacau); font-weight: 700; }

.link-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--cacau);
  background: none;
  border: 0;
  padding: 10px 0 0;
  text-decoration: underline;
  cursor: pointer;
}

.panel__foot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 16px;
}
.btn-sec, .btn-pri {
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-sec, .btn-pri { white-space: nowrap; padding: 0 18px; }
.btn-sec { background: var(--branco); border: 2px solid var(--bege); color: var(--chocolate); }
.btn-pri { background: var(--chocolate); border: 2px solid var(--chocolate); color: #fff; }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 0 var(--gutter) 10px;
}
.active-filters[hidden] { display: none; }
.afilter {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--chocolate);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 34px;
  cursor: pointer;
  touch-action: manipulation;
}
.afilter span { margin-left: 4px; opacity: .8; }
.active-filters__label { font-size: 13px; font-weight: 700; color: #8B7360; align-self: center; }
.afilter--clear { background: none; color: var(--cacau); text-decoration: underline; }

/* ---------- Filtros (fixos no topo ao descer) ---------- */
.filters-wrap {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--branco);
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  border-bottom: 1px solid transparent;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px var(--gutter);
}
.toolbar .filter-toggle { order: 2; }
.filters {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid var(--bege);
  background: var(--branco);
  color: var(--chocolate);
  padding: 8px 16px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, border-color .15s, color .15s;
}
.chip__n {
  display: inline-block;
  min-width: 22px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--creme);
  font-size: 12px;
  line-height: 20px;
}
.chip.is-active {
  background: var(--chocolate);
  border-color: var(--chocolate);
  color: #fff;
}
.chip.is-active .chip__n { background: rgba(255, 255, 255, .25); }

.count {
  margin: 8px 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #8B7360;
  text-align: left;
}

/* ---------- Lista de produtos ---------- */
/* Telemóvel: linhas compactas (foto à esquerda), cabem 20–25 produtos sem cansar */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  text-align: left;
}

.card {
  background: var(--creme);
  border-radius: 18px;
  border: 2px solid #F1E2C8;
  overflow: hidden;
  scroll-margin-top: 70px;
  transition: border-color .2s, box-shadow .2s;
}
.card[hidden] { display: none; }
.card[open] { border-color: var(--bege-escuro); background: var(--branco); box-shadow: var(--sombra); }
.card[open] .card__more { background: var(--creme); }
/* Ao vir das "Mais vendidas": só a borda rosa do cartão pulsa, sem anel por fora */
.card.is-flash { animation: pulsar .55s ease-in-out 3; }
@keyframes pulsar {
  0%, 100% { border-color: var(--bege-escuro); }
  50% { border-color: var(--rosa); }
}

.card__head {
  display: grid;
  grid-template-columns: 96px 1fr 20px;
  gap: 14px;
  align-items: start;
  padding: 12px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
.card__head::-webkit-details-marker { display: none; }

.card__photo {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
}
.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--rosa-po);
}
.photo--placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,.6) 0 6px, transparent 7px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.6) 0 5px, transparent 6px),
    var(--ph-bg, var(--rosa-po));
}
.photo--placeholder svg { width: 66%; height: 66%; }
.ph--bolachas { --ph-bg: #F6E6CF; }
.ph--frutos-secos { --ph-bg: #EFEAF8; }
.ph--caixas { --ph-bg: #E6E2FA; }

.badge--mini {
  right: 4px;
  top: 4px;
  width: 26px;
  height: 26px;
  font-size: 14px;
  box-shadow: 0 0 0 2px #fff;
  transform: none;
}

.card__info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card__title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.price {
  flex: none;
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  color: var(--chocolate);
  background: var(--biscoito);
  border-radius: 999px;
  padding: 1px 10px;
  white-space: nowrap;
}
.best__item .price { margin-top: 10px; font-size: 16px; padding: 3px 14px; }
.card__info h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  color: var(--preto);
}
.card__desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card[open] .card__desc { -webkit-line-clamp: unset; display: block; }

.card__toggle {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  position: relative;
}
.card__toggle::before,
.card__toggle::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px; top: 9px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--cacau);
  transition: transform .2s;
}
.card__toggle::after { transform: rotate(90deg); }
.card[open] .card__toggle::after { transform: rotate(0); }

.allergens { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--biscoito);
  color: #6B4434;
  line-height: 1.5;
}
.tag--ok { background: #E3F2EC; color: #2E6B55; }

.card__more {
  margin: 0 12px 12px;
  padding: 10px 12px;
  background: var(--branco);
  border-radius: 12px;
  font-size: 15px;
}
.card__more p { margin: 0; }

/* produto suspenso */
.card.is-off .card__photo { filter: grayscale(.8); opacity: .6; }
.card.is-off h3, .card.is-off .card__desc { opacity: .6; }
.off-label {
  align-self: flex-start;
  background: var(--preto); color: #fff;
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
}

.empty { text-align: center; grid-column: 1 / -1; padding: 20px 0; }

/* ---------- Sobre ---------- */
.about {
  background: var(--branco);
  border-radius: var(--raio);
  padding: 30px 22px 26px;
  box-shadow: var(--sombra);
  max-width: 620px;
  position: relative;
}
.about p { margin: 12px 0 0; }
.about__heart {
  display: block;
  color: var(--rosa);
  font-size: 28px;
  margin-top: 12px;
}

/* ---------- Contactos ---------- */
.contacts {
  display: grid;
  gap: 12px;
  max-width: 560px;
  text-align: left;
}
.contact {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--branco);
  border-radius: 18px;
  padding: 14px 16px;
  min-height: 72px;
  text-decoration: none;
  box-shadow: var(--sombra);
  border: 2px solid transparent;
  touch-action: manipulation;
  transition: border-color .15s, transform .15s;
}
a.contact:hover { border-color: var(--rosa); }
a.contact:active { transform: scale(.98); }
.contact__icon {
  flex: 0 0 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--rosa);
  display: grid;
  place-items: center;
}
.contact__icon svg { width: 24px; height: 24px; fill: #fff; }
.contact__icon--wa { background: #25A35A; }
.contact__icon--fb { background: #3B6FD8; }
.contact__text { display: flex; flex-direction: column; line-height: 1.3; }
.contact__text strong { font-size: 18px; color: var(--preto); }
.contact__text span { font-size: 16px; }

/* ---------- Rodapé ---------- */
.footer {
  background: var(--bege);
  text-align: center;
  padding: 26px var(--gutter) 30px;
  font-size: 15px;
}
.footer img { margin: 0 auto 4px; }
.footer p { margin: 2px auto; max-width: 34em; }
.footer__name { font-family: var(--f-logo); font-size: 34px; color: var(--preto); line-height: 1.2; }
.footer__small { font-size: 13px; opacity: .85; margin-top: 8px !important; }

/* ---------- Barra fixa (telemóvel) ---------- */
.callbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 243, 226, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--bege);
  transition: transform .25s ease;
}
.callbar.is-hidden { transform: translateY(110%); }
.callbar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: var(--branco);
  border: 2px solid var(--bege);
  color: var(--chocolate);
  touch-action: manipulation;
}
.callbar__btn:active { transform: scale(.97); }
.callbar__btn svg { width: 18px; height: 18px; fill: currentColor; }
.callbar__btn--pink { background: var(--rosa); border-color: var(--rosa); color: #fff; }

@media (max-width: 639px) {
  .toolbar { gap: 6px; padding: 10px 12px; }
  .filters { gap: 6px; }
  .chip { padding: 7px 11px; font-size: 14px; border-width: 1.5px; }
  .chip__n { display: none; }
  .filter-toggle { padding: 7px 11px; font-size: 14px; gap: 5px; border-width: 1.5px; }
  .filter-toggle__n { display: none !important; }
  .filter-toggle.has-active { background: var(--chocolate); border-color: var(--chocolate); color: #fff; }
  .filter-toggle.has-active svg { fill: #fff; }
  .filters {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
    padding-right: 14px;
  }
}

/* =========================================================
   Ecrãs muito pequenos (iPhone SE, etc.)
   ========================================================= */
@media (max-width: 360px) {
  body { font-size: 16px; }
  .ribbon { padding: 0 22px; }
  .ribbon h2 { font-size: 22px; padding: 7px 16px 9px; }
  .ribbon--hero h1 { font-size: 21px; }
  .card__head { grid-template-columns: 80px 1fr 20px; gap: 12px; }
  .card__photo { width: 80px; height: 80px; }
}

/* =========================================================
   Tablet: duas colunas de linhas
   ========================================================= */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start; }
  .best__item { flex-basis: 260px; }
  .ribbon h2 { font-size: 30px; }
  .ribbon--hero h1 { font-size: 28px; }
  .toolbar { justify-content: center; }
  .filters { flex: 0 1 auto; }
  .panel { margin-left: auto; margin-right: auto; }
}

/* =========================================================
   Desktop: cartões verticais, 4 por linha
   ========================================================= */
@media (min-width: 1000px) {
  :root { --gutter: 32px; }
  body { padding-bottom: 0; font-size: 18px; }
  .callbar { display: none; }

  .hero { padding-top: 48px; padding-bottom: 46px; }
  .hero__logo { width: 300px; height: 300px; }
  .ribbon--hero { margin-top: -32px; }
  .ribbon--hero h1 { font-size: 32px; padding: 10px 34px 12px; }
  .hero__nav a:hover { transform: translateY(-2px); }

  .section { padding: 64px var(--gutter) 72px; }

  .best {
    overflow: visible;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 auto;
    padding: 8px 0;
  }
  .best__item { flex: 0 1 260px; max-width: 280px; transition: transform .2s; }
  .best__item:hover { transform: translateY(-4px); }
  .best__photo { width: 170px; height: 170px; }

  .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .card { background: var(--creme); }
  .card:hover { box-shadow: 0 10px 24px rgba(74, 44, 34, .12); }
  .card__head {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
    position: relative;
  }
  .card__photo { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; }
  .badge--mini { right: 10px; top: 10px; width: 32px; height: 32px; font-size: 16px; }
  .card__info { padding: 14px 16px 16px; }
  .card__toggle { position: absolute; right: 14px; bottom: 16px; }
  .card__info { padding-right: 40px; }

  .contacts { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
