:root {
  --color-primary: #1F5A3D;
  --color-primary-dark: #163f2b;
  --color-accent: #D9A62E;
  --color-maroon: #8C2F39;
  --color-navy: #2C4770;
  --color-bg: #FAF6EE;
  --color-surface: #FFFFFF;
  --color-text: #2B2B2B;
  --color-text-muted: #6b645a;
  --color-border: #E7DFCC;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(43, 43, 43, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1080px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  font-weight: 600;
  color: var(--color-text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

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

.selector select {
  font: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 56px 20px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 24px;
  color: #eef4ee;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-accent {
  background: var(--color-accent);
  color: #2B2200;
}

.btn-accent:hover { background: #c7952a; }

.btn-whatsapp {
  background: #25D366;
  color: #063311;
}

.btn-whatsapp:hover { background: #1fb958; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

/* Sections */
.section {
  padding: 48px 20px;
}

.section h2 {
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 28px;
  color: var(--color-primary-dark);
}

/* Category tabs */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

.category-tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 600;
  font-size: 0.92rem;
}

.category-tab.active,
.category-tab:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease;
}

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

.product-card__img {
  background: var(--color-bg);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card__body h3 {
  margin: 0;
  font-size: 1.05rem;
}

.price-tag {
  font-weight: 800;
  color: var(--color-maroon);
  font-size: 1.05rem;
}

.center-link {
  text-align: center;
  margin-top: 30px;
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 760px) {
  .product-detail { grid-template-columns: 500px 1fr; }
}

.product-detail__info h1 { margin-top: 0; }

/* Product gallery: Amazon-style thumbs beside a fixed-size main image */
.product-gallery {
  display: flex;
  gap: 14px;
}

.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.gallery-main {
  flex: 1;
  aspect-ratio: 1 / 1; /* fallback until JS measures the real photo and adjusts this */
  max-width: 420px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.1s ease-out;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 12, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox__nav:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }

.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: var(--color-bg);
  border-radius: 8px;
  border: 2px solid var(--color-border);
  cursor: pointer;
}

.thumb.active,
.thumb:hover {
  border-color: var(--color-primary);
}

@media (max-width: 700px) {
  .product-gallery { flex-direction: column-reverse; }
  .gallery-thumbs { flex-direction: row; overflow-x: auto; }
  .gallery-main { max-width: 100%; }
}

.points-note {
  display: inline-block;
  background: #fbf1d9;
  color: #6b4c14;
  border: 1px solid #ecd9a8;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 4px 0 18px;
}

.related-products {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.related-products h2 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 24px;
  color: var(--color-primary-dark);
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--color-primary);
  font-weight: 600;
}

/* About / Contact */
.prose {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 24px;
}

.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: #d8e7dc;
  padding: 28px 20px;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 40px;
}

.site-footer a { font-weight: 700; color: #fff; }

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 60px 20px;
}
