:root {
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-strong: #fff0df;
  --text: #271a23;
  --muted: #6f5b64;
  --primary: #ff4f20;
  --primary-dark: #c51a4a;
  --accent: #ffc229;
  --teal: #11a79d;
  --line: rgba(39, 26, 35, .12);
  --shadow: 0 20px 55px rgba(105, 36, 28, .16);
}

.dark {
  --bg: #141114;
  --surface: #201a20;
  --surface-strong: #2a2025;
  --text: #fff7ef;
  --muted: #cdbcc4;
  --line: rgba(255, 255, 255, .12);
  --shadow: 0 20px 55px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: max-content; }
.brand img { border-radius: 50%; box-shadow: 0 8px 20px rgba(197, 26, 74, .22); }
.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); color: var(--muted); font-weight: 700; font-size: .92rem; }
.nav a:hover { color: var(--primary-dark); }
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  padding: clamp(34px, 6vw, 72px) clamp(18px, 5vw, 72px) 44px;
  background:
    linear-gradient(115deg, rgba(255, 194, 41, .34), transparent 34%),
    linear-gradient(155deg, transparent 48%, rgba(17, 167, 157, .16)),
    var(--bg);
}
.hero h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  font-size: clamp(2.45rem, 6vw, 5.65rem);
  line-height: .92;
  letter-spacing: 0;
}
.hero p { max-width: 660px; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.2rem); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero-actions, .footer-links, .table-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
.button-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 14px 30px rgba(197, 26, 74, .28); }
.button-secondary { background: var(--accent); color: #3b2100; }
.button-dark { background: var(--text); color: var(--bg); }
.wide { width: 100%; }

.hero-showcase { display: grid; gap: 16px; }
.promo-card {
  min-height: 430px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.promo-card img { width: min(260px, 70%); }
.promo-card strong { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: .9; color: var(--primary-dark); }
.promo-card span { color: var(--muted); font-weight: 800; }
.promo-ticker {
  min-height: 64px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  color: #fff;
}
.promo-ticker span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 18px;
  opacity: 0;
  transform: translateY(12px);
  transition: .35s ease;
  text-align: center;
  font-weight: 800;
}
.promo-ticker span.is-active { opacity: 1; transform: translateY(0); }

.search-band, .product-section, .video-section, .detail-layout { padding: 42px clamp(18px, 5vw, 72px); }
.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px) auto;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .82rem; font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 13px;
}

.section-heading { max-width: 780px; margin-bottom: 22px; }
.section-heading h2 { margin: 8px 0; font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1; letter-spacing: 0; }
.section-heading p { margin: 0; color: var(--muted); }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.product-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(80, 31, 27, .09);
}
.product-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-strong); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-media img { transform: scale(1.05); }
.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--accent);
  color: #442600;
  font-size: .75rem;
  font-weight: 950;
}
.discount-badge.inline { position: static; display: inline-flex; }
.product-body { display: grid; gap: 10px; padding: 14px; }
.product-body h3 { min-height: 48px; margin: 0; line-height: 1.15; font-size: 1rem; }
.product-body p { min-height: 42px; margin: 0; color: var(--muted); font-size: .9rem; }
.category-pill { width: fit-content; padding: 5px 8px; border-radius: 999px; background: rgba(17, 167, 157, .12); color: var(--teal); font-size: .72rem; font-weight: 900; }
.rating { color: #f5a400; letter-spacing: 0; }
.price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price-row strong { color: var(--primary-dark); font-size: 1.35rem; }
.price-row del { color: var(--muted); }
.empty-state, .video-placeholder {
  grid-column: 1 / -1;
  padding: 28px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.video-card { display: grid; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.video-card video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #000; }

.detail-layout { display: grid; grid-template-columns: minmax(280px, .95fr) minmax(300px, 1.05fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.gallery, .detail-info { display: grid; gap: 16px; }
.gallery-main { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: var(--surface-strong); }
.thumb-row { display: flex; gap: 10px; overflow-x: auto; }
.thumb-row button { width: 76px; height: 76px; flex: 0 0 auto; border: 2px solid var(--line); border-radius: 8px; padding: 0; background: transparent; overflow: hidden; cursor: pointer; }
.thumb-row img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: 0; }
.detail-info p, .rich-description { color: var(--muted); }
.detail-price strong { font-size: 2rem; }

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  padding: 13px 16px;
  border-radius: 999px;
  background: #17b75d;
  color: #fff;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(23, 183, 93, .28);
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 34px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer strong { color: var(--text); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #fff1dc, #ffe2ed); }
.login-card, .admin-form {
  width: min(100%, 460px);
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.login-card img { margin: 0 auto; }
.login-card h1 { margin: 0; text-align: center; }
.alert { padding: 12px; border-radius: 8px; background: #ffe1e6; color: #921337; font-weight: 800; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; background: #f7f4f2; }
.admin-sidebar { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: #211820; color: #fff; }
.admin-sidebar a:not(.button):hover { color: var(--accent); }
.admin-main { padding: clamp(18px, 4vw, 42px); overflow-x: auto; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-top h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats-grid div { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.stats-grid strong { display: block; font-size: 2rem; color: var(--primary-dark); }
.stats-grid span { color: #62545d; font-weight: 800; }
.admin-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.admin-table th, .admin-table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table small { display: block; color: #6f5b64; max-width: 420px; }
.table-actions form { display: inline; }
.table-actions button, .table-actions a { border: 0; background: transparent; color: var(--primary-dark); font-weight: 900; cursor: pointer; padding: 0; }
.admin-form { width: min(100%, 920px); }
.compact-form { margin-bottom: 18px; }
.link-button { border: 0; background: transparent; color: var(--primary-dark); font-weight: 900; cursor: pointer; padding: 0; }
.form-grid, .check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.check-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check-grid label { display: flex; gap: 8px; align-items: center; background: #fff7ef; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.check-grid input { width: auto; }
.media-list { display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }

@media (max-width: 860px) {
  .site-header { align-items: flex-start; }
  .nav { display: none; }
  .hero, .detail-layout { grid-template-columns: 1fr; min-height: auto; }
  .promo-card { min-height: 320px; }
  .search-form, .form-grid, .check-grid, .stats-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: 2.55rem; }
  .product-grid { grid-template-columns: 1fr; }
  .site-header { padding-inline: 14px; }
  .brand strong { font-size: .94rem; }
}
