:root {
  --bg: #faf7f1;
  --surface: #ffffff;
  --surface-alt: #f4efe6;
  --text: #2b2520;
  --muted: #7a6f63;
  --border: #e8e0d3;
  --primary: #35523f;
  --primary-dark: #283f30;
  --primary-light: #4c6b56;
  --accent: #c98a3d;
  --accent-dark: #a96f2c;
  --danger: #b3403a;
  --whatsapp: #25d366;
  --success: #2f7d4f;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(43, 37, 32, 0.08);
  --shadow-lg: 0 12px 40px rgba(43, 37, 32, 0.14);
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

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

.btn-accent:hover {
  background: var(--accent-dark);
  color: #fff;
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: var(--surface-alt);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--border);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1fb556;
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--text);
  letter-spacing: 0.5px;
}

.brand:hover {
  color: var(--text);
}

.brand .brand-dot {
  color: var(--accent);
}

.brand img {
  height: 36px;
  width: auto;
}

.nav {
  display: none;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
}

.nav a:hover {
  color: var(--primary);
}

.nav a.active {
  color: var(--primary);
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

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

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 20px;
}

.cart-link:hover {
  background: var(--border);
  color: var(--text);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 12px 20px 20px;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}

.mobile-menu a:last-child {
  border-bottom: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 33, 27, 0.45), rgba(23, 33, 27, 0.65)),
    url("/images/hero.svg") center/cover no-repeat;
  background-color: var(--primary-dark);
  color: #fff;
  text-align: center;
}

.hero-inner {
  padding: 90px 20px 96px;
  max-width: 760px;
  margin: 0 auto;
}

.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #e9c27a;
  margin-bottom: 16px;
  font-weight: 600;
}

.hero h1 {
  color: #fff;
  font-size: clamp(40px, 9vw, 72px);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.hero .hero-sub {
  font-family: var(--font-display);
  font-size: clamp(20px, 4.5vw, 30px);
  color: #f3e7cf;
  margin-bottom: 18px;
}

.hero p {
  font-size: 17px;
  color: #efe8db;
  max-width: 560px;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- Sections ---------- */
.section {
  padding: 52px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 32px;
}

.section-head .eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(26px, 5vw, 38px);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--muted);
}

/* ---------- Category cards ---------- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  min-height: 200px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.category-card .cat-img {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,33,27,0.1), rgba(23,33,27,0.65));
  background-size: cover;
  background-position: center;
}

.category-card .cat-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: #fff;
}

.category-card h3 {
  color: #fff;
  font-size: 22px;
  margin: 0 0 4px;
}

.category-card span {
  font-size: 13px;
  color: #f3e7cf;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

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

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-alt);
  overflow: hidden;
}

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

.product-media .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-consult {
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}

.badge-out {
  background: var(--danger);
  color: #fff;
}

.product-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.product-body .cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.product-body h3 {
  font-size: 16px;
  margin: 0;
}

.product-body h3 a {
  color: var(--text);
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.product-price .unit {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
}

.product-price.consult {
  color: var(--accent-dark);
  font-weight: 600;
}

.product-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  width: max-content;
}

.stepper button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}

.stepper button:hover {
  background: var(--surface-alt);
}

.stepper input {
  width: 40px;
  text-align: center;
  border: 0;
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  color: var(--text);
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  padding: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--border);
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-top: 20px;
}

.detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  aspect-ratio: 1 / 1;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-media .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 90px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.gallery img {
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
}

.detail-info h1 {
  font-size: clamp(26px, 5vw, 36px);
}

.detail-cat {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.detail-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin: 12px 0;
}

.detail-price .unit {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.detail-price.consult {
  color: var(--accent-dark);
}

.detail-desc {
  color: var(--text);
  margin: 14px 0 20px;
}

.detail-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success {
  background: #e7f4ec;
  color: var(--success);
  border: 1px solid #c5e4d1;
}

.alert-error {
  background: #fbeceb;
  color: var(--danger);
  border: 1px solid #f2cfcb;
}

/* ---------- Cart / Checkout ---------- */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.cart-item .thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-alt);
}

.cart-item .name {
  font-weight: 600;
}

.cart-item .meta {
  font-size: 13px;
  color: var(--muted);
}

.cart-item .line {
  font-size: 14px;
}

.cart-totals {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}

.cart-totals .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
}

.cart-totals .row.total {
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: 18px;
  margin-top: 8px;
  padding-top: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field input,
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  width: 100%;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--primary-light);
  border-color: var(--primary-light);
}

.field .error {
  font-size: 12px;
  color: var(--danger);
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: #e6e0d5;
  margin-top: 60px;
  padding: 48px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 14px;
}

.footer-col a {
  color: #e6e0d5;
  display: block;
  padding: 4px 0;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col p {
  margin-bottom: 8px;
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 32px;
  padding: 18px 0;
  font-size: 13px;
  color: #b8b0a3;
  text-align: center;
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--whatsapp);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 13px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.16s ease;
}

.whatsapp-float:hover {
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Page (nosotros/contacto) ---------- */
.page-hero {
  background: var(--primary-dark);
  color: #fff;
  text-align: center;
  padding: 52px 20px;
}

.page-hero h1 {
  color: #fff;
}

.prose {
  max-width: 720px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-list .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}

.empty .emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

/* ---------- Filters bar ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
}

.filter-bar a {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.filter-bar a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
    gap: 24px;
    align-items: center;
  }

  .menu-toggle {
    display: none;
  }

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

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .checkout-layout {
    grid-template-columns: 1fr 420px;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 899px) {
  .whatsapp-float span.label {
    display: none;
  }
}
