:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --ink: #172026;
  --muted: #63717d;
  --line: #dde5eb;
  --brand: #006d77;
  --brand-2: #ffb703;
  --accent: #e8553f;
  --whatsapp: #25d366;
  --soft: #e7f5f4;
  --shadow: 0 16px 40px rgba(22, 41, 51, 0.13);
}

body.dark {
  color-scheme: dark;
  --bg: #11151a;
  --surface: #1a2027;
  --ink: #edf4f7;
  --muted: #a8b5bf;
  --line: #303a44;
  --brand: #35c2b8;
  --brand-2: #ffd166;
  --accent: #ff6f61;
  --whatsapp: #25d366;
  --soft: #162d31;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 44px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: white;
}

.search {
  display: grid;
  grid-template-columns: 1fr minmax(72px, auto);
  min-width: 0;
  border: 2px solid var(--brand);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.search input,
.search button {
  min-width: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.search input {
  padding: 12px;
  outline: 0;
}

.search button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: white;
  padding: 0 14px;
  font-weight: 800;
}

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

.icon-button,
.cart-button {
  display: inline-flex;
  gap: 8px;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.cart-button {
  position: relative;
  width: auto;
  font-weight: 800;
}

.cart-count {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: clamp(430px, 64vh, 680px);
  padding: clamp(34px, 7vw, 82px) clamp(16px, 5vw, 70px);
  background: linear-gradient(135deg, #eef8f7 0%, #ffffff 46%, #fff3d1 100%);
  overflow: hidden;
}

body.dark .hero {
  background: linear-gradient(135deg, #102124 0%, #171d24 54%, #312819 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 770px;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 5.2rem);
  line-height: 1.01;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-link,
.hero-actions button,
.checkout-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
}

.hero-actions button {
  background: var(--brand-2);
  color: #1d252b;
}

.btn-icon {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.hero-stage {
  position: relative;
  min-height: 420px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 183, 3, 0.34), transparent 28%),
    linear-gradient(145deg, var(--surface), var(--soft));
  box-shadow: var(--shadow);
}

.hero-watch {
  position: absolute;
  inset: 56px 28% 72px 28%;
  border: 16px solid #20272d;
  border-radius: 44px;
  background: linear-gradient(160deg, #031b24, #0d5860 55%, #71ddd7);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.1), 0 18px 35px rgba(0, 0, 0, 0.22);
}

.hero-watch span {
  position: absolute;
  inset: 32% 18%;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--brand-2), #fff6c0);
}

.hero-band {
  position: absolute;
  left: 42%;
  top: 16px;
  width: 16%;
  height: calc(100% - 32px);
  border-radius: 999px;
  background: #2e3a43;
  z-index: 0;
}

.hero-bud {
  position: absolute;
  width: 86px;
  height: 112px;
  border-radius: 42px 42px 52px 52px;
  background: #f8fbfc;
  box-shadow: var(--shadow);
}

.hero-bud::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -56px;
  width: 28px;
  height: 72px;
  border-radius: 999px;
  background: inherit;
}

.hero-bud.left {
  left: 8%;
  bottom: 86px;
  transform: rotate(-18deg);
}

.hero-bud.right {
  right: 9%;
  top: 78px;
  transform: rotate(15deg);
}

.shop-layout {
  padding: 36px clamp(16px, 5vw, 70px) 64px;
}

.catalog-toolbar,
.drawer-head,
.modal-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.catalog-toolbar h2,
.drawer-head h2,
.modal h2 {
  margin: 0;
}

.catalog-toolbar {
  margin-bottom: 18px;
}

.sort-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.sort-label select,
.checkout-grid input,
.payment-picker {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

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

.product-card {
  display: grid;
  grid-template-rows: 190px auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-visual {
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--soft), #ffffff);
  overflow: hidden;
}

body.dark .product-visual {
  background: linear-gradient(145deg, var(--soft), #222a31);
}

.product-shape {
  width: 52%;
  height: 52%;
  border: 10px solid var(--product-color);
  border-radius: var(--shape-radius);
  background: color-mix(in srgb, var(--product-color) 10%, transparent);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.12);
}

.product-shape.buds {
  width: 84px;
  height: 92px;
  border-width: 0;
  border-radius: 45px;
  background: var(--product-color);
  box-shadow: 72px 8px 0 -6px color-mix(in srgb, var(--product-color) 82%, white), 0 18px 28px rgba(0, 0, 0, 0.14);
}

.product-shape.glasses {
  width: 68%;
  height: 54px;
  border-width: 8px;
  border-radius: 26px;
  background: transparent;
  box-shadow: 84px 0 0 -8px transparent, 0 18px 28px rgba(0, 0, 0, 0.12);
}

.product-shape.band {
  width: 48%;
  height: 72%;
  border-radius: 999px;
}

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
}

.product-info {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.product-info h3 {
  min-height: 2.6em;
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.meta,
.features,
.cart-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

.price-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.price {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 900;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  margin-top: 4px;
}

.add-button,
.detail-button,
.qty-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 800;
}

.detail-button,
.qty-button {
  background: var(--surface);
  color: var(--brand);
}

.detail-button {
  font-size: 0.82rem;
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  justify-content: end;
  background: rgba(4, 10, 14, 0.52);
}

.cart-drawer.open {
  display: flex;
}

.drawer-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(420px, 100%);
  height: 100%;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px 0;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-row h3 {
  margin: 0 0 5px;
  font-size: 0.95rem;
}

.qty-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.qty-button {
  width: 34px;
  min-height: 34px;
}

.remove-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.cart-summary {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
}

.cart-summary .total {
  font-size: 1.2rem;
}

.modal {
  width: min(720px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(4, 10, 14, 0.58);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 22px;
}

.detail-layout .product-visual {
  min-height: 260px;
  border-radius: 8px;
}

.detail-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.detail-copy h2,
.detail-copy p {
  margin: 0;
}

.detail-tabs {
  display: flex;
  gap: 8px;
}

.tab-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.tab-button.active {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand);
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft) 54%, var(--surface));
}

.review-card p {
  color: var(--muted);
  line-height: 1.5;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}

.checkout-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.payment-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  text-align: left;
  font-weight: 800;
}

.payment-icon {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
}

.payment-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.payment-options button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.payment-options .payment-icon {
  grid-row: 1 / span 2;
}

.payment-options small {
  color: var(--muted);
}

.order-message {
  min-height: 24px;
  color: var(--brand);
  font-weight: 800;
}

.floating-whatsapp {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 25;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  max-width: calc(100vw - 28px);
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #062914;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(21, 120, 63, 0.32);
}

.wa-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #128c4a;
  font-size: 0.78rem;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  .hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 340px;
  }

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

@media (max-width: 620px) {
  .topbar {
    gap: 12px;
    padding: 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .icon-button,
  .cart-button {
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .hero {
    padding: 28px 14px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-stage {
    min-height: 280px;
  }

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

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

  .product-card {
    grid-template-rows: 220px auto;
  }

  .floating-whatsapp span:last-child {
    display: none;
  }

  .floating-whatsapp {
    padding: 9px;
  }
}
