/* Marina Concept Store storefront. Brand rules: docs/brand-and-ux.md. */

:root {
  --laguna: #12343B;
  --guarda: #0E7A74;
  --guarda-dark: #0A5F5A;
  --menta: #DDEFE9;
  --sol: #F6D365;
  --coral: #F4BFAE;
  --arena: #F6F4EF;
  --linea: #E2E7E5;
  --gris: #56676B;
  --error: #A3261B;
  --white: #FFFFFF;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --page: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
html:has(dialog[open]), html.sheet-open { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--laguna);
  background: var(--arena);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, select, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--guarda); outline-offset: 2px; }

.page {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.display {
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--laguna);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons and controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--guarda); color: var(--white); }
.btn-primary:hover { background: var(--guarda-dark); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
  background: var(--linea); color: var(--gris); cursor: not-allowed;
}
.btn-secondary { background: transparent; color: var(--laguna); border-color: var(--laguna); }
.btn-secondary:hover { background: var(--laguna); color: var(--white); }
.btn-secondary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary:disabled:hover { background: transparent; color: var(--laguna); }
.btn-block { width: 100%; }

.link-btn, .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--guarda-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover, .text-link:hover { color: var(--laguna); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--laguna);
  border-radius: 999px;
  background: var(--white);
  color: var(--laguna);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.pill:hover { background: var(--menta); }
.pill[aria-pressed="true"] { background: var(--laguna); color: var(--white); }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 1.5px solid var(--linea);
  border-radius: var(--r-sm);
  background: var(--white);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chip:hover { border-color: var(--laguna); }
.chip[aria-pressed="true"] { background: var(--laguna); border-color: var(--laguna); color: var(--white); }
.chip:disabled {
  background: var(--arena);
  border-color: var(--linea);
  color: var(--gris);
  text-decoration: line-through;
  cursor: not-allowed;
}

.swatch {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: none;
}
.swatch span {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c, var(--linea));
  box-shadow: inset 0 0 0 1px rgba(18, 52, 59, .25);
}
.swatch:hover { border-color: var(--linea); }
.swatch[aria-pressed="true"] { border-color: var(--laguna); }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--guarda); }
.check-n { margin-left: auto; color: var(--gris); font-size: 14px; font-variant-numeric: tabular-nums; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--laguna);
}
.icon-btn:hover { background: var(--menta); }
.icon-btn svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Promo bar */

.promo { background: var(--menta); font-size: 14px; }
.promo .page {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
}
.promo p { font-weight: 600; }
.promo-extra { color: var(--gris); }
.promo-extra { font-weight: 500 !important; }
.currency {
  display: flex;
  margin-left: auto;
  border: 1.5px solid var(--laguna);
  border-radius: 999px;
  overflow: hidden;
}
.currency button {
  min-height: 44px;
  min-width: 52px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 14px;
}
.currency button[aria-pressed="true"] { background: var(--laguna); color: var(--white); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 239, .96);
  border-bottom: 1px solid var(--linea);
  backdrop-filter: saturate(1.2) blur(8px);
}
.head-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "logo nav tools";
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.logo { grid-area: logo; display: inline-flex; align-items: center; min-height: 44px; }
.logo img { height: 38px; width: auto; }
.main-nav { grid-area: nav; min-width: 0; }
.main-nav ul { display: flex; gap: 4px; justify-content: center; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--menta); }
.main-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.tools { grid-area: tools; display: flex; gap: 4px; }
.badge {
  position: absolute;
  top: 2px; right: 0;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sol);
  color: var(--laguna);
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.search-bar { border-top: 1px solid var(--linea); padding-block: 12px; }
.search-bar form { display: block; }
.search-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--laguna);
  border-radius: 999px;
  background: var(--white);
  font-size: 16px;
}
.search-bar input::placeholder { color: var(--gris); }

@media (max-width: 860px) {
  .head-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "logo tools" "nav nav";
    gap: 4px 12px;
    min-height: 0;
    padding-top: 8px;
  }
  .logo img { height: 30px; }
  .main-nav {
    margin-inline: calc(var(--gutter) * -1);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav ul { justify-content: flex-start; gap: 8px; padding: 4px var(--gutter) 10px; width: max-content; }
  .main-nav a { background: var(--white); border: 1px solid var(--linea); padding: 0 14px; }
  .main-nav a[aria-current="page"] { background: var(--laguna); border-color: var(--laguna); color: var(--white); text-decoration: none; }
}
@media (max-width: 700px) {
  .promo-extra { display: none; }
}

/* Home hero */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(86svh, 820px);
  overflow: hidden;
  background: var(--laguna);
  color: var(--white);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.hero-video { opacity: 0; transition: opacity .6s ease; }
.hero-video.is-playing { opacity: 1; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 52, 59, 0) 35%, rgba(18, 52, 59, .55) 65%, rgba(18, 52, 59, .9) 100%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding-block: 48px clamp(40px, 7vw, 88px);
}
.hero h1 {
  max-width: 11ch;
  font-size: clamp(40px, 7.4vw, 104px);
  line-height: .92;
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.lede { max-width: 46ch; margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; }
.hero .btn-primary { margin-top: 28px; background: var(--sol); color: var(--laguna); }
.hero .btn-primary:hover { background: var(--white); }
.hero .btn-primary:focus-visible { outline-color: var(--sol); outline-offset: 3px; }

.hero-pause {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 52, 59, .7);
  color: var(--white);
}
.hero-pause:focus-visible { outline-color: var(--sol); }
.hero-pause::before { content: ""; display: block; }
.hero-pause[data-state="playing"]::before {
  width: 12px; height: 14px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}
.hero-pause[data-state="paused"]::before {
  width: 0; height: 0;
  margin-left: 4px;
  border-left: 13px solid currentColor;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

@media (max-width: 700px) {
  .hero { display: block; min-height: 0; }
  .hero-media { position: relative; aspect-ratio: 4 / 3; }
  .hero-media::after { background: linear-gradient(180deg, rgba(18, 52, 59, 0) 70%, rgba(18, 52, 59, .6) 100%); }
  .hero-copy { padding-block: 24px 36px; }
  .hero h1 { font-size: clamp(38px, 11vw, 56px); }
  .hero .btn-primary { width: 100%; }
}

/* Home sections */

.home-section { margin-top: clamp(48px, 7vw, 88px); }
.home-section:last-of-type { margin-bottom: clamp(56px, 8vw, 104px); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section-head h2, .shop-head h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tile a, .tile .tile-skel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  padding: 14px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--laguna);
  color: var(--white);
  text-decoration: none;
}
.tile .tile-skel { background: var(--linea); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.tile a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 52, 59, 0) 45%, rgba(18, 52, 59, .85) 100%);
}
.tile-name, .tile-n, .tile-badge { position: relative; z-index: 1; }
.tile-name { font-size: clamp(20px, 1.8vw, 26px); font-stretch: 125%; font-weight: 800; line-height: 1.05; }
.tile-n { margin-top: 4px; font-size: 14px; }
.tile-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sol);
  color: var(--laguna);
  font-size: 13px;
  font-weight: 700;
}
.tile-plain a { background: var(--menta); color: var(--laguna); }
.tile-plain a::after { display: none; }
.tile a:hover img { filter: brightness(1.05); }

@media (max-width: 860px) {
  .tiles {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 44%;
    gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { scroll-snap-align: start; }
}

.activities { display: flex; flex-wrap: wrap; gap: 10px; }

/* Product cards */

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.is-loading { opacity: .55; transition: opacity .15s; }
@media (max-width: 1100px) {
  .grid, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
}

.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--linea);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 30%); }
.card-noimg {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  background: var(--menta);
  color: var(--gris);
  font-size: 14px;
}
.card:has(.card-open:focus-visible) .card-media { outline: 3px solid var(--guarda); outline-offset: 2px; }
.card-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-name { font-size: 16px; font-weight: 700; line-height: 1.3; min-width: 0; }
.card-open { text-decoration: none; }
.card-open:focus-visible { outline: none; }
.card-open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card-name { text-decoration: underline; text-underline-offset: 3px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gris); font-size: 14px; }
.dots { display: flex; gap: 4px; flex-shrink: 0; }
.dots i {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c, var(--linea));
  box-shadow: inset 0 0 0 1px rgba(18, 52, 59, .25);
}
@media (max-width: 560px) {
  .card-row { flex-direction: column; gap: 6px; }
}

.tag {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sol);
  color: var(--laguna);
  font-size: 13px;
  font-weight: 700;
}
.tag-sale { background: var(--coral); }
.tag + .tag { top: 44px; }

.price-box { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.price {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--guarda);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price-sale { background: var(--coral); color: var(--laguna); }
.old { color: var(--gris); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Skeletons */

.skel {
  background: linear-gradient(90deg, var(--linea) 0%, #EEF1F0 50%, var(--linea) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.skel-line { height: 16px; width: 80%; }
.skel-line.short { width: 45%; }
.skel-card .card-media.skel { border-radius: var(--r-md); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Shop page */

.shop-head { padding-top: clamp(24px, 4vw, 48px); padding-bottom: 20px; }
.shop-head .activities { margin-top: 20px; }
.catalog {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 104px);
}
.filters {
  position: sticky;
  top: 88px;
  max-height: calc(100dvh - 104px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.filters-head { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.filters-head h2 { font-size: 20px; font-weight: 800; }
.filters-head .link-btn { margin-left: auto; }
.filter-group { padding: 16px 0; border-top: 1px solid var(--linea); }
.filter-group legend { margin-bottom: 8px; font-weight: 700; }
.filter-group .sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; }

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 20px;
}
#count { color: var(--gris); font-variant-numeric: tabular-nums; }
.sort { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sort span { color: var(--gris); font-size: 14px; }
.sort select {
  min-height: 44px;
  padding: 0 40px 0 14px;
  border: 1.5px solid var(--linea);
  border-radius: 999px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2312343B' stroke-width='1.8'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--laguna);
  font-weight: 600;
  appearance: none;
}
.filter-toggle { display: none; }
.filter-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.filter-n {
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sol);
  color: var(--laguna);
  font-size: 13px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

.empty {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: 40px 24px;
  border-radius: var(--r-md);
  background: var(--menta);
}
.empty p { font-weight: 600; font-size: 18px; }
.more-wrap { display: flex; justify-content: center; margin-top: 40px; }
.more { min-width: 220px; }

@media (min-width: 861px) {
  .sheet-close, .sheet-foot, .sheet-scrim { display: none !important; }
}

@media (max-width: 860px) {
  .shop-head .activities {
    flex-wrap: nowrap;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .shop-head .activities::-webkit-scrollbar { display: none; }
  .catalog { display: block; }
  .filter-toggle { display: inline-flex; }
  #count { order: 3; flex-basis: 100%; }
  .filters {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto;
    z-index: 60;
    max-height: 88dvh;
    padding: 8px var(--gutter) 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    background: var(--white);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .filters.open { transform: none; visibility: visible; transition: transform .25s ease; }
  .filters-head .sheet-close { margin-right: -10px; }
  .filter-group .sizes { grid-template-columns: repeat(6, 1fr); }
  .sheet-foot {
    position: sticky;
    bottom: 0;
    margin-inline: calc(var(--gutter) * -1);
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--linea);
    background: var(--white);
  }
  .sheet-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(18, 52, 59, .5); }
}

/* Footer */

.site-footer { padding-block: 56px 32px; background: var(--laguna); color: #C9D6D8; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand img { width: 200px; height: auto; margin-bottom: 16px; }
.site-footer h2 { margin-bottom: 8px; color: var(--white); font-size: 16px; font-weight: 700; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  font-weight: 600;
}
.site-footer a:focus-visible { outline-color: var(--sol); }
.foot-links { display: grid; }
.fineprint { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(201, 214, 216, .25); color: #A9BBBE; font-size: 13px; }
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* Side panel: quick view and bag */

.panel {
  width: min(480px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--laguna);
}
.panel[open] { display: flex; flex-direction: column; animation: panel-in .22s ease-out; }
.panel::backdrop { background: rgba(18, 52, 59, .5); }
@keyframes panel-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-close { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(255, 255, 255, .92); }
.panel-body { flex: 1; overflow-y: auto; overflow-x: clip; overscroll-behavior: contain; }
@media (max-width: 700px) {
  .panel {
    width: 100%;
    height: auto;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  @keyframes panel-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

.pv-loading { padding-bottom: 24px; }
.pv-skel-media { aspect-ratio: 3 / 4; max-height: 56dvh; width: 100%; border-radius: 0; }
.pv-loading .pv-info { padding: 20px 24px; }
.pv-missing { padding-top: 64px; }

.pv-gallery { background: var(--arena); }
.pv-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.pv-track::-webkit-scrollbar { display: none; }
.pv-track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 58dvh;
  object-fit: contain;
  background: var(--arena);
  scroll-snap-align: start;
}
.pv-thumbs { display: flex; gap: 8px; padding: 10px 24px; overflow-x: auto; }
.pv-thumb {
  flex: 0 0 auto;
  width: 44px; height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: var(--linea);
}
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumb[aria-current="true"] { border-color: var(--laguna); }

.pv-info { display: grid; gap: 16px; padding: 20px 24px; }
.pv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pv-head h2 { font-size: 24px; font-stretch: 115%; font-weight: 800; line-height: 1.15; }
.pv-desc { line-height: 1.55; }
.pv-fabric { color: var(--gris); font-size: 14px; }
.pv-field legend { margin-bottom: 8px; font-weight: 700; }
.pv-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-color {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.pv-color input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c, var(--linea));
  box-shadow: inset 0 0 0 1px rgba(18, 52, 59, .25);
}
.pv-color:has(input:checked) { border-color: var(--laguna); }
.pv-color:has(input:focus-visible) { outline: 3px solid var(--guarda); outline-offset: 2px; }
.pv-color:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.pv-color:has(input:disabled)::after {
  content: "";
  position: absolute;
  width: 34px; height: 2px;
  background: var(--laguna);
  transform: rotate(-45deg);
}
.pv-sizes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pv-msg { min-height: 24px; color: var(--gris); font-size: 14px; }
.pv-msg.is-error { color: var(--error); font-weight: 600; }
/* Sticky at every width, so "Agregar a la bolsa" is always on screen. */
.pv-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-inline: -24px;
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linea);
  background: var(--white);
}
.pv-wa { margin-top: -6px; }
.pv-note { color: var(--gris); font-size: 13px; }

.bag-title { padding: 20px 64px 12px 24px; font-size: 24px; font-stretch: 115%; font-weight: 800; }
.bag-title:focus { outline: none; }
.bag-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 24px 8px;
  padding: 4px 14px;
  border-radius: var(--r-sm);
  background: var(--menta);
}
.bag-empty { display: grid; justify-items: start; gap: 16px; padding: 12px 24px 32px; }
.bag-list { padding: 0 24px; }
.bag-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--linea);
}
.bag-item img, .bag-noimg {
  width: 72px; height: 96px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--menta);
}
.bag-noimg { display: block; }
.bag-info { display: grid; gap: 2px; min-width: 0; }
.bag-name { font-weight: 700; }
.bag-variant { color: var(--gris); font-size: 14px; }
.bag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 999px; }
.qty button {
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 20px;
  font-weight: 600;
}
.qty button:disabled { color: var(--linea); cursor: not-allowed; }
.qty output { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.bag-price { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.bag-totals { display: grid; gap: 6px; padding: 16px 24px 0; }
.bag-totals div { display: flex; justify-content: space-between; gap: 12px; }
.bag-totals dd { font-variant-numeric: tabular-nums; }
.bag-discount { color: var(--guarda-dark); font-weight: 600; }
.bag-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--linea); font-size: 20px; font-weight: 800; }
.bag-hints { display: grid; gap: 4px; padding: 12px 24px 0; color: var(--gris); font-size: 14px; }
.bag-actions { display: grid; gap: 10px; padding: 16px 24px; }
.panel-body > .pv-note { padding: 0 24px 24px; }

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  background: var(--laguna);
  color: var(--white);
  font-weight: 600;
  transform: translate(-50%, 12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s, visibility 0s linear .2s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s, transform .2s; }
.toast span { padding-block: 10px; }
#toastUndo {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--sol);
  color: var(--laguna);
  font-weight: 700;
}
#toastUndo:focus-visible { outline-color: var(--sol); }

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .skel { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
