/* theme.css - inspirado en tokens extraídos de css.txt */

:root{
  /* Typography */
  --font-body: "Montserrat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-heading: "Montserrat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Core colors */
  --bg: #fffdfb;
  --surface: #ffffff;
  --surface-2: #f7f3f3;

  --text: #222222;
  --text-2: #666666;
  --muted: #637381;

  --border: #e6e6e6;
  --border-2: #dadada;

  /* Brand accent */
  --brand: #9c5455;
  --brand-strong: #9c5455;
  --brand-contrast: #ffffff;

  /* States */
  --success: #428445;
  --warning: #e0b252;
  --danger: #EB001B;
  --highlight: #ec0101;

  /* Radius */
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 32px;

  /* Shadows */
  --shadow-sm: 0 3px 10px rgba(0,0,0,.05);
  --shadow-md: 0 10px 22px rgba(0,0,0,.08);

  /* Spacing */
  --container: 1120px;
  --gutter: 16px;
}

/* Base */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a{ color: inherit; text-decoration:none; }
img{ max-width: 100%; display:block; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace; font-size: .95em; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.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;
}

.muted{ color: var(--muted); }
.small{ font-size: .92rem; }
.lead{ font-size: 1.05rem; color: var(--muted); }

/* Header / nav (mobile-first) */
.header{
  position: sticky; top:0; z-index:50;
  background:
    linear-gradient(180deg, rgba(156,84,85,.11), rgba(255,255,255,.92));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(156,84,85,.18);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}
.brand{
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.05;
  display:flex;
  flex-direction:column;
}
.brand .brand-mark{ font-weight: 850; }
.brand .brand-sub{ font-weight: 600; color: var(--muted); font-size: .9rem; }

.nav-toggle{
  display: none; /* visible solo en mobile */
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--r-md);
  border: 1px solid rgba(156,84,85,.22);
  background: rgba(156,84,85,.08);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.nav-toggle span{
  width: 18px; height: 2px;
  background: var(--brand);
  border-radius: 999px;
  opacity: .85;
  display:block;
}
.nav-toggle span + span{ margin-top: 5px; }

.nav-links{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 10px;
  display:none;
  flex-direction:column;
  gap: 2px;
}
.nav-links.is-open{ display:flex; }
.nav-links a{
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--text);
}
.nav-links a:hover{ background: rgba(0,0,0,.035); }

.search{
  display:none;
  gap: 10px;
  align-items:center;
  margin-left:auto;
}
.search .input{
  width: 220px;
  max-width: 45vw;
}

@media (min-width: 860px){
  .nav-toggle{ display:none; }
  .nav-links{
    position: static;
    display:flex !important;
    flex-direction:row;
    align-items:center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .nav-links a{ padding: 10px 10px; }
  .search{ display:flex; }
}

@media (max-width: 859px){
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; flex-direction: column; }
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--surface);
  cursor:pointer;
  font-weight: 650;
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
  white-space: nowrap;
}
.btn:hover{ box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-primary{
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-contrast);
}
.btn-primary:hover{ filter: brightness(.98); }
.btn-pill{ border-radius: var(--r-pill); padding: 10px 16px; }

/* Inputs */
.input{
  width:100%;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  outline:none;
  background: var(--surface);
  color: var(--text);
}
.input:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(156,84,85,.15);
}
textarea.input{ resize: vertical; }

/* Chips */
.chips{ display:flex; gap: 8px; flex-wrap:wrap; margin-top: 14px; }
.chip{
  display:inline-flex;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 650;
}
.chip-active{
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(156,84,85,.08);
}

/* Sections */
.site-main{ padding-bottom: 56px; }
.section{ padding: 28px 0; }
.section-alt{
  background: linear-gradient(180deg, rgba(156,84,85,.06), rgba(255,255,255,0));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head{ margin-bottom: 14px; }
.section-head h2{ margin: 0 0 6px; letter-spacing: -.02em; font-family: var(--font-heading); }

/* Hero */
.hero{ padding: 26px 0 6px; }
.hero-inner{ display:grid; gap: 16px; }
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight: 700;
  color: var(--brand);
  background: rgba(156,84,85,.08);
  border: 1px solid rgba(156,84,85,.18);
  padding: 6px 10px;
  border-radius: 999px;
  width: fit-content;
}
.hero h1{
  margin: 10px 0 8px;
  font-size: 2.05rem;
  letter-spacing: -.03em;
  font-family: var(--font-heading);
}
.hero-actions{ display:flex; gap: 10px; flex-wrap:wrap; margin-top: 14px; }
.hero-actions .btn{ flex: 1 1 auto; }
.hero-badges{ display:flex; gap: 8px; flex-wrap:wrap; margin-top: 14px; }
.badge{
  font-size: .9rem;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: var(--muted);
}
.hero-art{ display:flex; align-items:stretch; }
.hero-card{
  width: 100%;
  background: radial-gradient(1200px 400px at 0% 0%, rgba(156,84,85,.14), rgba(255,255,255,0)), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.hero-card-title{ font-weight: 850; letter-spacing: -.02em; margin-bottom: 8px; font-family: var(--font-heading); }
.hero-card-text{ color: var(--muted); }
.hero-card-foot{ margin-top: 12px; font-size: .95rem; color: rgba(99,115,129,.95); }

@media (min-width: 920px){
  .hero-inner{ grid-template-columns: 1.2fr .8fr; align-items:center; }
  .hero h1{ font-size: 2.4rem; }
}

/* Slider (home hero) */
.hero-slider{ padding: 0 0 10px; }
.slider{
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.slider-track{
  display:flex;
  width: 100%;
  transform: translateX(0%);
  transition: transform .5s ease;
}
.slide{ min-width: 100%; position: relative; }

.slide-media{
  width: 100%;
  height: clamp(320px, 48vw, 520px);
  background: rgba(156,84,85,.06);
}
.slide-media img{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: 50% 20%;
  display:block;
}
.slide-overlay{
  position:absolute;
  inset: 0;
  display:flex;
  align-items:flex-end;
  padding: 16px;
  background:
    radial-gradient(1200px 420px at 0% 0%, rgba(0,0,0,.30), rgba(0,0,0,0)),
    linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.28));
}
.slide-copy{
  max-width: 640px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--r-lg);
  padding: 14px 14px;
  backdrop-filter: blur(10px);
}
.slide-kicker{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 850;
  color: var(--brand);
  letter-spacing: -.01em;
}
.slide-title{
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: -.03em;
  margin-top: 6px;
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 3.8vw, 2.2rem);
  line-height: 1.05;
}
.slide-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.slider-btn{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.25);
  color: #fff;
  box-shadow: var(--shadow-sm);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 30px;
  line-height: 1;
  user-select: none;
}
.slider-btn:hover{ background: rgba(0,0,0,.32); }
.slider-btn:active{ transform: translateY(-50%) scale(.98); }
.slider-prev{ left: 10px; }
.slider-next{ right: 10px; }
.slider-dots{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display:flex;
  justify-content:center;
  gap: 8px;
}
.slider-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(0,0,0,.25);
  cursor: pointer;
  padding: 0;
}
.slider-dot.is-active{
  background: #fff;
  border-color: #fff;
}

@media (min-width: 920px){
  .hero-slider{ padding: 18px 0 10px; }
  .slide-overlay{ padding: 18px; }
  .slide-copy{ padding: 16px 16px; }
}

@media (prefers-reduced-motion: reduce){
  .slider-track{ transition: none; }
}

/* Segment cards */
.segment-grid{ display:grid; gap: 12px; }
.segment-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.segment-card:hover{ border-color: rgba(156,84,85,.22); }
.segment-title{ font-weight: 850; letter-spacing: -.02em; margin-bottom: 6px; font-family: var(--font-heading); }
.segment-desc{ color: var(--muted); }
@media (min-width: 860px){
  .segment-grid{ grid-template-columns: repeat(3, 1fr); }
}

/* Page head */
.page-head{ padding: 16px 0 0; }
.breadcrumbs{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 10px;
}
.page-head h1{
  margin: 0 0 8px;
  letter-spacing: -.02em;
  font-family: var(--font-heading);
}

/* Product grid + card */
.grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px){
  .grid{ grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.card-media{
  background: rgba(156,84,85,.06);
  display:block;
  aspect-ratio: 4/3;
  overflow:hidden;
  display:grid;
  place-items:center;
}
.card-media img{
  width:100%;
  height:100%;
  object-fit: contain;
  object-position: center;
  padding: clamp(18px, 2.4vw, 28px);
  background: #fff;
}
.card-body{ padding: 14px; display:flex; flex-direction:column; gap: 10px; }
.card-title{
  font-family: var(--font-heading);
  font-weight: 800;
  margin: 0;
  letter-spacing: -.02em;
  font-size: 1.02rem;
}
.card-title a:hover{ text-decoration: underline; text-decoration-thickness: 2px; }
.card-sub{
  margin:0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
.card-actions{
  display:flex;
  gap: 10px;
  flex-direction:column;
  margin-top: 2px;
}
.card-actions .btn{ width: 100%; }
@media (min-width: 520px){
  .card-actions{ flex-direction:row; flex-wrap:wrap; }
  .card-actions .btn{ width: auto; }
}

/* Product page */
.product{ display:grid; gap: 16px; }
.product-media{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.product-gallery{
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.product-gallery-track{
  display:flex;
  width: 100%;
  transform: translateX(0%);
  transition: transform .5s ease;
}
.product-gallery-slide{
  min-width: 100%;
  background: rgba(156,84,85,.06);
  display: grid;
  place-items: center;
}
.product-img{
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: rgba(156,84,85,.06);
}
.product-gallery .product-img{
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: clamp(12px, 2.4vw, 28px);
}
.product-gallery-dots{
  position: static;
  padding: 14px 0 14px;
}
.product-gallery .slider-dot{
  border-color: rgba(156,84,85,.35);
  background: rgba(156,84,85,.18);
}
.product-gallery .slider-dot.is-active{
  background: var(--brand);
  border-color: var(--brand);
}
.product-gallery .slider-btn{
  background: rgba(156,84,85,.78);
  border-color: rgba(255,255,255,.35);
}
.product-gallery .slider-btn:hover{
  background: rgba(156,84,85,.92);
}
.product-note{
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .95rem;
}
.product-info{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
}
.product-title{ margin: 6px 0 10px; letter-spacing: -.02em; font-family: var(--font-heading); }
.product-cta{ margin: 14px 0 8px; }
.product-cta .btn{ width: 100%; }
.product-cta-sub{ margin-top: 8px; font-size: .95rem; }
.h3{ font-size: 1.1rem; margin-top: 18px; font-family: var(--font-heading); }
.bullets{ padding-left: 18px; margin: 10px 0 0; color: var(--muted); }
.bullets li{ margin: 8px 0; }
.specs{ margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-md); overflow:hidden; }
.spec-row{
  display:grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px 12px;
  border-top: 1px solid var(--border);
}
.spec-row:first-child{ border-top: 0; }
.spec-k{ font-weight: 750; }
.spec-v{ color: var(--muted); }
@media (min-width: 920px){
  .product{ grid-template-columns: 1fr 1.15fr; align-items:start; }
  .spec-row{ grid-template-columns: .55fr 1fr; align-items:baseline; }
}

.admin-image-grid{
  grid-template-columns: 1fr;
}
.admin-product-gallery{
  margin-top: 10px;
}
.admin-gallery-slider .product-img{
  aspect-ratio: 16/10;
}
@media (min-width: 920px){
  .admin-image-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contact */
.contact-grid{ display:grid; gap: 12px; }
.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.panel-title{ font-weight: 850; letter-spacing: -.02em; margin-bottom: 8px; font-family: var(--font-heading); }
.panel-text{ color: var(--muted); margin: 0 0 14px; }
.panel .btn{ width: 100%; }
.contact-form{ display:flex; flex-direction:column; gap: 10px; }
.contact-form label span{ display:block; font-size: .95rem; color: var(--muted); margin-bottom: 6px; }
@media (min-width: 920px){
  .contact-grid{ grid-template-columns: 1fr 1fr; }
}

/* Empty states */
.empty{
  background: var(--surface);
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: var(--r-lg);
  padding: 22px;
  text-align:center;
}
.empty-title{ font-weight: 850; letter-spacing: -.02em; font-family: var(--font-heading); }
.empty-text{ color: var(--muted); margin-top: 8px; }
.empty-actions{ margin-top: 14px; display:flex; gap: 10px; justify-content:center; flex-wrap:wrap; }

/* CTA */
.cta{
  margin-top: 18px;
  background: radial-gradient(900px 260px at 0% 0%, rgba(156,84,85,.16), rgba(255,255,255,0)), var(--surface);
  border: 1px solid rgba(156,84,85,.18);
  border-radius: var(--r-lg);
  padding: 16px;
  display:flex;
  gap: 14px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  box-shadow: var(--shadow-sm);
}
.cta-title{ font-weight: 850; letter-spacing: -.02em; font-family: var(--font-heading); }
.cta-text{ color: var(--muted); margin-top: 6px; }

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.65);
}
.footer-inner{
  padding: 22px 0;
  display:grid;
  gap: 14px;
}
.footer-title{ font-weight: 850; letter-spacing: -.02em; margin-bottom: 8px; font-family: var(--font-heading); }
.footer-text{ color: var(--muted); }
.footer-link{ display:block; padding: 4px 0; color: var(--muted); }
.footer-link:hover{ color: var(--text); }
.footer-bottom{
  padding: 14px 0 26px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
@media (min-width: 860px){
  .footer-inner{ grid-template-columns: 1.25fr 1fr 1fr; }
}

.result-meta{ margin-bottom: 12px; color: var(--muted); }

/* Mobile tweaks */
@media (max-width: 768px){
  :root{ --gutter: 14px; }
  .card{ border-radius: var(--r-md); }

  /* Header/footer: mantener padding lateral en mobile */
  .header .container.nav{
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  .site-footer .container.footer-inner,
  .site-footer .container.footer-bottom{
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
}

