/* =========================================================
   Lavandería La Central — Sistema visual
   Mezcla: Minimalismo 60% · Pixel Art 30% · Glitch Art 10%
   Fuentes: Public Sans (cuerpo) + Bitter (display)
   Paleta: HSL asignada
   ========================================================= */

:root{
  --primary: hsl(311, 68%, 42%);
  --primary-ink: hsl(311, 68%, 28%);
  --secondary: hsl(91, 55%, 36%);
  --secondary-ink: hsl(91, 55%, 22%);
  --accent: hsl(198, 80%, 58%);
  --accent-ink: hsl(198, 80%, 38%);
  --bg: hsl(311, 25%, 97%);
  --bg-alt: hsl(311, 20%, 92%);
  --text: hsl(0, 0%, 10%);
  --muted: hsl(0, 0%, 32%);
  --line: hsl(0, 0%, 15%);
  --hairline: hsl(0, 0%, 80%);
  --white: #ffffff;

  --radius: 2px;
  --shadow-pixel: 3px 3px 0 var(--text);
  --shadow-pixel-sm: 2px 2px 0 var(--text);

  --sidebar-w: 260px;
  --maxw: 1120px;

  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-display: "Bitter", Georgia, "Times New Roman", serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,svg{max-width:100%;display:block}
.pixel-art, img.pixel-art, svg.pixel-art{image-rendering: pixelated; image-rendering: crisp-edges}

a{color: var(--primary-ink); text-decoration-thickness:1px; text-underline-offset:3px}
a:hover{color: var(--secondary-ink)}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

/* ===== Tipografía (Minimalismo + glitch sutil en H1/H2) ===== */
h1,h2,h3,h4{
  font-family: var(--f-display);
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  line-height: 1.15;
}
h1{font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800}
h2{font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 700}
h3{font-size: 1.2rem; font-weight: 700}
p{margin:0 0 1em}
small, .small{font-size:.85rem; color: var(--muted)}

.glitch{
  position: relative;
  display: inline-block;
  color: var(--text);
}
@media (prefers-reduced-motion: no-preference){
  .glitch{
    text-shadow:
       1px 0 0 var(--primary),
      -1px 0 0 var(--accent);
  }
  .glitch::after{
    content: attr(data-text);
    position:absolute; left:0; top:0;
    color: transparent;
    pointer-events:none;
    mix-blend-mode: multiply;
  }
}

/* ===== Layout principal con sidebar ===== */
.app{
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar{
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand{
  display:flex; align-items:center; gap:.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--text);
}
.brand .logo{width:40px; height:40px; flex-shrink:0}
.brand .brand-name{
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.05;
  font-size: 1.05rem;
}
.brand .brand-tag{display:block; font-size:.7rem; color: var(--muted); letter-spacing:.08em; text-transform:uppercase}

.nav{display:flex; flex-direction:column; gap:.1rem}
.nav a{
  display:flex; align-items:center; gap:.55rem;
  padding: .5rem .6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}
.nav a:hover{background: var(--bg); border-color: var(--hairline)}
.nav a.active{
  background: var(--bg);
  border-color: var(--text);
  box-shadow: var(--shadow-pixel-sm);
}
.nav .nav-group{
  margin-top:.6rem;
  font-size:.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 0 .6rem;
}

.sidebar-contact{
  margin-top:auto;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
  font-size: .85rem;
  display:flex; flex-direction:column; gap:.35rem;
}
.sidebar-contact a{text-decoration:none; color: var(--text)}
.sidebar-contact .pill{
  display:inline-block;
  background: var(--secondary);
  color:#fff;
  padding: .15rem .4rem;
  border-radius: var(--radius);
  font-size:.7rem;
  letter-spacing:.08em;
  text-transform: uppercase;
}

/* ===== Main ===== */
.main{min-width:0}
.topbar{
  display:none;
  position: sticky; top:0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: .6rem .9rem;
  align-items:center; justify-content:space-between;
  gap: .5rem;
}
.topbar .brand .logo{width:28px;height:28px}
.topbar .brand .brand-name{font-size:.95rem}
.hamburger{
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: .4rem .55rem;
  font-family: var(--f-display);
  font-weight: 800;
  box-shadow: var(--shadow-pixel-sm);
  cursor: pointer;
}

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ===== Hero (escaparate 3 imágenes + CTA) ===== */
.hero{
  padding: 3rem 1.5rem 2rem;
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
}
.hero .eyebrow{
  font-family: var(--f-body);
  font-size:.75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--secondary-ink);
  font-weight: 600;
  margin-bottom:.6rem;
}
.hero h1{max-width: 20ch}
.hero .lede{max-width: 60ch; color: var(--muted); font-size: 1.1rem}

.showcase{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.showcase figure{
  margin:0;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--white);
  overflow:hidden;
  box-shadow: var(--shadow-pixel);
}
.showcase figure .frame{aspect-ratio: 4/3; background: var(--bg-alt); display:grid; place-items:center; padding:0; overflow:hidden}
.showcase figure .frame svg{width:100%; height:100%}
.showcase figcaption{padding:.75rem .9rem; font-size:.9rem; border-top:1px solid var(--hairline)}
.showcase figcaption strong{display:block; font-family: var(--f-display); font-size:1rem; margin-bottom:.1rem}

.hero-cta{
  margin-top: 1.75rem;
  display:flex; flex-wrap:wrap; gap:.75rem;
}

/* Scanlines (glitch sutil) solo en hero */
@media (prefers-reduced-motion: no-preference){
  .hero::after{
    content:"";
    position:absolute; inset:0;
    pointer-events:none;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0 3px,
      hsla(0,0%,0%,.025) 3px 4px
    );
    mix-blend-mode: multiply;
  }
}

/* ===== Botones ===== */
.btn{
  display:inline-flex; align-items:center; gap:.5rem;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .95rem;
  padding: .7rem 1.1rem;
  border: 1px solid var(--text);
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pixel-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover{transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--text)}
.btn:active{transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--text)}
.btn-primary{background: var(--primary); color:#fff; border-color: var(--text)}
.btn-secondary{background: var(--secondary); color:#fff}
.btn-accent{background: var(--accent); color: var(--text)}
.btn-ghost{background: transparent}

/* ===== Secciones ===== */
.section{padding: 2.5rem 1.5rem; max-width: var(--maxw); margin: 0 auto}
.section + .section{padding-top: 0}
.section-head{margin-bottom: 1.5rem}
.section-head .kicker{
  display:inline-block;
  font-size:.72rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--secondary-ink);
  background: hsl(91, 55%, 92%);
  padding:.2rem .5rem;
  border:1px solid var(--hairline);
  border-radius: var(--radius);
  margin-bottom:.5rem;
  font-weight: 600;
}

.grid-3{display:grid; grid-template-columns: repeat(3, 1fr); gap: 1rem}
.grid-2{display:grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem}

.card{
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-pixel-sm);
}
.card h3{margin-top:0}
.card .price{
  display:inline-block;
  font-family: var(--f-display);
  font-weight: 800;
  background: var(--primary);
  color:#fff;
  padding:.15rem .5rem;
  border-radius: var(--radius);
  margin-right:.4rem;
}
.card .unit{font-size:.85rem; color: var(--muted)}
.card .thumb{
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  margin-bottom:.75rem;
  display:grid; place-items:center;
  overflow:hidden;
}
.card .thumb svg{width:100%; height:100%}

/* Catálogo: toolbar */
.toolbar{
  display:flex; flex-wrap:wrap; gap:.5rem;
  align-items:center;
  padding: .75rem;
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.toolbar input[type="search"], .toolbar select{
  font: inherit;
  padding: .5rem .6rem;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--bg);
}
.toolbar input[type="search"]{flex:1 1 220px; min-width: 180px}
.toolbar .chip{
  font-size:.8rem;
  padding:.35rem .6rem;
  border:1px solid var(--text);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--f-body);
  font-weight: 600;
}
.toolbar .chip.active{background: var(--primary); color:#fff}
.toolbar .results{margin-left:auto; font-size:.85rem; color: var(--muted)}

/* Tablas */
.table{
  width:100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th, .table td{
  padding:.65rem .8rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  font-size:.95rem;
}
.table th{background: var(--bg-alt); font-family: var(--f-display); font-weight: 700}
.table tr:last-child td{border-bottom: none}

/* Formulario */
.form{
  display:grid; gap:.75rem;
  background: var(--white);
  padding: 1.25rem;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pixel-sm);
}
.form label{font-weight: 600; font-size:.9rem}
.form input, .form textarea, .form select{
  font: inherit;
  padding:.6rem;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--bg);
  width:100%;
}
.form .row{display:grid; grid-template-columns: 1fr 1fr; gap:.75rem}
.form .error{color: hsl(0,70%,38%); font-size:.85rem}

/* FAQ (details) */
.faq details{
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: .6rem .9rem;
  margin-bottom: .5rem;
  box-shadow: var(--shadow-pixel-sm);
}
.faq summary{cursor:pointer; font-weight: 600; font-family: var(--f-display); font-size: 1.05rem; outline:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::before{content:"▸ "; color: var(--primary)}
.faq details[open] summary::before{content:"▾ "}

/* Galería lightbox */
.gallery{display:grid; grid-template-columns: repeat(4, 1fr); gap:.75rem}
.gallery button{
  padding:0; background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  cursor: pointer; overflow:hidden;
  aspect-ratio: 1;
  box-shadow: var(--shadow-pixel-sm);
}
.gallery button svg{width:100%; height:100%}
.lightbox{
  position: fixed; inset:0; background: hsla(0,0%,0%,.85);
  display:none; place-items:center; z-index: 1000; padding: 1rem;
}
.lightbox.open{display:grid}
.lightbox .wrap{max-width: 680px; width:100%; background: var(--white); padding:1rem; border-radius: var(--radius); border: 1px solid var(--text); box-shadow: var(--shadow-pixel)}
.lightbox .wrap svg{width:100%; height:auto; max-height:70vh}
.lightbox .close{float:right}

/* Breadcrumbs */
.crumbs{font-size:.85rem; color: var(--muted); margin-bottom: 1rem}
.crumbs a{color: var(--muted)}
.crumbs span{color: var(--text); font-weight:600}

/* Footer */
.site-footer{
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}
.site-footer .wrap{
  max-width: var(--maxw); margin:0 auto;
  display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem;
}
.site-footer h4{font-size:1rem; margin-bottom:.5rem}
.site-footer ul{list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.25rem}
.site-footer a{color: var(--text); text-decoration:none}
.site-footer a:hover{color: var(--primary-ink); text-decoration: underline}
.social{display:flex; gap:.4rem; margin-top:.5rem; flex-wrap:wrap}
.social a{
  width: 36px; height:36px;
  display:inline-grid; place-items:center;
  border:1px solid var(--text); border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-pixel-sm);
}
.social a:hover{background: var(--accent)}
.social svg{width:18px; height:18px}
.footlegal{
  max-width: var(--maxw);
  margin: 1.5rem auto 0;
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
  font-size:.8rem;
  color: var(--muted);
  display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap;
}

/* Flotantes WhatsApp / tel / chat */
.floats{position: fixed; right: 14px; bottom: 14px; z-index: 60; display:flex; flex-direction:column; gap:.5rem; align-items:flex-end}
.floats a, .floats button{
  width: 54px; height: 54px;
  display:inline-grid; place-items:center;
  border-radius: 50%;
  border: 1px solid var(--text);
  box-shadow: var(--shadow-pixel);
  background: var(--white);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.floats .wa{background: #25D366; color:#fff}
.floats .tel{background: var(--accent); color: var(--text)}
.floats .chat{background: var(--primary); color: #fff; font-family: var(--f-display); font-weight: 800}
.floats a:focus-visible, .floats button:focus-visible{outline-offset: 3px}

/* Chatbot panel */
.chatpanel{
  position: fixed; right: 14px; bottom: 80px; z-index: 61;
  width: min(320px, 90vw);
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pixel);
  display:none; flex-direction:column;
  max-height: 70vh;
}
.chatpanel.open{display:flex}
.chatpanel header{
  background: var(--primary); color:#fff;
  padding:.6rem .8rem;
  font-family: var(--f-display); font-weight: 700;
  display:flex; justify-content:space-between; align-items:center;
}
.chatpanel header button{
  background: transparent; border: 1px solid #fff; color:#fff;
  border-radius: var(--radius); padding: 0 .4rem; cursor:pointer;
}
.chatlog{padding:.75rem; overflow-y:auto; display:flex; flex-direction:column; gap:.4rem}
.chatlog .msg{padding:.4rem .55rem; background: var(--bg); border:1px solid var(--hairline); border-radius: var(--radius); font-size:.9rem}
.chatlog .msg.user{align-self:flex-end; background: var(--accent); border-color: var(--text)}
.chatpanel .quick{padding:.5rem; display:flex; flex-wrap:wrap; gap:.3rem; border-top: 1px solid var(--hairline)}
.chatpanel .quick button{
  font-size:.8rem;
  padding:.3rem .5rem;
  border:1px solid var(--text);
  background: var(--white);
  border-radius: var(--radius);
  cursor:pointer;
  font-family: var(--f-body);
}
.chatpanel .wa-link{
  padding:.5rem .75rem;
  background: #25D366; color:#fff;
  text-align:center; text-decoration:none; font-weight:600;
  border-top: 1px solid var(--text);
}

/* Cookie banner */
.cookie{
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 70;
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  display:none; gap:1rem; flex-wrap:wrap; align-items:center; justify-content:space-between;
  box-shadow: var(--shadow-pixel);
  max-width: 760px; margin: 0 auto;
}
.cookie.open{display:flex}
.cookie p{margin:0; font-size:.9rem}
.cookie .actions{display:flex; gap:.5rem}

/* Blog */
.article{
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-pixel-sm);
}
.article .meta{font-size:.85rem; color: var(--muted); margin-bottom:.4rem}
.article .thumb{
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  border:1px solid var(--hairline);
  border-radius: var(--radius);
  margin-bottom:.75rem; overflow:hidden;
}
.article .thumb svg{width:100%; height:100%}

.post{
  background: var(--white);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-pixel-sm);
}
.post h2, .post h3{margin-top: 1.2em}
.post .hero-img{
  aspect-ratio: 21/9;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  margin-bottom: 1rem; overflow:hidden;
}
.post .hero-img svg{width:100%; height:100%}

/* 404 */
.page-404{text-align:center; padding: 4rem 1.5rem}
.page-404 .code{
  font-family: var(--f-display);
  font-size: clamp(5rem, 14vw, 10rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  text-shadow: 3px 0 0 var(--accent), -3px 0 0 var(--secondary);
}

/* Skip link */
.skip{
  position: absolute; left:-9999px; top: 0;
  background: var(--text); color:#fff;
  padding:.5rem .75rem; z-index: 999;
}
.skip:focus{left: .5rem; top:.5rem}

/* ============ Responsive ============ */
@media (max-width: 960px){
  .showcase{grid-template-columns: 1fr}
  .grid-3{grid-template-columns: 1fr 1fr}
  .site-footer .wrap{grid-template-columns: 1fr 1fr}
  .gallery{grid-template-columns: repeat(3, 1fr)}
}
@media (max-width: 760px){
  .app{grid-template-columns: 1fr}
  .sidebar{
    position: fixed; left: -100%; top:0; height: 100vh; width: min(300px, 85vw);
    z-index: 90; transition: left .2s ease; box-shadow: var(--shadow-pixel);
  }
  .sidebar.open{left: 0}
  .topbar{display:flex}
  .form .row{grid-template-columns: 1fr}
  .grid-3, .grid-2{grid-template-columns: 1fr}
  .gallery{grid-template-columns: repeat(2, 1fr)}
  .site-footer .wrap{grid-template-columns: 1fr}
  .container, .section, .hero{padding-left: 1rem; padding-right: 1rem}
  .footlegal{flex-direction:column; align-items:flex-start}
}
@media (max-width: 420px){
  .gallery{grid-template-columns: 1fr 1fr}
  .floats a, .floats button{width:48px; height:48px}
}

@media (prefers-reduced-motion: reduce){
  *{animation: none !important; transition: none !important; scroll-behavior: auto}
  .glitch{text-shadow: none}
  .hero::after{display:none}
}

/* Backdrop para sidebar móvil */
.backdrop{
  position: fixed; inset: 0; background: hsla(0,0%,0%,.5);
  z-index: 80; display:none;
}
.backdrop.open{display:block}

/* Utilidades */
.sr-only{position:absolute; left:-9999px}
.mt-0{margin-top:0}
.mt-1{margin-top:1rem}
.mt-2{margin-top:1.5rem}
.center{text-align:center}
.pill-tag{
  display:inline-block;
  font-size:.72rem; letter-spacing:.08em; text-transform:uppercase;
  background: var(--bg-alt);
  border:1px solid var(--hairline);
  padding:.15rem .5rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 600;
}
