/* Overpull Mayorista — layout inspirado en Shop (Mobbin), colores de marca */
:root {
  --bg: #f4f2f0;
  --surface: #ffffff;
  --fg: #141414;
  --muted: #6b6b6b;
  --line: #e6e2de;
  --soft: #ebe7e3;
  --accent: #f5a3c7;
  --accent-deep: #e889b0;
  --accent-soft: #fff0f6;
  --radius: 18px;
  --radius-pill: 999px;
  --shadow: 0 8px 28px rgba(20, 20, 20, 0.06);
  --font: "Lexend", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 600; margin: 0 0 0.5rem; letter-spacing: -0.01em; }

.top-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
  padding: 0.55rem 1rem;
  background: var(--fg);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
}
.top-banner .sep { color: var(--accent); font-weight: 600; }

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 242, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
body.page-home .site-header {
  grid-template-columns: 1fr auto;
}
body.page-home .brand { display: none; }
body.page-home .header-search { display: none; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(420px, 100%);
  justify-self: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.55rem 0.95rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.header-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 163, 199, 0.25);
}
.header-search .search-ico { color: var(--muted); display: flex; }
.header-search input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  width: 100%;
  color: var(--fg);
}
.header-search input::placeholder { color: #9a9a9a; }

.bag-btn {
  position: relative;
  border: 0;
  background: var(--surface);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--fg);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.15s ease;
}
.bag-btn:hover { transform: translateY(-1px); background: var(--accent-soft); }
.bag-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--fg);
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.app {
  flex: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
}

/* —— Hero Shop: logo + search centrados, mosaico en carrusel —— */
.hero-shop {
  position: relative;
  margin: 0.35rem 0 1.1rem;
  height: clamp(240px, 34vw, 320px);
  border-radius: 24px;
  overflow: hidden;
  background: #e8e4e0;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.45s ease,
    margin 0.45s ease,
    background 0.45s ease;
}
.hero-mosaic {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-row {
  display: flex;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
.hero-group {
  display: flex;
  gap: 0.5rem;
  padding-right: 0.5rem;
  flex: 0 0 auto;
}
.hero-row.row-a {
  animation: hero-scroll-left 70s linear infinite;
}
.hero-row.row-b {
  animation: hero-scroll-right 85s linear infinite;
}
/* Pausar solo al hover de un tile, no de todo el hero (eso congelaba el scroll) */
.hero-tile:hover {
  animation-play-state: running;
}
@media (prefers-reduced-motion: reduce) {
  .hero-row.row-a,
  .hero-row.row-b { animation: none; }
}
@keyframes hero-scroll-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes hero-scroll-right {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.hero-tile {
  position: relative;
  flex: 0 0 auto;
  width: clamp(100px, 16vw, 128px);
  height: clamp(100px, 16vw, 128px);
  border-radius: 20px;
  overflow: hidden;
  background: #d5d0cb;
  border: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
}
.hero-tile img,
.hero-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.hero-tile.is-swapping img,
.hero-tile.is-swapping video {
  opacity: 0;
}

.hero-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1rem;
  background: radial-gradient(ellipse 55% 50% at 50% 48%, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.2) 45%, transparent 70%);
  pointer-events: none;
}
.hero-logo {
  height: clamp(72px, 14vw, 108px);
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(255,255,255,0.8));
  pointer-events: none;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-search {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: min(420px, 92%);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  padding: 0.72rem 1.05rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.95);
}
.hero-search .search-ico { color: var(--muted); display: flex; flex-shrink: 0; }
.hero-search input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
}

.hero-shop.is-searching {
  height: 148px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  background: linear-gradient(180deg, #efeae6 0%, #e8e4e0 100%);
}
.hero-shop.is-searching .hero-mosaic {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none !important;
}
.hero-shop.is-searching .hero-row {
  animation-play-state: paused;
}
.hero-shop.is-searching .hero-center {
  background: none;
}
.hero-shop.is-searching .hero-logo {
  height: clamp(40px, 8vw, 56px);
}
.hero-shop.is-searching .hero-search {
  width: min(480px, 100%);
}

.catalog-block {
  overflow: hidden;
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    transform 0.4s ease,
    margin 0.4s ease;
  margin-bottom: 0;
}
.catalog-block.is-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  margin-bottom: 0;
  pointer-events: none;
}

#product-results {
  margin-top: 0.35rem;
  transition: margin 0.35s ease;
}
.hero-shop.is-searching ~ #product-results {
  margin-top: 0.15rem;
}

.grid {
  transition: opacity 0.25s ease;
}
.grid.grid-fading { opacity: 0.35; }
.grid.grid-in { animation: grid-in 0.35s ease; }
@keyframes grid-in {
  from { opacity: 0.4; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-shop,
  .hero-mosaic,
  .hero-logo,
  .catalog-block,
  .grid { transition: none !important; animation: none !important; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.35rem 0 0.75rem;
}
.section-head h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.cat-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 4px 1.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
/* margin auto centra si entran todas y deja scrollear desde la primera si no (justify-content: center la corta) */
.cat-rail > :first-child { margin-left: auto; }
.cat-rail > :last-child { margin-right: auto; }
.cat-rail::-webkit-scrollbar { height: 0; }
#catalog.section-head { justify-content: center; }
.cat-card {
  flex: 0 0 auto;
  width: 118px;
  scroll-snap-align: start;
  border: 0;
  background: var(--surface);
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cat-card:hover { transform: translateY(-2px); }
.cat-card.active { outline: 2px solid var(--accent); outline-offset: 1px; }
.cat-card .thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--soft);
  overflow: hidden;
}
.cat-card .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.cat-card .label {
  padding: 0.65rem 0.75rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 500;
}
.cat-card.all .thumb {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem 0.85rem;
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 1.15rem; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 1.75rem 1.35rem; }
}

.card {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
}
.card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--soft);
  overflow: hidden;
  margin-bottom: 0.7rem;
  border-radius: var(--radius);
}
.card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: opacity 0.28s ease, transform 0.45s ease;
}
.card:hover .card-img img { transform: scale(1.03); }
.card-img .img-hover { opacity: 0; }
.card:hover .card-img .img-main.has-hover { opacity: 0; }
.card:hover .card-img .img-hover { opacity: 1; }

.card-sku {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-title {
  margin: 0.2rem 0 0.3rem;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  min-height: 2.5em;
}
.card-price {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* —— Detail —— */
.detail {
  display: grid;
  gap: 1.5rem;
  max-width: 980px;
  margin: 0.5rem auto 0;
}
@media (min-width: 800px) {
  .detail { grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; align-items: start; }
}
.detail-gallery { display: grid; gap: 0.55rem; }
.detail-img {
  aspect-ratio: 3 / 4;
  background: var(--soft);
  overflow: hidden;
  border-radius: 22px;
}
.detail-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}
.thumbs { display: flex; gap: 0.45rem; overflow-x: auto; }
.thumbs button {
  flex: 0 0 58px; height: 74px; padding: 0;
  border: 2px solid transparent; background: var(--soft);
  cursor: pointer; overflow: hidden; border-radius: 12px;
}
.thumbs button.active { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-sku {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail h1 {
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
}
.detail-price { font-size: 1.2rem; font-weight: 600; margin: 0.85rem 0; }
.detail-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0 0 1rem;
}
.detail-block {
  margin: 1.15rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.detail-block h3 {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.color-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.color-list li {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
}
.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}
.size-table th,
.size-table td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
}
.size-table th {
  background: var(--soft);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 1.1rem 0 0.4rem;
}
.detail textarea,
.detail input,
#checkout-form input,
#checkout-form textarea {
  width: 100%;
  font: inherit;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
}
.detail textarea { min-height: 6.5rem; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.1rem;
  border: 1px solid transparent;
  cursor: pointer;
  margin-top: 1rem;
  border-radius: var(--radius-pill);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn-dark { background: var(--fg); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-accent { background: var(--accent); color: var(--fg); border-color: var(--accent); }
.btn-outline { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn-outline:hover { background: var(--accent-soft); border-color: var(--accent); }

.muted { color: var(--muted); }
.hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.75rem; line-height: 1.45; }
.empty { color: var(--muted); padding: 2.5rem 0; text-align: center; font-size: 0.95rem; }

.drawer {
  position: fixed; inset: 0; background: rgba(0,0,0,0.32); z-index: 40;
  display: flex; justify-content: flex-end;
}
.drawer[hidden], .modal[hidden], .product-modal[hidden] { display: none !important; }

/* Product quick-view modal */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.product-modal-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(92vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  padding: 0;
}
.product-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  color: var(--fg);
}
.product-modal-close:hover { background: var(--accent-soft); }
body.modal-open { overflow: hidden; }

/* Phone: the whole body scrolls (photo, info, then the sticky order box).
   PC: two columns inside the box; the info column scrolls on its own. */
#product-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pm-layout {
  display: flex;
  flex-direction: column;
}
@media (min-width: 720px) {
  #product-modal-body { overflow: hidden; display: flex; }
  .pm-layout {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
}
.pm-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1rem 0.75rem;
  min-height: 0;
}
.pm-img {
  aspect-ratio: 3 / 4;
  max-height: 44vh;
  margin: 0 auto;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--soft);
}
@media (min-width: 720px) {
  .pm-gallery { overflow: hidden; }
  .pm-img {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    width: auto;
    max-width: 100%;
  }
}
.pm-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.pm-gallery .thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  flex-shrink: 0;
  padding-bottom: 0.15rem;
}
.pm-gallery .thumbs button {
  flex: 0 0 auto;
  width: 52px;
  height: 66px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft);
  cursor: pointer;
}
.pm-gallery .thumbs button.active { border-color: var(--accent); }
.pm-gallery .thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pm-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .pm-info { border-top: 0; border-left: 1px solid var(--line); }
}
.pm-scroll {
  padding: 1.15rem 1.15rem 0.75rem;
}
@media (min-width: 720px) {
  .pm-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2.75rem;
  }
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.pm-info .detail-sku {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pm-info h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pm-info .detail-price {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.pm-info .detail-desc {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.pm-info .detail-block { margin: 0 0 1rem; }
.pm-info .detail-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.pm-info .color-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pm-info .color-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem 0.28rem 0.3rem;
  border-radius: var(--radius-pill);
  background: var(--soft);
  font-size: 0.78rem;
  max-width: 100%;
}
.pm-info .color-chip .swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pm-info .color-chip .swatch.is-design {
  width: 24px;
  height: 24px;
}
.pm-info .color-chip .color-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.size-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pm-info .size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.pm-info .size-table th,
.pm-info .size-table td {
  border: 1px solid var(--line);
  padding: 0.35rem 0.45rem;
  text-align: left;
  white-space: nowrap;
}
/* Long headers ("Ancho de pecho (cm)") wrap instead of pushing the table past the box */
.pm-info .size-table th {
  white-space: normal;
  overflow-wrap: break-word;
  vertical-align: bottom;
}
.pm-info .size-table th { background: var(--soft); font-weight: 600; }

.pm-cta {
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  padding: 0.85rem 1.15rem calc(0.9rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.04);
}
.pm-cta label {
  display: block;
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
}
.pm-cta textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  min-height: 56px;
  max-height: 88px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.pm-cta .btn-accent {
  width: 100%;
  margin: 0;
}

.wa-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 35;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wa-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.55);
}
body.modal-open .wa-fab { opacity: 0; pointer-events: none; }

.drawer-panel {
  width: min(400px, 100%);
  background: var(--surface);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border-radius: 20px 0 0 20px;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { font-size: 1.05rem; font-weight: 600; }
.icon-btn { font-size: 1.5rem; background: none; border: none; cursor: pointer; line-height: 1; }
.cart-items { flex: 1; overflow: auto; margin: 1rem 0; }
.cart-line { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.cart-line .sku { font-size: 0.9rem; font-weight: 600; }
.cart-line .detail-text { color: var(--muted); font-size: 0.82rem; margin: 0.3rem 0; white-space: pre-wrap; }
.cart-line .row { display: flex; justify-content: space-between; align-items: center; }
.remove {
  background: none; border: none; color: var(--muted); text-decoration: underline;
  font: inherit; font-size: 0.78rem; cursor: pointer;
}
.drawer-foot { border-top: 1px solid var(--line); padding-top: 0.85rem; }
.cart-total { margin: 0 0 0.5rem; font-size: 0.9rem; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.36); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 560px) {
  .modal { align-items: center; padding: 1rem; }
}
.modal-panel {
  background: var(--surface);
  width: min(460px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 1.4rem 1.3rem 1.55rem;
  border-radius: 22px 22px 0 0;
}
@media (min-width: 560px) {
  .modal-panel { border-radius: 22px; }
}
.modal-panel h2 { font-size: 1.1rem; font-weight: 600; }
#checkout-form label { display: block; font-size: 0.8rem; font-weight: 500; margin-top: 0.75rem; }
.checkout-actions { display: grid; gap: 0.5rem; margin-top: 1rem; }
.linkish {
  margin-top: 0.85rem; color: var(--muted); text-decoration: underline;
  background: none; border: none; font: inherit; cursor: pointer;
  display: block; width: 100%; text-align: center;
}
.checkout-result {
  margin-top: 1rem; padding: 0.95rem 1rem;
  background: var(--accent-soft); font-size: 0.9rem; line-height: 1.45;
  border-radius: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.footer-logo {
  height: 26px;
  width: auto;
  opacity: 0.7;
  object-fit: contain;
}
.footer-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.2rem;
  font-size: 0.8rem;
}
.footer-links a { color: var(--fg); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 60vh;
  color: var(--muted);
  font-size: 0.95rem;
}
.spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--line);
  border-top-color: var(--accent-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.empty .btn { margin: 0.8rem auto 0; }
.form-error {
  margin: 0.4rem 0 0;
  color: #b3261e;
  font-size: 0.85rem;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(92vw, 420px);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--fg);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}
.toast[hidden] { display: none; }

.back {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0.75rem 0 1rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
}

.mobile-cta {
  display: none;
  position: sticky;
  bottom: 0;
  margin: 1rem -1rem -1rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(244, 242, 240, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
@media (max-width: 799px) {
  .mobile-cta { display: block; }
  .detail .btn-accent.desktop-only,
  .detail .btn-dark.desktop-only { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .header-search { display: none; }
  .brand { display: none; }
  .bag-btn { justify-self: end; }
  .hero-shop { height: 230px; border-radius: 18px; }
  .hero-tile { width: 96px; height: 96px; border-radius: 16px; }
  .hero-logo { height: 72px; }
  .hero-row.row-a { animation-duration: 55s; }
  .hero-row.row-b { animation-duration: 68s; }
}
@media (min-width: 800px) {
  .mobile-cta { display: none !important; }
}
