:root {
  --ink: #12352f;
  --muted: #667a73;
  --line: #dce9e4;
  --paper: #f7fbf8;
  --surface: #ffffff;
  --surface-soft: #edf7f2;
  --green: #2f7d63;
  --green-dark: #185a48;
  --green-light: #dff1e9;
  --shadow: 0 18px 50px rgba(18, 53, 47, 0.10);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  min-height: 100%;
  overflow-y: auto;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(120, 190, 160, 0.20), transparent 34rem),
    linear-gradient(180deg, #fbfefc 0%, var(--paper) 48%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 5vw, 72px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  letter-spacing: 0;
}

.brand img,
.footer-brand img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}

.brand span {
  font-size: 18px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
}

nav a:hover {
  background: var(--green-light);
  color: var(--green-dark);
}

.cart-nav-link {
  gap: 7px;
}

.cart-nav-link.has-items {
  background: var(--green-light);
  color: var(--green-dark);
}

.cart-nav-link strong {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-dark);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

main {
  width: min(1080px, calc(100% - 96px));
  margin: 0 auto;
  padding: 22px 0 60px;
  flex: 1 0 auto;
}

.hero {
  min-height: min(430px, calc(100vh - 86px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: clamp(24px, 5vw, 52px) 0 26px;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 10px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 590px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-mark {
  justify-self: end;
  width: min(100%, 300px);
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.hero-mark img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-section {
  padding-top: clamp(8px, 2vw, 18px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
}

.product-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(18, 53, 47, 0.07);
}

.product-card-gallery {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
  touch-action: pan-y;
}

.product-card-slide {
  display: none;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 180ms ease;
}

.product-card-slide.active {
  display: block;
}

.product-card:hover .product-card-slide.active {
  transform: scale(1.025);
}

.product-card-dots {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.product-card-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.20);
}

.product-card-dots span.active {
  background: #fff;
}

.product-card div {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 24px);
}

.product-card form {
  margin: 0;
}

.product-card h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
}

.product-card p {
  min-height: 58px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.58;
}

.product-card strong,
.product-info strong,
.order-summary strong {
  display: block;
  color: var(--green-dark);
  font-size: clamp(24px, 2.4vw, 30px);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  width: fit-content;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--green-dark);
  font-weight: 900;
  cursor: pointer;
}

.btn.primary {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 12px 28px rgba(24, 90, 72, 0.18);
}

.btn.primary:hover {
  background: var(--green);
  border-color: var(--green);
}

.product-detail,
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
  padding-top: clamp(24px, 5vw, 56px);
}

.gallery,
.order-summary,
.order-form,
.success,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.gallery {
  padding: 12px;
  touch-action: pan-y;
}

.main-image,
.order-summary img {
  width: 100%;
  border-radius: 7px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface-soft);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.thumb {
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.thumb.active {
  border-color: var(--green-dark);
}

.thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.product-info {
  align-self: center;
  padding: clamp(6px, 2vw, 18px) 0;
}

.product-info h1 {
  margin: 8px 0 16px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1;
}

.product-info p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.payment-note {
  margin: 6px 0 18px;
  color: var(--green-dark) !important;
  font-weight: 900;
}

.try-on-trigger {
  margin-bottom: 18px;
}

.add-cart-form {
  display: grid;
  grid-template-columns: 120px auto;
  gap: 14px;
  align-items: end;
}

.modal-open {
  overflow: hidden;
}

.try-on-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 22, 19, 0.72);
  backdrop-filter: blur(10px);
}

.try-on-modal[hidden] {
  display: none;
}

.try-on-panel {
  width: min(100%, 520px);
  display: grid;
  gap: 14px;
}

.try-on-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: #0a1512;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  aspect-ratio: 3 / 4;
}

.try-on-stage video,
.try-on-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a1512;
}

.try-on-stage video {
  transform: scaleX(-1);
}

.try-on-glasses {
  position: absolute;
  left: var(--try-on-left, 50%);
  top: var(--try-on-top, 32%);
  width: var(--try-on-width, min(56%, 320px));
  transform: translate(var(--try-on-shift-x, -50%), var(--try-on-shift-y, 0)) rotate(var(--try-on-angle, 0rad));
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.30));
  pointer-events: none;
  transform-origin: center center;
  transition: transform 80ms linear, width 80ms linear;
}

.try-on-glasses img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.try-on-message {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(5, 17, 14, 0.70);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.try-on-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.try-on-actions .btn {
  width: 100%;
}

.order-summary {
  position: sticky;
  top: 92px;
  padding: 14px;
}

.order-summary h1 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.05;
}

.order-summary p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.summary-line,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary-line span,
.summary-total span {
  color: var(--muted);
}

.summary-total {
  margin-bottom: 12px;
  font-size: 18px;
}

.order-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
  padding: clamp(18px, 4vw, 28px);
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-weight: 900;
}

.field-label > span:first-child {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.readable-form .field-label {
  gap: 8px;
}

.full { grid-column: 1 / -1; }

input,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 125, 99, 0.14);
}

span.field-validation-error,
.validation {
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.success,
.empty {
  max-width: 680px;
  margin: clamp(34px, 8vw, 92px) auto;
  padding: clamp(28px, 6vw, 56px);
  text-align: center;
}

.success h1 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 6vw, 64px);
}

.success p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.success .btn {
  margin: 12px auto 0;
}

.site-footer {
  width: min(1080px, calc(100% - 96px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  flex-shrink: 0;
}

.cart-page {
  padding-top: 22px;
}

.cart-page .section-heading {
  align-items: center;
}

.cart-page .section-heading h1 {
  margin: 4px 0 0;
  font-size: clamp(32px, 5vw, 54px);
}

.cart-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 12px 32px rgba(18, 53, 47, 0.06);
}

.cart-table-head,
.cart-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 140px 210px 140px 112px;
  gap: 18px;
  align-items: center;
}

.cart-table-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.cart-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-product {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.cart-product img {
  width: 96px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 7px;
}

.cart-product h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.cart-unit-price,
.cart-line-total {
  font-weight: 900;
  white-space: nowrap;
}

.cart-quantity-form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
}

.cart-quantity-form input {
  width: 84px;
}

.cart-remove-form {
  margin: 0;
}

.mobile-label {
  display: none;
}

.btn.subtle {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cart-total span {
  color: var(--muted);
  font-weight: 900;
}

.cart-total strong {
  color: var(--green-dark);
  font-size: 26px;
}

.whatsapp-float {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(18, 53, 47, 0.12);
  background: #25d366;
  color: #062d1b;
  box-shadow: 0 18px 38px rgba(37, 211, 102, 0.28);
}

.whatsapp-float span {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #128c4a;
}

.whatsapp-float svg {
  width: 27px;
  height: 27px;
  display: block;
  fill: currentColor;
}

.whatsapp-float:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(37, 211, 102, 0.34);
}

@media (max-width: 860px) {
  .hero,
  .product-detail,
  .order-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-mark {
    justify-self: stretch;
    width: 100%;
  }

  .hero-mark img {
    max-height: 320px;
    object-fit: contain;
    background: #fff;
  }

  .order-summary {
    position: static;
  }

  .catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  nav {
    width: 100%;
  }

  nav a {
    flex: 1;
    justify-content: center;
    background: var(--surface-soft);
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 10px;
  }

  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .brand img,
  .footer-brand img {
    width: 40px;
    height: 40px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .catalog {
    grid-template-columns: 1fr;
  }

  .product-card div {
    padding: 16px;
  }

  .product-card p {
    min-height: 0;
  }

  .btn {
    width: 100%;
  }

  .order-form {
    grid-template-columns: 1fr;
  }

  .add-cart-form {
    grid-template-columns: 1fr;
  }

  .try-on-panel {
    align-self: center;
  }

  .try-on-actions {
    grid-template-columns: 1fr;
  }

  .cart-table-head {
    display: none;
  }

  .cart-table {
    border: 0;
    background: transparent;
    box-shadow: none;
    display: grid;
    gap: 14px;
  }

  .cart-row {
    grid-template-columns: 1fr;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 32px rgba(18, 53, 47, 0.06);
  }

  .cart-product {
    grid-template-columns: 1fr;
  }

  .cart-product img {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .cart-unit-price,
  .cart-line-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .cart-unit-price::before,
  .cart-line-total::before,
  .cart-remove-form::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
  }

  .cart-quantity-form,
  .cart-remove-form,
  .cart-total {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-label {
    display: inline;
  }

  .cart-quantity-form input {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 0;
  }

  .whatsapp-float {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }
}
