:root {
  color-scheme: dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --ink: #15171a;
  --muted: #6a717b;
  --line: #dfe3e8;
  --accent: #0b6b5c;
  --accent-strong: #064a40;
  --premium: #101114;
  --premium-soft: #f3eee4;
  --premium-accent: #b88935;
  --warn: #a53b22;
  --shadow: 0 12px 32px rgba(22, 28, 36, 0.08);
  --shadow-hover: 0 22px 54px rgba(22, 28, 36, 0.16);
  --page-glow: rgba(255, 255, 255, 0.92);
  --page-start: #fafafa;
  --page-end: #f2f4f7;
  --topbar-bg: rgba(246, 247, 249, 0.94);
  --button-active: #111318;
  --button-active-ink: #fff;
  --accent-button-ink: #ffffff;
  --size-pill-bg: #eef7f5;
  --size-pill-ink: #064a40;
  --size-pill-border: transparent;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050608;
  --surface: #111317;
  --surface-soft: rgba(17, 19, 23, 0.72);
  --ink: #f4f6f8;
  --muted: #9aa3af;
  --line: #252a32;
  --accent: #7df0dc;
  --accent-strong: #b9fff3;
  --premium: #f2d28b;
  --premium-soft: #15120c;
  --premium-accent: #e0b257;
  --warn: #ff8d73;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  --shadow-hover: 0 28px 70px rgba(0, 0, 0, 0.52);
  --page-glow: rgba(125, 240, 220, 0.14);
  --page-start: #080a0f;
  --page-end: #050608;
  --topbar-bg: rgba(5, 6, 8, 0.84);
  --button-active: #f4f6f8;
  --button-active-ink: #050608;
  --accent-button-ink: #021411;
  --size-pill-bg: rgba(125, 240, 220, 0.13);
  --size-pill-ink: #e8fffb;
  --size-pill-border: rgba(125, 240, 220, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, var(--page-glow), transparent 34rem),
    linear-gradient(180deg, var(--page-start) 0%, var(--bg) 42%, var(--page-end) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 220ms ease, color 220ms ease;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 8px;
  background: #050505;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stock-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: 0;
}

main {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 32px) 48px;
}

.buy-steps {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.buy-steps-copy {
  min-width: 0;
}

.buy-steps h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
}

.buy-steps ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.buy-steps li {
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.buy-steps li:hover {
  border-color: color-mix(in srgb, var(--accent), transparent 52%);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.buy-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--button-active);
  color: var(--button-active-ink);
  font-size: 13px;
  font-weight: 900;
}

.buy-steps li strong {
  align-self: end;
  font-size: 14px;
  line-height: 1.25;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 240px) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.toggle span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field input::placeholder {
  color: color-mix(in srgb, var(--muted), transparent 10%);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 82%);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  white-space: nowrap;
}

.tier-filter {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  margin: 2px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: 0 12px 28px rgba(22, 28, 36, 0.06);
  backdrop-filter: blur(16px);
}

.tier-button {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tier-button:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.tier-button.active {
  background: var(--button-active);
  color: var(--button-active-ink);
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.18);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.size-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
}

.size-button,
.ghost-button,
.theme-toggle,
.icon-button,
.copy-button,
.text-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 13px;
  font-weight: 900;
  white-space: nowrap;
}

.theme-toggle-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--button-active);
}

.theme-toggle-dot {
  position: absolute;
  top: 3px;
  left: 17px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--button-active-ink);
  transition: left 180ms ease, background 180ms ease;
}

:root[data-theme="light"] .theme-toggle-dot {
  left: 5px;
}

.size-button {
  min-width: 46px;
  height: 38px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.size-button:hover,
.ghost-button:hover,
.theme-toggle:hover,
.copy-button:hover {
  border-color: color-mix(in srgb, var(--accent), transparent 54%);
  transform: translateY(-1px);
}

.size-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-button-ink);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent), transparent 76%);
}

.ghost-button {
  height: 40px;
  padding: 0 14px;
  font-weight: 700;
  white-space: nowrap;
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 16px;
  color: var(--muted);
}

.summary strong {
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.product {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: cardIn 360ms ease both;
  transition: border-color 260ms ease, box-shadow 260ms ease, transform 260ms ease;
}

:root[data-theme="dark"] .product {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--surface);
}

.product:hover {
  border-color: color-mix(in srgb, var(--accent), transparent 58%);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.premium-product {
  border-color: rgba(184, 137, 53, 0.42);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface), transparent 4%), color-mix(in srgb, var(--surface), transparent 1%)),
    var(--premium-soft);
}

:root[data-theme="dark"] .premium-product {
  background:
    radial-gradient(circle at 80% 0%, rgba(224, 178, 87, 0.1), transparent 14rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.premium-product:hover {
  border-color: rgba(184, 137, 53, 0.72);
}

.product-image-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  cursor: zoom-in;
  isolation: isolate;
}

.product-image-button:focus-visible {
  outline: 3px solid rgba(13, 117, 102, 0.42);
  outline-offset: -3px;
}

.product-image-button img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fff;
  transform: scale(1.001);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), filter 520ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .product:hover .product-image-button img,
  .product-image-button:focus-visible img {
    filter: saturate(1.04) contrast(1.02);
    transform: scale(1.065);
  }
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tier-badge.premium {
  background: var(--button-active);
  color: #d9a94f;
}

.tier-badge.offer {
  background: color-mix(in srgb, var(--accent), transparent 88%);
  color: var(--accent-strong);
}

.brand {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.product h2 {
  margin: 0;
  min-height: 44px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: 0;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 31px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 29px;
  border: 1px solid var(--size-pill-border);
  border-radius: 999px;
  background: var(--size-pill-bg);
  color: var(--size-pill-ink);
  font-size: 13px;
  font-weight: 900;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .pill {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sold-out {
  color: var(--warn);
  font-weight: 900;
}

.copy-button {
  height: 38px;
  color: var(--ink);
  font-weight: 900;
}

:root[data-theme="dark"] .copy-button {
  background: rgba(255, 255, 255, 0.035);
  color: #f6f8fb;
}

:root[data-theme="dark"] .copy-button:hover {
  background: rgba(125, 240, 220, 0.11);
  color: #e8fffb;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.copy-button:disabled {
  border-color: color-mix(in srgb, var(--accent), transparent 60%);
  background: color-mix(in srgb, var(--accent), transparent 88%);
  color: var(--accent-strong);
  cursor: default;
}

:root[data-theme="dark"] .tier-badge.premium {
  background: rgba(244, 246, 248, 0.95);
  color: #9b6b10;
}

:root[data-theme="dark"] .tier-badge.offer {
  background: rgba(125, 240, 220, 0.12);
  color: #d6fff8;
}

.cart-panel {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 20;
  width: min(360px, calc(100vw - 28px));
  max-height: min(420px, calc(100vh - 170px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(22, 28, 36, 0.2);
}

.cart-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.text-button {
  height: 32px;
  padding: 0 10px;
  color: var(--warn);
  font-weight: 800;
}

.cart-items {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
}

.cart-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cart-item strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 21;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: #ffffff;
  color: #128246;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(18, 130, 70, 0.34);
}

.whatsapp-float img {
  width: 48px;
  height: 48px;
}

.whatsapp-float strong {
  position: absolute;
  right: -4px;
  top: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111318;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

.empty {
  margin: 38px 0;
  color: var(--muted);
  text-align: center;
}

.modal {
  width: min(940px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.modal img {
  display: block;
  width: 100%;
}

.photo-modal {
  width: min(1120px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #080a0c;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.photo-modal::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.photo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.photo-modal-head strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-modal img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 78px);
  object-fit: contain;
  background: #0d0f12;
}

.icon-button {
  width: 34px;
  height: 34px;
  font-weight: 900;
}

.icon-button.light {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.icon-button.light:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand-head {
    align-items: flex-start;
  }

  .logo {
    width: 56px;
    height: 56px;
  }

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

  .buy-steps {
    grid-template-columns: 1fr;
  }

  .buy-steps ol {
    grid-template-columns: 1fr;
  }

  .buy-steps li {
    min-height: auto;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .tier-filter {
    width: 100%;
  }

  .tier-button {
    flex: 1;
    padding: 0 10px;
  }

  .field.compact {
    width: 100%;
  }

  .summary {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .cart-panel {
    right: 10px;
    bottom: 82px;
  }

  .whatsapp-float {
    right: 10px;
    bottom: 12px;
  }
}
