:root {
  --brand: #8a5a2b;
  --brand-dark: #6d461f;
  --accent: #c9a15a;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --bg: #faf7f2;
  --card: #ffffff;
  --border: #e8e0d4;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

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

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

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}
.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--brand);
  text-transform: uppercase;
  white-space: nowrap;
}
.header-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 680px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f6f4ef;
  position: relative;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.header-search:focus-within {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(138, 90, 43, .12);
}
.header-search input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 0 16px;
  font-size: 16px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}
.header-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--brand);
  color: #fff;
  width: 56px;
  align-self: stretch;
  cursor: pointer;
}
.header-search button:hover { background: var(--brand-dark); }
.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  overflow: hidden;
  display: none;
  z-index: 100;
}
.search-suggestions.is-open { display: block; }
.search-suggestions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid #f0ede6;
}
.search-suggestions a:last-child { border-bottom: 0; }
.search-suggestions a:hover { background: var(--bg); }
.search-suggestions .ss-name { font-weight: 500; }
.search-suggestions .ss-price { color: var(--brand); font-weight: 600; white-space: nowrap; }
.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.cart-link:hover { color: var(--brand); }
.account-link { color: var(--text); font-weight: 600; white-space: nowrap; }
.account-link:hover { color: var(--brand); }
.cart-link__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}
.header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 8px 0 12px;
  border-top: 1px solid var(--border);
}
.header-nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.header-nav a:hover { color: var(--brand); }

/* Dropdown "Servicios" */
.nav-item { position: relative; }
.nav-item__toggle {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
}
.nav-item__toggle:hover { color: var(--brand); }
.nav-item__toggle .caret { font-size: 10px; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 60;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown ul { list-style: none; margin: 0; padding: 0; }
.nav-dropdown li { position: relative; }
.nav-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--bg); color: var(--brand); }

main { padding: 28px 0 56px; }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 20px; }
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "›";
  color: var(--accent);
  margin: 0 8px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

/* Flash */
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.flash--success { background: #e8f5e9; color: #1e7a2a; border: 1px solid #b7dfb9; }
.flash--error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c0; }

/* Hero (carrusel de destacados) */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fdf8ef, #f3e6d3);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.hero__viewport { position: relative; }
.hero-slide {
  display: none;
  position: relative;
  min-height: 460px;
  overflow: hidden;
}
.hero-slide.is-active { display: block; animation: heroFade .45s ease; }
.hero-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 22, 14, .8) 0%, rgba(30, 22, 14, .45) 45%, rgba(30, 22, 14, .08) 100%);
}
.hero-slide__content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 52px 44px;
  color: #fff;
}
.hero-slide__tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 14px;
}
.hero-slide h2 { margin: 0 0 12px; font-size: 34px; line-height: 1.12; color: #fff; }
.hero-slide__desc { color: rgba(255,255,255,.92); margin: 0 0 16px; }
.hero-slide__price { font-size: 28px; font-weight: 800; color: #fff; margin: 0 0 18px; }
.hero-slide__old { text-decoration: line-through; color: rgba(255,255,255,.72); font-size: 18px; font-weight: 400; margin-left: 10px; }
.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.9);
  color: var(--brand);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.hero__nav:hover { background: #fff; }
.hero__nav--prev { left: 14px; }
.hero__nav--next { right: 14px; }
.hero__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.2);
  cursor: pointer;
  padding: 0;
}
.hero__dot.is-active { background: var(--brand); width: 24px; border-radius: 999px; }
@keyframes heroFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Franja de confianza */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin-bottom: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.trust-bar__item { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text); }
.trust-bar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}

/* Secciones */
.section-title { font-size: 24px; margin: 0 0 20px; }

/* Destacados del mes */
.bestsellers { margin-top: 40px; }
.bestsellers__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.bestsellers__head .section-title { margin-bottom: 4px; }
.bestsellers__sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

/* Hero de página (banner con imagen de fondo) */
.page-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 22, 14, .55);
}
.page-hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.page-hero__content h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 800;
  color: #fff;
}
.page-hero__content h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 500;
  color: rgba(255,255,255,.92);
}
.page-content {
  margin-top: 0;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px;
  background: #fff;
  font-size: 16px;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .page-hero__content h1 { font-size: 28px; }
  .page-hero__content h2 { font-size: 17px; }
}

/* Banner promocional */
.home-banner {
  margin-top: 40px;
  padding: 40px 28px;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(135deg, var(--brand) 0%, #a06a32 55%, var(--accent) 130%);
  color: #fff;
}
.home-banner__content { max-width: 640px; margin: 0 auto; }
.home-banner__tag {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}
.home-banner__title { margin: 0 0 10px; font-size: 28px; line-height: 1.2; }
.home-banner__text { margin: 0 0 20px; color: rgba(255,255,255,.92); font-size: 16px; }

/* Búsqueda */
.search-summary { color: var(--muted); margin: 0 0 20px; }
.search-empty { color: var(--muted); margin: 0 0 32px; }

/* Grid de categorías */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}
.category-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
  transition: box-shadow .15s, transform .15s;
}
.category-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); color: var(--brand); }

/* Grid de productos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card__img { aspect-ratio: 3 / 4; background: #f4f4f4; position: relative; overflow: hidden; display: block; }
.product-card__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__title { margin: 0; font-size: 16px; }
.product-card__title a { color: var(--text); }
.product-card__price { font-weight: 700; color: var(--brand); font-size: 17px; }
.product-card__old { text-decoration: line-through; color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 8px; }

/* Catálogo con barra lateral */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}
.catalog-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.catalog-sidebar h3 { margin: 0 0 12px; font-size: 16px; }
.catalog-sidebar .form-group { margin-bottom: 14px; }
.catalog-main { min-width: 0; }

/* Badges en cards */
.badge {
  position: absolute;
  top: 10px;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.badge--discount { left: 10px; background: #b3261e; }
.badge--featured { right: 10px; background: var(--brand); }
.badge--bestseller { right: 10px; background: #d84315; }

/* Botones */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--outline { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; }
.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { background: #f3ede3; color: var(--brand-dark); }

/* Producto individual */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.product-gallery__main img { border-radius: var(--radius); width: 100%; }
.product-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery__thumbs img {
  width: 72px; height: 72px; object-fit: contain; background: #f4f4f4; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer;
}
.product-gallery__thumbs img.active { border-color: var(--brand); }
.product-detail__price { font-size: 28px; font-weight: 800; color: var(--brand); margin: 8px 0; }
.product-detail__meta { color: var(--muted); margin: 0 0 16px; }

/* Formularios */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}
textarea.form-control { min-height: 120px; }
.form-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.form-check label { font-weight: 500; }

/* Cuenta */
.auth-box {
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

/* Carrito */
.cart-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.cart-table th, .cart-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.cart-table th { background: #f6f1e8; }
.cart-thumb { width: 64px; height: 64px; object-fit: contain; background: #f4f4f4; border-radius: 6px; }
.qty-input { width: 64px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; }

/* Footer */
.site-footer { background: #2b2b2b; color: #d9d9d9; padding: 28px 0; margin-top: 40px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { color: #d9d9d9; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-copy { margin: 0; color: #9a9a9a; font-size: 14px; }

/* Botón flotante de WhatsApp */
.wsp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .15s, background .15s;
}
.wsp-fab:hover { background: #1ebe5b; transform: scale(1.06); }

/* Modal de WhatsApp */
.wsp-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9991;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.wsp-modal[hidden] { display: none; }
.wsp-modal__box {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
.wsp-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.wsp-modal__head h3 { margin: 0; font-size: 18px; }
.wsp-modal__close {
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.wsp-modal__close:hover { color: var(--text); }

@media (max-width: 768px) {
  .header-main { flex-wrap: wrap; gap: 12px; }
  .cart-link { margin-left: auto; }
  .cart-link__label { display: none; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; height: 42px; }
  .header-nav { overflow-x: auto; }
  .product-detail { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .hero-slide { min-height: 380px; }
  .hero-slide::after { background: rgba(30, 22, 14, .62); }
  .hero-slide__content { padding: 28px 20px; max-width: 100%; }
  .hero-slide h2 { font-size: 26px; }
  .trust-bar { gap: 16px; justify-content: flex-start; }
}
