:root {
  color-scheme: light;
  --canvas: #f3f0e9;
  --surface: #fffdf9;
  --surface-muted: #ebe7de;
  --ink: #171917;
  --ink-soft: #30332f;
  --muted: #6d7069;
  --line: #d9d4ca;
  --accent: #a66643;
  --accent-soft: #e8d7ca;
  --whatsapp: #25d366;
  --whatsapp-hover: #1fbd5a;
  --radius-card: 14px;
  --radius-large: 24px;
  --shadow-card: 0 14px 38px rgb(26 28 25 / 8%);
  --shadow-dialog: 0 28px 90px rgb(0 0 0 / 24%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 300px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgb(255 255 255 / 78%), transparent 30rem),
    var(--canvas);
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(37 211 102 / 40%);
  outline-offset: 3px;
}

.header-inner,
.site-main,
.site-footer {
  width: min(100%, 1440px);
  margin-inline: auto;
}

.site-header {
  position: relative;
  overflow: hidden;
  padding: 30px 18px 22px;
  background: var(--ink);
  color: #f8f5ee;
}

.site-header::after {
  position: absolute;
  right: -20vw;
  bottom: -34vw;
  width: 70vw;
  max-width: 760px;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  content: "";
}

.header-inner {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  text-align: center;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: #cbb7a8;
}

.brand-name {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: clamp(2.6rem, 12vw, 6.8rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 0.94;
  text-indent: 0.16em;
  text-transform: uppercase;
}

.brand-slogan {
  max-width: 34rem;
  margin: 16px auto 0;
  color: #bfc1bb;
  font-size: clamp(0.88rem, 3vw, 1.05rem);
  line-height: 1.55;
}

.header-meta {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  color: #9fa29b;
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-meta span + span::before {
  margin-right: 18px;
  color: var(--accent);
  content: "•";
}

.site-main {
  padding: 38px 12px 76px;
}

.collection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: 0 4px 24px;
}

.collection-heading h2 {
  max-width: 720px;
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 5.5vw, 3.35rem);
  font-weight: 520;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.collection-note {
  display: none;
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
  text-align: right;
}

.status-message {
  display: grid;
  min-height: 260px;
  margin: 0;
  place-items: center;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 1px 0 rgb(255 255 255 / 80%) inset;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.product-card__open {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.image-frame {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: var(--surface-muted);
  isolation: isolate;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 220ms ease;
}

.image-frame.is-loading img {
  opacity: 0;
}

.image-frame.is-loading::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgb(255 255 255 / 58%) 43%,
    transparent 62%
  );
  content: "";
  transform: translateX(-100%);
  animation: skeleton-sweep 1.25s ease-in-out infinite;
}

@keyframes skeleton-sweep {
  to {
    transform: translateX(100%);
  }
}

.product-card__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-bottom: 1px solid var(--line);
}

.image-fallback {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 16px;
  place-content: center;
  place-items: center;
  background:
    radial-gradient(circle at 50% 20%, rgb(255 255 255 / 66%), transparent 58%),
    #e2ded5;
  color: #747770;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.image-fallback svg {
  width: 36px;
  height: 36px;
  opacity: 0.72;
}

.image-frame.is-broken .image-fallback {
  display: grid;
}

.product-card__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 12px 12px;
}

.product-card__title {
  display: -webkit-box;
  min-height: 2.62em;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: clamp(0.8rem, 3.4vw, 0.98rem);
  font-weight: 630;
  line-height: 1.31;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.product-card__sku {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-card__price {
  flex: none;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.whatsapp-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgb(0 0 0 / 7%);
  border-radius: 10px;
  background: var(--whatsapp);
  color: #102417;
  font-size: 0.72rem;
  font-weight: 780;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 7px 18px rgb(37 211 102 / 18%);
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.whatsapp-button svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.product-card__whatsapp {
  margin: 0 10px 10px;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 20px 34px;
  background: var(--ink);
  color: #9fa29b;
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  margin-bottom: 4px !important;
  color: #f8f5ee;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-dialog {
  width: min(calc(100% - 16px), 1040px);
  max-height: calc(100dvh - 16px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-dialog);
}

.product-dialog::backdrop {
  background: rgb(10 12 10 / 74%);
  backdrop-filter: blur(7px);
}

.dialog-shell {
  position: relative;
  display: grid;
}

.dialog-close {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 1px solid rgb(255 255 255 / 58%);
  border-radius: 50%;
  place-items: center;
  background: rgb(255 253 249 / 92%);
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
}

.detail-gallery {
  min-width: 0;
  background: #e7e3da;
}

.detail-image-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  touch-action: pan-y;
  user-select: none;
}

.detail-image-frame img {
  object-fit: contain;
}

.gallery-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #efebe3;
}

.gallery-controls > button {
  display: grid;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid #d1cbc0;
  border-radius: 50%;
  place-items: center;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
  cursor: pointer;
}

.gallery-status {
  display: grid;
  gap: 4px;
  place-items: center;
}

.gallery-dots {
  display: flex;
  min-height: 10px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b5afa3;
  cursor: pointer;
  transition:
    width 160ms ease,
    background-color 160ms ease;
}

.gallery-dot[aria-current="true"] {
  width: 20px;
  border-radius: 999px;
  background: var(--ink);
}

.image-position {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.detail-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 30px 22px 24px;
}

.detail-sku {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-copy h2 {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: clamp(1.65rem, 7vw, 3rem);
  font-weight: 570;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.detail-price {
  margin: 20px 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.detail-description {
  margin: 22px 0 0;
  color: #555a53;
  font-size: 0.92rem;
  line-height: 1.75;
}

.detail-assurance {
  margin: 24px 0 14px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.whatsapp-button--large {
  min-height: 54px;
  margin-top: auto;
  font-size: 0.9rem;
}

.whatsapp-button--large svg {
  width: 21px;
  height: 21px;
}

@media (hover: hover) {
  .product-card:hover {
    border-color: #c9c2b6;
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
  }

  .whatsapp-button:hover {
    background: var(--whatsapp-hover);
    box-shadow: 0 9px 22px rgb(37 211 102 / 26%);
    transform: translateY(-1px);
  }

  .gallery-controls > button:hover,
  .dialog-close:hover {
    border-color: #aaa397;
  }
}

@media (min-width: 680px) {
  .site-header {
    padding: 48px 28px 28px;
  }

  .header-meta {
    justify-content: flex-end;
  }

  .site-main {
    padding: 58px 24px 104px;
  }

  .collection-heading {
    padding-bottom: 32px;
  }

  .collection-note {
    display: block;
  }

  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    padding: 34px 28px 38px;
    text-align: left;
  }

  .site-footer > p:last-child {
    text-align: right;
  }

  .dialog-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  }

  .detail-image-frame {
    aspect-ratio: 1 / 1;
  }

  .detail-copy {
    padding: 56px 42px 38px;
  }
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .product-card__copy {
    padding: 18px 16px 15px;
  }

  .product-card__whatsapp {
    margin: 0 14px 14px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
