:root {
  color-scheme: light;
  --ink: #151715;
  --muted: #70736f;
  --line: #dedfdb;
  --paper: #f7f7f4;
  --accent: #df442d;
  --whatsapp: #167c57;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  letter-spacing: 0;
}

a { color: inherit; }

.site-header {
  width: min(1440px, calc(100% - 48px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #111;
  font-weight: 900;
  font-size: 21px;
}
.brand > span:last-child { display: grid; gap: 2px; }
.brand strong { font-size: 18px; }
.brand small { color: var(--muted); font-size: 11px; }

.language-nav { display: flex; align-items: center; gap: 4px; }
.language-nav a {
  min-width: 40px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.language-nav a.is-active { background: var(--ink); color: white; }
.language-nav .cart-link {
  display: flex;
  gap: 6px;
  margin-right: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
}
.cart-link b { min-width: 17px; text-align: center; }

main { width: min(1440px, calc(100% - 48px)); margin: 0 auto 88px; }
.back-link {
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.product-layout {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  background: var(--paper);
}
.product-visual {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 90px);
  background: #f0f0ed;
}
.product-visual img {
  width: 100%;
  height: 440px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.product-image-button {
  position: relative;
  width: 100%;
  height: 440px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.product-image-button img { height: 100%; }
.product-image-zoom-icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 8px 24px rgba(21, 23, 21, .12);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.product-image-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.image-lightbox {
  width: min(94vw, 1200px);
  height: min(92dvh, 960px);
  max-width: none;
  max-height: none;
  padding: clamp(48px, 6vw, 80px);
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  overflow: hidden;
}
.image-lightbox[open] { display: grid; place-items: center; }
.image-lightbox::backdrop {
  background: rgba(14, 16, 15, .76);
  backdrop-filter: blur(10px);
}
.image-lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(calc(92dvh - 160px), 800px);
  object-fit: contain;
}
.image-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 27px;
  line-height: 1;
}
.image-lightbox-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.product-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(36px, 5vw, 72px);
}
.product-layout.has-no-image {
  min-height: 0;
  grid-template-columns: 1fr;
}
.has-no-image .product-summary {
  width: min(100%, 960px);
  min-height: 320px;
  padding: clamp(40px, 6vw, 72px);
}
.has-no-image .status { margin-bottom: 16px; }
.has-no-image .brand-name { margin-top: 14px; }
.has-no-image .availability { margin-top: 16px; }
.has-no-image .actions { margin-top: 24px; }
.status {
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
h1 {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 56px;
  line-height: 1;
}
.model-title.is-medium {
  font-size: 38px;
  line-height: 1.04;
  text-wrap: balance;
}
.model-title.is-long {
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.08;
  text-wrap: balance;
}
.brand-name { margin: 20px 0 0; font-size: 17px; font-weight: 700; }
.availability { max-width: 38ch; margin: 24px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.availability.is-eol { color: var(--accent); font-weight: 700; }
.actions { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}
.button-whatsapp { background: var(--whatsapp); color: white; }
.button-facebook { background: #1877f2; color: white; }
.button-light { border-color: #cfd0cc; background: transparent; }
.button-dark { background: var(--ink); color: white; }
.button-dark.is-added { background: var(--accent); }
.copy-link-button { min-width: 136px; }
.copy-link-button.is-copied { border-color: var(--whatsapp); color: var(--whatsapp); }
.mobile-product-actions { display: none; }

.product-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 42px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.product-highlight {
  min-width: 0;
  min-height: 150px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 9px;
  padding: 24px clamp(18px, 3vw, 36px);
}
.product-highlight + .product-highlight { border-left: 1px solid var(--line); }
.product-highlight span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}
.product-highlight small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}
.product-highlight strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(15px, 1.45vw, 20px);
  line-height: 1.25;
}

.specifications {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
  gap: clamp(36px, 7vw, 120px);
  padding: clamp(64px, 9vw, 130px) clamp(0px, 3vw, 48px);
}
.spec-heading span { color: var(--accent); font-size: 12px; font-weight: 800; }
.spec-heading h2 { margin: 14px 0 0; font-size: clamp(28px, 4vw, 54px); line-height: 1; }
.spec-content { min-width: 0; }
.spec-list { margin: 0; border-top: 1px solid var(--line); }
.spec-list [hidden] { display: none !important; }
.spec-list div {
  display: grid;
  grid-template-columns: minmax(130px, .65fr) minmax(0, 1.35fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.spec-list dt { color: var(--muted); font-size: 13px; }
.spec-list dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 650; line-height: 1.45; }
.spec-toggle {
  min-height: 44px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.spec-toggle:hover { border-color: var(--ink); }

.related-products {
  padding: 40px 0 12px;
}
.related-products h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.2;
}
.related-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.related-product-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
}
.related-product-image {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 14px;
  background: var(--paper);
  overflow: hidden;
}
.related-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.related-product-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}
.related-product-card small { color: var(--muted); font-size: 11px; }
.related-product-card:hover { border-color: var(--ink); }
.related-product-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.empty-state {
  min-height: calc(100vh - 84px);
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 48px 0;
  text-align: center;
}
.empty-code { color: var(--accent); font-size: 13px; font-weight: 900; }
.empty-state h1 { margin-top: 16px; font-size: clamp(36px, 7vw, 72px); }
.empty-state p { margin: 18px 0 30px; color: var(--muted); }

@media (max-width: 820px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-header, main { width: min(100% - 28px, 720px); }
  .site-header { height: 72px; }
  .brand small { display: none; }
  .product-layout { min-height: 0; grid-template-columns: 1fr; }
  .product-visual { min-height: min(82vw, 520px); padding: 28px; }
  .product-visual img { height: min(72vw, 430px); }
  .product-image-button { height: min(72vw, 430px); }
  .product-image-button img { height: 100%; }
  .product-summary { padding: 38px 24px 44px; }
  h1 { max-width: 100%; font-size: 42px; }
  .model-title.is-long { font-size: 34px; }
  .specifications { grid-template-columns: 1fr; padding: 72px 10px; }
  .spec-toggle { width: 100%; }
  .related-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-summary .actions > [data-add-cart],
  .product-summary .actions > .button-whatsapp { display: none; }
  .mobile-product-actions {
    position: fixed;
    z-index: 40;
    left: 50%;
    right: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(calc(100% - 20px), 700px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(210, 218, 214, .9);
    border-radius: 8px;
    background: rgba(250, 252, 251, .88);
    box-shadow: 0 10px 30px rgba(21, 23, 21, .16);
    backdrop-filter: blur(18px) saturate(1.25);
    transform: translateX(-50%);
  }
  .mobile-product-actions .button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .site-header, main { width: calc(100% - 20px); }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 16px; }
  .language-nav a { min-width: 36px; padding: 0 5px; }
  .language-nav .cart-link { width: 40px; margin-right: 2px; padding: 0; }
  .cart-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .back-link { min-height: 54px; }
  h1 { font-size: 34px; }
  .model-title.is-long {
    font-size: 24px;
    line-height: 1.08;
    text-wrap: balance;
  }
  .model-title.is-medium {
    font-size: 27px;
    line-height: 1.08;
    text-wrap: balance;
  }
  .product-summary,
  .has-no-image .product-summary { padding: 32px 22px 36px; }
  .actions { display: grid; }
  .button { width: 100%; }
  .product-highlights { margin-top: 26px; }
  .product-highlight {
    min-height: 126px;
    padding: 18px 12px;
  }
  .product-highlight strong { font-size: 14px; line-height: 1.3; }
  .specifications { gap: 24px; padding: 38px 8px 50px; }
  .spec-heading h2 { margin-top: 10px; font-size: 30px; }
  .spec-list div { grid-template-columns: 1fr; gap: 7px; padding: 14px 0; }
  .image-lightbox { width: calc(100vw - 20px); height: calc(100dvh - 20px); padding: 54px 16px 20px; }
  .image-lightbox img { max-height: calc(100dvh - 94px); }
  .related-products { padding-top: 28px; }
  .related-products h2 { font-size: 19px; }
  .related-product-card { padding: 9px; }
  .related-product-image { padding: 10px; }
}
