:root {
  --bg: #070a0b;
  --surface: #0d1112;
  --surface-2: #131819;
  --surface-3: #182021;
  --text: #f4f7f6;
  --muted: #98a4a3;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --accent: #22c7bf;
  --accent-hover: #38d8cf;
  --accent-soft: rgba(34,199,191,.12);
  --header-bg: rgba(7,10,11,.84);
  --shadow: 0 20px 54px rgba(0,0,0,.26);
  --shadow-soft: 0 12px 32px rgba(0,0,0,.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --container: 1200px;
  --header-h: 66px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

html[data-theme="light"] {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --surface-3: #eef3f2;
  --text: #101516;
  --muted: #657170;
  --border: rgba(10,24,24,.10);
  --border-strong: rgba(10,24,24,.17);
  --accent: #0daea7;
  --accent-hover: #098f8a;
  --accent-soft: rgba(13,174,167,.10);
  --header-bg: rgba(243,246,245,.88);
  --shadow: 0 20px 48px rgba(29,51,50,.10);
  --shadow-soft: 0 12px 28px rgba(29,51,50,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  transition: background-color .28s var(--ease), color .28s var(--ease);
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: 72px 0; }
.section.compact { padding: 52px 0; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-title { margin: 0; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.035em; }
.section-lead { max-width: 620px; margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 650; transition: color .2s var(--ease); }
.text-link:hover { color: var(--accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease), backdrop-filter .25s var(--ease);
}
.site-header.scrolled {
  background: var(--header-bg);
  border-color: var(--border);
  backdrop-filter: blur(16px);
}
.header-inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; justify-self: start; }
.brand img { width: 142px; height: auto; }
.brand .chile-mark { width: 18px; height: 18px; margin-left: 5px; padding-left: 4px; object-fit: contain; }
.logo-light { display: none; }
html[data-theme="light"] .logo-dark { display: none; }
html[data-theme="light"] .logo-light { display: block; }
.desktop-nav { display: flex; align-items: center; gap: 26px; }
.desktop-nav a { color: var(--muted); font-size: 14px; font-weight: 600; transition: color .2s var(--ease); }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.theme-icon { width: 18px; height: 18px; }
.menu-btn { display: none; }
.mobile-menu { display: none; }

.hero { padding: 34px 0 40px; }
.hero-frame {
  min-height: 500px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 78% 20%, rgba(34,199,191,.13), transparent 26%),
    linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
}
.hero-copy { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: center; padding: 54px 24px 66px 52px; }
.hero-copy h1 { max-width: 520px; margin: 0; font-size: clamp(42px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -.05em; }
.hero-product-name { margin: 16px 0 0; color: var(--text); font-size: 17px; font-weight: 700; }
.hero-description { max-width: 500px; margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.btn {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #031110; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--border); background: transparent; color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); }
.hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero-media { position: relative; min-width: 0; min-height: 500px; display: grid; place-items: center; overflow: hidden; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface) 0%, transparent 22%); pointer-events: none; opacity: .75; }
.hero-media img { width: 100%; height: 100%; max-height: 500px; object-fit: cover; transition: opacity .45s var(--ease), transform .65s var(--ease); }
.hero-media img.contain { object-fit: contain; padding: 34px 48px 50px 36px; filter: drop-shadow(0 28px 34px rgba(0,0,0,.36)); }
.hero-frame.is-changing .hero-media img { opacity: 0; transform: scale(.985); }
.hero-frame.is-changing .hero-copy > * { opacity: 0; transform: translateY(7px); }
.hero-copy > * { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.hero-controls { position: absolute; left: 52px; bottom: 26px; z-index: 5; display: flex; align-items: center; gap: 10px; }
.hero-dots { display: flex; gap: 6px; }
.hero-dots button { width: 34px; height: 4px; border: 0; padding: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: width .25s var(--ease), background .25s var(--ease); }
.hero-dots button.active { width: 52px; background: var(--accent); }
.hero-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.category-card {
  position: relative; min-height: 250px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer;
  box-shadow: var(--shadow-soft); transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.category-card img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .32s var(--ease), filter .32s var(--ease); }
.category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(2,6,7,.76) 100%); }
.category-card h3 { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 18px; margin: 0; color: #fff; font-size: 21px; letter-spacing: -.025em; }
.category-card:hover { transform: translateY(-3px); border-color: rgba(34,199,191,.48); }
.category-card:hover img { transform: scale(1.03); filter: saturate(1.04); }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.product-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease); }
.product-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.product-media { position: relative; aspect-ratio: 1 / .84; overflow: hidden; background: var(--surface-2); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.product-media img.contain { object-fit: contain; padding: 18px; }
.product-card:hover .product-media img { transform: scale(1.025); }
.product-card:hover .product-media img.contain { transform: scale(1.015); }
.product-badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(6,10,11,.72); color: #f4f7f6; backdrop-filter: blur(10px); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.product-info { padding: 16px 16px 17px; }
.product-category { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.product-name { margin: 6px 0 0; font-size: 17px; line-height: 1.25; letter-spacing: -.02em; }
.product-summary { min-height: 44px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-footer { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.product-price { font-size: 13px; font-weight: 650; }
.product-arrow { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); transition: color .2s var(--ease), background .2s var(--ease); }
.product-card:hover .product-arrow { background: var(--accent-soft); color: var(--accent); }

.contact-strip { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 30px 34px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.contact-strip h2 { margin: 0; font-size: clamp(25px,3vw,34px); letter-spacing: -.035em; }
.contact-strip p { margin: 7px 0 0; color: var(--muted); }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.site-footer { padding: 26px 0 34px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; }
.footer-brand { display: inline-flex; align-items: center; }
.footer-brand img { width: 118px; }
.footer-brand .chile-mark { width: 16px; height: 16px; margin-left: 5px; padding-left: 4px; object-fit: contain; }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--text); }

.page-hero { padding: 36px 0 26px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.breadcrumb a:hover { color: var(--text); }
.category-hero {
  min-height: 290px; overflow: hidden; display: grid; grid-template-columns: .9fr 1.1fr; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft);
}
.category-hero-copy { padding: 44px; display: flex; flex-direction: column; justify-content: end; }
.category-hero-copy h1 { margin: 0; font-size: clamp(38px,4vw,50px); line-height: 1.02; letter-spacing: -.045em; }
.category-hero-copy p { max-width: 520px; margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.category-hero-media { min-height: 290px; }
.category-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.category-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.category-tools p { margin: 0; color: var(--muted); font-size: 13px; }

.product-detail { padding: 36px 0 72px; }
.product-layout { display: grid; grid-template-columns: 1.18fr .82fr; gap: 34px; align-items: start; }
.product-gallery { display: grid; gap: 12px; }
.product-main-image { aspect-ratio: 1.14 / 1; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.product-main-image > #mainProductMedia { width: 100%; height: 100%; }
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-main-image img.contain { object-fit: contain; padding: 34px; }
.product-main-video { display: block; width: 100%; height: 100%; border: 0; }
.gallery-counter { justify-self: center; padding: 2px 8px; color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1.2; }
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.gallery-thumb { flex: 0 0 78px; width: 78px; height: 66px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); cursor: pointer; padding: 0; }
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-video-thumb { display: grid; width: 100%; height: 100%; place-items: center; color: var(--accent); font-size: 22px; }
.product-panel { position: sticky; top: calc(var(--header-h) + 22px); padding: 4px 0; }
.product-panel h1 { margin: 8px 0 0; font-size: clamp(36px,4vw,48px); line-height: 1.02; letter-spacing: -.045em; }
.product-panel .summary { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.72; }
.price-block { margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.price-block strong { display: block; font-size: 18px; }
.price-block span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.feature-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; color: var(--muted); font-size: 14px; }
.feature-list li::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.product-panel .btn { width: 100%; margin-top: 24px; }
.product-meta-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.contact-page { padding: 36px 0 72px; }
.contact-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 28px; align-items: start; }
.contact-copy h1 { margin: 0; font-size: clamp(38px,4vw,50px); line-height: 1.03; letter-spacing: -.045em; }
.contact-copy p { color: var(--muted); }
.contact-methods { margin-top: 22px; display: grid; gap: 10px; }
.contact-method { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.contact-method small { display: block; color: var(--muted); }
.contact-method strong { display: block; margin-top: 2px; }
.contact-form { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); outline: none; padding: 0 13px; min-height: 44px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field textarea { min-height: 126px; padding-block: 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; }

@media (max-width: 1040px) {
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hero-copy { padding-left: 38px; }
  .hero-controls { left: 38px; }
  .product-layout { gap: 26px; }
}

@media (max-width: 820px) {
  :root { --header-h: 60px; }
  .container { width: min(calc(100% - 30px), var(--container)); }
  .desktop-nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .header-actions { grid-column: 2; }
  .menu-btn { display: grid; }
  .mobile-menu {
    display: block; position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49; padding: 10px 15px 16px; border-bottom: 1px solid var(--border); background: var(--header-bg); backdrop-filter: blur(16px);
    transform: translateY(-130%); opacity: 0; pointer-events: none; transition: transform .25s var(--ease), opacity .25s var(--ease);
  }
  .mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .mobile-menu-inner { width: min(100%, var(--container)); margin: auto; display: grid; }
  .mobile-menu a { padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 650; }
  .hero { padding-top: 20px; }
  .hero-frame { min-height: 0; grid-template-columns: 1fr; }
  .hero-copy { padding: 38px 28px 24px; }
  .hero-copy h1 { font-size: clamp(36px,7vw,44px); }
  .hero-media { min-height: 350px; order: 2; }
  .hero-media img { max-height: 350px; }
  .hero-media img.contain { padding: 8px 48px 46px; }
  .hero-media::after { background: linear-gradient(180deg, var(--surface) 0%, transparent 18%); opacity: .55; }
  .hero-controls { left: 28px; bottom: 18px; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .category-card { min-height: 210px; }
  .category-card h3 { left: 16px; right: 16px; bottom: 14px; font-size: 18px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-strip { grid-template-columns: 1fr; }
  .contact-actions { justify-content: flex-start; }
  .category-hero { grid-template-columns: 1fr; }
  .category-hero-copy { padding: 32px 28px; }
  .category-hero-media { min-height: 220px; }
  .product-layout, .contact-layout { grid-template-columns: 1fr; }
  .product-panel { position: static; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .section { padding: 52px 0; }
  .section.compact { padding: 38px 0; }
  .brand img { width: 128px; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .hero-frame { border-radius: 20px; }
  .hero-copy { padding: 30px 22px 18px; }
  .hero-copy h1 { font-size: clamp(32px,10vw,38px); }
  .hero-description { font-size: 14px; }
  .hero-actions .btn { width: 100%; }
  .hero-media { min-height: 300px; }
  .hero-media img { max-height: 300px; }
  .hero-media img.contain { padding: 10px 28px 44px; }
  .hero-controls { left: 22px; bottom: 16px; }
  .category-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-card { min-height: 190px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .product-info { padding: 13px 12px 14px; }
  .product-name { font-size: 15px; }
  .product-summary { display: none; }
  .product-footer { margin-top: 10px; padding-top: 10px; align-items: end; }
  .product-price { font-size: 11px; }
  .product-arrow { width: 28px; height: 28px; }
  .contact-strip { padding: 24px 22px; }
  .contact-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .category-hero-copy h1, .contact-copy h1 { font-size: 36px; }
  .category-hero-copy { padding: 26px 22px; }
  .product-main-image { aspect-ratio: 1 / 1; }
  .product-main-image img.contain { padding: 20px; }
  .product-panel h1 { font-size: 36px; }
  .contact-form { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 370px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-summary { display: -webkit-box; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
