/* =========================================================
   Sobremedidas SAS — hoja de estilos principal
   Paleta inspirada en la identidad real de la marca:
   café/espresso, rojo hilo y vino tinto (del logo).
   ========================================================= */

:root{
  --bg:        #FAF6F0;   /* lienzo / tela cruda */
  --paper:     #FFFFFF;
  --ink:       #2A1D14;   /* café oscuro — texto principal */
  --ink-soft:  #6B5A4A;   /* texto secundario */
  --line:      #E7DCCC;   /* líneas finas, bordes */
  --line-strong: #D8C9B4;
  --accent:    #A8311F;   /* rojo hilo */
  --accent-dark:#7C2417;
  --wine:      #4E1734;   /* vino tinto del logo */
  --wine-soft: #f2e7ed;
  --cream:     #F2ECE1;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --maxw: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

html{ overflow-x: hidden; width: 100%; }
body{
  margin:0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ margin:0; padding:0; list-style:none; }

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

h1,h2,h3,h4{
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1{ font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3{ font-size: 1.3rem; }
p{ margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }
.lede{ font-size: 1.15rem; color: var(--ink-soft); }

.center{ text-align:center; margin-left:auto; margin-right:auto; }

/* -------- botones -------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.5em;
  padding: .85em 1.6em;
  border-radius: 3px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .98rem;
  border: 1.5px solid transparent;
  cursor:pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn-primary{ background: var(--accent); color:#fff; }
.btn-primary:hover{ background: var(--accent-dark); }
.btn-ghost{ background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover{ background: var(--ink); color:#fff; }
.btn-ghost-light{ background: transparent; color:#fff; border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover{ background:#fff; color: var(--ink); }
.btn-block{ width:100%; justify-content:center; }

/* -------- stitch rule: motivo de puntada, referencia directa al oficio de costura -------- */
.stitch{
  border:0;
  height: 1px;
  background-image: linear-gradient(to right, var(--line-strong) 60%, transparent 0%);
  background-position: bottom;
  background-size: 14px 1px;
  background-repeat: repeat-x;
  margin: 0;
}
.stitch-v{
  width:1px;
  background-image: linear-gradient(to bottom, var(--line-strong) 60%, transparent 0%);
  background-size: 1px 14px;
  background-repeat: repeat-y;
}

/* =========================================================
   Barra superior + header
   ========================================================= */
.topbar{
  background: var(--ink);
  color: #E9DFD2;
  font-size: .85rem;
}
.topbar .container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:8px;
  padding-bottom:8px;
  flex-wrap:wrap;
  gap:6px;
}
.topbar a{ color:#E9DFD2; }
.topbar a:hover{ color:#fff; }
.topbar-item{ display:inline-flex; align-items:center; gap:.4em; margin-right:1.4em; }
.topbar-item svg{ width:14px; height:14px; flex:none; }
.topbar-right{ display:flex; align-items:center; }

header.site-header{
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top:0;
  z-index: 50;
}
.nav-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 0;
  gap: 20px;
}
.logo-link{ display:flex; align-items:center; flex:none; }
.logo-link img{ height: 52px; width:auto; }

.main-nav{ display:flex; align-items:center; gap: clamp(14px, 2vw, 26px); }
.main-nav > a{
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav > a:hover, .main-nav > a.active{ border-color: var(--accent); color: var(--accent-dark); }

.nav-cta{ display:flex; align-items:center; gap:14px; flex:none; }

.menu-toggle{
  display:none;
  background:none; border:0; cursor:pointer; padding:6px;
}
.menu-toggle svg{ width:26px; height:26px; }

/* -------- dropdown "Uniformes" (desktop) -------- */
.nav-dropdown{ position:relative; }
.nav-dropdown-toggle{
  display:flex; align-items:center; gap:5px;
  background:none; border:0; cursor:pointer;
  font-family: var(--sans);
  font-size:.95rem; font-weight:600; color: var(--ink);
  padding: 6px 0; border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-dropdown-toggle .chev{ width:15px; height:15px; transition: transform .15s ease; flex:none; }
.nav-dropdown.active .nav-dropdown-toggle,
.nav-dropdown-toggle:hover{ border-color: var(--accent); color: var(--accent-dark); }
.nav-dropdown-panel{
  display:none;
  position:absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(42,29,20,.12);
  min-width: 290px;
  padding: 8px;
  z-index: 60;
}
.nav-dropdown-panel a{
  display:block;
  padding: 11px 14px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  white-space: normal;
  border-left: 2px solid transparent;
}
.nav-dropdown-panel a:hover, .nav-dropdown-panel a.active{
  background: var(--cream); border-color: var(--accent); color: var(--accent-dark);
}
.nav-dropdown.open .nav-dropdown-panel{ display:block; }
.nav-dropdown.open .chev{ transform: rotate(180deg); }

@media (min-width: 901px){
  .nav-dropdown:hover .nav-dropdown-panel{ display:block; }
  .nav-dropdown:hover .chev{ transform: rotate(180deg); }
}

@media (max-width: 900px){
  .main-nav{
    position:absolute; left:0; right:0; top:100%;
    background:var(--paper);
    flex-direction:column;
    align-items:flex-start;
    padding: 10px 24px 20px;
    border-bottom: 1px solid var(--line);
    display:none;
    gap: 4px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .main-nav.open{ display:flex; }
  .main-nav > a{ width:100%; padding: 12px 0; }
  .menu-toggle{ display:inline-flex; }
  .nav-cta .btn-primary span.long{ display:none; }
  .topbar .topbar-item.hide-sm{ display:none; }

  .nav-dropdown{ width:100%; }
  .nav-dropdown-toggle{ width:100%; justify-content:space-between; padding: 12px 0; }
  .nav-dropdown-panel{
    display: none;
    position: static;
    transform:none;
    border: 0;
    box-shadow: none;
    min-width: 0;
    width: 100%;
    padding: 0 0 6px 14px;
    background: transparent;
  }
  .nav-dropdown-panel a{ padding: 10px 0; border-left: 2px solid var(--line); padding-left:12px; }
  .nav-dropdown.open .nav-dropdown-panel{ display:block; }
}

@media (max-width: 480px){
  .logo-link img{ height: 40px; }
  .nav-cta{ gap: 8px; }
  .nav-cta .btn-primary{ padding: .6em 1em; font-size: .82rem; }
  .menu-toggle{ padding: 4px; }
  .menu-toggle svg{ width: 24px; height: 24px; }
  .container{ padding: 0 16px; }
}

@media (max-width: 360px){
  .logo-link img{ height: 34px; }
  .nav-cta{ gap: 6px; }
  .nav-cta .btn-primary{ padding: .55em .8em; font-size: .78rem; }
  .container{ padding: 0 12px; }
}

/* =========================================================
   Hero (home)
   ========================================================= */
.hero{
  background: linear-gradient(180deg, var(--cream) 0%, var(--bg) 100%);
  overflow:hidden;
  position:relative;
}
.hero .container{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  align-items:center;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 40px;
}
.hero-eyebrow{
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent-dark);
  font-size: 1.05rem;
  margin-bottom: .6em;
}
.hero h1{ margin-bottom:.4em; }
.hero .lede{ margin-bottom: 1.6em; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.hero-figure{
  position:relative;
}
.hero-figure .frame{
  aspect-ratio: 4 / 3.1;
  overflow:hidden;
  border-radius: 4px;
  background:#fff;
}
.hero-figure img{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: center 12%;
  border-radius: 4px;
}
.hero-figure::after{
  content:"";
  position:absolute;
  inset: 14px -14px -14px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  z-index:-1;
}
.hero-stats{
  display:flex;
  gap: 30px;
  margin-top: 34px;
  flex-wrap:wrap;
}
.hero-stats div{ min-width: 120px; }
.hero-stats strong{
  display:block;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--wine);
}
.hero-stats span{ font-size: .88rem; color: var(--ink-soft); }

@media (max-width: 860px){
  .hero .container{ grid-template-columns: 1fr; padding-top: 32px; }
  .hero-figure{ order:-1; }
}

/* =========================================================
   Secciones genéricas
   ========================================================= */
section{ padding: 74px 0; }
.section-head{ max-width: 640px; margin: 0 auto 44px; text-align:center; }
.section-head.left{ text-align:left; margin-left:0; }
.tag{
  display:inline-block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--wine);
  margin-bottom: .5em;
  font-size: 1.02rem;
}

.bg-cream{ background: var(--cream); }
.bg-ink{ background: var(--ink); color: #EFE6DA; }
.bg-ink h2, .bg-ink h3{ color:#fff; }
.bg-ink p{ color:#C9BBA9; }

/* -------- tarjetas de línea de producto -------- */
.lines-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.line-card{
  background: var(--paper);
  border: 1px solid var(--line);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition: border-color .18s ease, transform .18s ease;
}
.line-card:hover{ border-color: var(--accent); transform: translateY(-3px); }
.line-card .thumb{ aspect-ratio: 4/3; overflow:hidden; }
.line-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.line-card-body{ padding: 22px 24px 26px; flex:1; display:flex; flex-direction:column; }
.line-card-body h3{ margin-bottom:.35em; }
.line-card-body p{ font-size:.94rem; margin-bottom: 1.2em; }
.line-card-body .goto{
  margin-top:auto;
  font-weight:700;
  color: var(--accent-dark);
  font-size:.92rem;
}

@media (max-width: 900px){
  .lines-grid{ grid-template-columns: 1fr; }
}

/* -------- editorial: quienes somos / historia -------- */
.editorial{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items:start;
}
.editorial h2{ margin-bottom:.6em; }
.timeline{
  margin-top: 26px;
  border-left: 2px dashed var(--line-strong);
  padding-left: 22px;
}
.timeline-item{ margin-bottom: 20px; position:relative; }
.timeline-item::before{
  content:"";
  position:absolute; left:-27px; top:4px;
  width:10px; height:10px; border-radius:50%;
  background: var(--accent);
}
.timeline-item strong{ display:block; font-family:var(--serif); color:var(--wine); font-size:1.05rem; }
.timeline-item span{ font-size:.92rem; color:var(--ink-soft); }

.swatch-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.swatch-grid img{
  width:100%; height: 140px; object-fit:cover;
  border: 1px solid var(--line);
}

@media (max-width: 860px){
  .editorial{ grid-template-columns: 1fr; }
}

/* -------- mision / vision -------- */
.mv-grid{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 44px;
  align-items:flex-start;
}
.mv-grid .stitch-v{ align-self:stretch; }
.mv-block .tag{ display:block; }
@media (max-width: 760px){
  .mv-grid{ grid-template-columns: 1fr; }
  .mv-grid .stitch-v{ display:none; }
}

/* -------- banner ancho (personas) -------- */
.wide-banner{
  padding: 0;
}
.wide-banner img{ width:100%; max-height: 340px; object-fit:cover; }
.wide-banner-cta{
  background: var(--wine);
  color:#fff;
  padding: 46px 0;
  text-align:center;
}
.wide-banner-cta h2{ color:#fff; margin-bottom:.3em; }
.wide-banner-cta p{ color:#E9D9E4; margin: 0 auto 1.4em; }

/* =========================================================
   Páginas de categoría (líneas de producto)
   ========================================================= */
.cat-hero{
  position:relative;
}
.cat-hero img{ width:100%; height: 300px; object-fit:cover; }
.cat-hero-copy{
  background: var(--ink);
  color:#fff;
}
.cat-hero-copy .container{ padding-top: 40px; padding-bottom: 40px; }
.cat-hero-copy h1{ color:#fff; margin-bottom:.3em; }
.cat-hero-copy p{ color:#D9CBB9; max-width: 72ch; margin:0; }
.crumbs{ font-size:.82rem; color:#B9A688; margin-bottom:14px; }
.crumbs a{ color:#B9A688; }
.crumbs a:hover{ color:#fff; }

.subline{
  padding-top: 60px;
}
.subline-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 20px;
  margin-bottom: 26px;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 18px;
}
.subline-head h2{ margin:0; }
.subline-head p{ margin:0; font-size:.94rem; max-width:46ch; }

.gallery{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gallery figure{
  margin:0;
  border:1px solid var(--line);
  overflow:hidden;
  aspect-ratio: 3/4;
  position:relative;
  background:#fff;
}
.gallery figure img{
  width:100%; height:100%; object-fit:cover;
  transition: transform .35s ease;
}
.gallery a{ display:block; width:100%; height:100%; }
.gallery figure:hover img{ transform: scale(1.045); }

@media (max-width: 900px){
  .gallery{ grid-template-columns: repeat(2, 1fr); }
}

.section-divider{ padding: 46px 0 0; }

/* lightbox simple */
.lightbox{
  position:fixed; inset:0; background:rgba(24,15,10,.92);
  display:none; align-items:center; justify-content:center;
  z-index:200; padding: 30px;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width: min(92vw, 900px); max-height: 86vh; border: 3px solid #fff; }
.lightbox-close{
  position:absolute; top: 22px; right: 26px;
  background:none; border:0; color:#fff; font-size: 2rem; cursor:pointer; line-height:1;
}

/* =========================================================
   Formulario de contacto
   ========================================================= */
.contact-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 50px;
  align-items:start;
}
.form-card{
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 34px;
}
.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.field{ margin-bottom: 18px; }
.field label{
  display:block; font-size:.85rem; font-weight:700; margin-bottom:6px; color: var(--ink);
}
.field input, .field select, .field textarea{
  width:100%;
  border: 1.5px solid var(--line-strong);
  background:#fff;
  padding: .75em .9em;
  font-family: var(--sans);
  font-size: .96rem;
  color: var(--ink);
  border-radius: 2px;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none; border-color: var(--accent);
}
.field textarea{ min-height: 130px; resize:vertical; }
.field-hint{ font-size:.78rem; color:var(--ink-soft); margin-top:4px; }
.honey{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

.contact-info-list{ display:flex; flex-direction:column; gap: 22px; }
.contact-info-item{ display:flex; gap:14px; }
.contact-info-item .ic{
  flex:none; width:42px; height:42px; border-radius:50%;
  background: var(--wine-soft); color: var(--wine);
  display:flex; align-items:center; justify-content:center;
}
.contact-info-item .ic svg{ width:20px; height:20px; }
.contact-info-item h4{ margin:0 0 2px; font-size:1rem; font-family:var(--sans); font-weight:700; }
.contact-info-item p{ margin:0; font-size:.92rem; }

.map-wrap{
  margin-top: 26px;
  border: 1px solid var(--line);
  overflow:hidden;
}
.map-wrap iframe{ width:100%; height: 240px; border:0; display:block; }

.form-msg{
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--cream);
  font-size:.92rem;
  margin-bottom: 20px;
}
.form-msg.ok{ border-color:#2f7a4d; }

@media (max-width: 900px){
  .contact-grid{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
}

/* =========================================================
   Footer
   ========================================================= */
footer.site-footer{
  background: var(--ink);
  color: #CBBBA6;
}
.footer-top{
  border-top: 1px dashed #4A392A;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 36px;
  padding: 56px 0 34px;
}
.footer-grid h4{
  color:#fff; font-family:var(--sans); font-size:.92rem;
  letter-spacing:.02em; margin-bottom: 16px;
}
.footer-grid p, .footer-grid a{ font-size:.92rem; color:#CBBBA6; }
.footer-grid a:hover{ color:#fff; }
.footer-about img{ height:44px; margin-bottom:14px; }
.footer-about p{ max-width: 34ch; }
.footer-links li{ margin-bottom:8px; }
.footer-social{ display:flex; gap:10px; margin-top:14px; }
.footer-social a{
  width:36px; height:36px; border:1px solid #4A392A; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.footer-social a:hover{ border-color:#fff; }
.footer-social svg{ width:16px; height:16px; }
.footer-bottom{
  border-top: 1px solid #3A2C20;
  padding: 18px 0;
  font-size:.8rem;
  color:#9C8A76;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;
}

@media (max-width: 860px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px){
  .footer-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   Página de gracias
   ========================================================= */
.thanks{
  min-height: 50vh;
  display:flex; align-items:center; justify-content:center; text-align:center;
  padding: 90px 24px;
}
.thanks .ic{
  width:70px; height:70px; border-radius:50%; background:var(--wine-soft); color:var(--wine);
  display:flex; align-items:center; justify-content:center; margin: 0 auto 22px;
}
.thanks .ic svg{ width:34px; height:34px; }

/* utils */
.mt-0{ margin-top:0; }
.visually-hidden{
  position:absolute !important; width:1px; height:1px; overflow:hidden;
  clip: rect(0,0,0,0); white-space:nowrap;
}

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
