/* ==========================================================
   Servitec Alogo — identidad visual
   Paleta: tinta verde, naranja obra, papel, turquesa del logo
   ========================================================== */
:root {
  --ink: #10302f;
  --ink-soft: #3d5857;
  --orange: #f15a29;
  --orange-dark: #d84a1b;
  --paper: #f5f4f0;
  --white: #ffffff;
  --teal: #1d7f8c;
  --line: #d9d8d2;
  --radius-pill: 999px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2000;
  background: var(--ink);
  color: var(--white);
  padding: .6rem 1rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Botones ---------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.35rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 0;
  transition: background-color .2s ease, transform .2s ease;
}

.btn-pill--orange {
  background: var(--orange);
  color: var(--white);
}

.btn-pill--orange:hover {
  background: var(--orange-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-pill--lg {
  padding: .95rem 1.8rem;
  font-size: 1.05rem;
}

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 244, 240, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.navbar {
  padding: .7rem 0;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
}

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

.navbar-toggler {
  border: 0;
  font-size: 1.8rem;
  color: var(--ink);
  padding: .1rem .4rem;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 3px solid var(--orange);
}

.nav-link {
  color: var(--ink) !important;
  font-weight: 500;
  padding: .5rem 1rem !important;
}

.nav-link:hover {
  color: var(--orange) !important;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    padding: 1rem 0 1.25rem;
  }

  .navbar-collapse .btn-pill {
    margin-top: .5rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.hero__line {
  display: block;
}

.hero__line+.hero__line {
  margin-top: .08em;
}

/* ---------- PINTURA sin decoraciones ---------- */
.paint-word {
  display: inline;
  color: var(--teal);
  font-weight: 800;
}

.pill-img {
  display: inline-block;
  vertical-align: middle;
  width: 1.9em;
  height: .68em;
  margin: 0 .08em;
  border-radius: var(--radius-pill);
  background-size: cover;
  background-position: center;
  transform: translateY(-.05em);
}

.pill-img--a {
  background-image: url("../assets/images/servicios/servicio-construccion-17.jpg");
}

.pill-img--b {
  background-image: url("../assets/images/servicios/servicio-construccion-18.jpg");
}

.hero__aside {
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

.hero__aside p {
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: 1.25rem;
}

.hero__count {
  display: flex;
  align-items: baseline;
  gap: .75rem;
}

.hero__count strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  color: var(--orange);
  line-height: 1;
}

.hero__count span {
  color: var(--ink-soft);
  max-width: 16ch;
  line-height: 1.3;
}

.hero__photos {
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.hero__photo {
  width: 100%;
  height: clamp(220px, 34vw, 400px);
  object-fit: cover;
  border-radius: 6px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: clamp(1.75rem, 3vw, 2.5rem) 0 0;
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  transition: background-color .2s ease, color .2s ease;
}

.chip i {
  color: var(--ink-soft);
  transition: color .2s ease;
}

.chip:hover {
  background: var(--ink);
  color: var(--white);
}

.chip:hover i {
  color: var(--orange);
}

/* ---------- Encabezados de sección ---------- */
.section-head {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -.015em;
  line-height: 1.08;
  margin: 0 0 .75rem;
  display: inline-block;
  padding-bottom: .55rem;
  border-bottom: 3px solid var(--orange);
  color: var(--ink);
}

.section-title--light {
  color: var(--white);
}

.section-lead {
  color: var(--ink-soft);
  max-width: 52ch;
  margin: .5rem 0 0;
}

/* ---------- Servicios ---------- */
.services {
  background: var(--white);
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.service-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.service-list li {
  border-bottom: 1px solid var(--line);
}

.service {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  padding: 1.15rem 0;
  color: var(--ink);
  cursor: pointer;
}

.service__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.2;
  transition: color .2s ease;
}

.service__desc {
  grid-column: 1;
  color: var(--ink-soft);
  font-size: .95rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .3s ease, margin-top .3s ease;
}

.service .bi {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  color: var(--orange);
  font-size: 1.2rem;
  transition: transform .2s ease;
}

.service.is-active .service__name {
  color: var(--orange);
}

.service.is-active .service__desc {
  max-height: 6em;
  opacity: 1;
  margin-top: .4rem;
}

.service.is-active .bi {
  transform: rotate(45deg);
}

.services__preview {
  margin: 0;
  position: sticky;
  top: 100px;
}

.services__preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  transition: opacity .25s ease;
}

.services__preview img.is-fading {
  opacity: 0;
}

@media (max-width: 991.98px) {
  .services__preview {
    position: static;
  }
}

/* ---------- Lemas ---------- */
.slogans {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.slogans__img {
  width: 100%;
  border-radius: 6px;
}

.slogans .col-md-6:nth-child(2) {
  margin-top: clamp(0rem, 4vw, 3.5rem);
}

/* ---------- Galería ---------- */
.gallery {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 7vw, 6rem);
  overflow-x: clip;
}

.gallery-swiper {
  overflow: visible;
}

.gallery-swiper .swiper-slide {
  width: clamp(200px, 26vw, 300px);
}

.gallery-swiper img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: var(--line);
}

.gallery__controls {
  display: flex;
  gap: .6rem;
  margin-top: 1.5rem;
}

.ctrl {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-size: 1.1rem;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.ctrl:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.ctrl.swiper-button-disabled {
  opacity: .35;
  pointer-events: none;
}

/* ---------- Contacto ---------- */
.contact {
  background: var(--ink);
  color: var(--white);
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.contact__text {
  color: rgba(255, 255, 255, .78);
  max-width: 40ch;
  margin-top: 1rem;
}

.contact__form {
  display: grid;
  gap: 1.25rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
  font-size: .95rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  font: inherit;
}

.field select option {
  color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, .5);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(241, 90, 41, .35);
}

.contact__form .btn-pill {
  justify-self: start;
}

/* ---------- Pie ---------- */
.site-footer {
  background: #0b2322;
  color: rgba(255, 255, 255, .75);
  padding: 1.75rem 0;
  font-size: .92rem;
}

.site-footer .navbar-brand {
  color: var(--white);
  font-size: 1.1rem;
}

.site-footer .navbar-brand:hover {
  color: var(--white);
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 900;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: var(--white);
  font-size: 1.7rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}

.wa-float:hover {
  color: var(--white);
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Materiales ---------- */
.products {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.filter {
  padding: .55rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  font-size: .95rem;
  transition: background-color .2s ease, color .2s ease;
}

.filter:hover {
  background: rgba(16, 48, 47, .08);
}

.filter[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.product {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.product__img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background: var(--line);
}

.product__body {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
}

.product__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.25;
  margin: 0;
}

.product__unit {
  color: var(--ink-soft);
  font-size: .9rem;
  margin: 0;
}

.product__price {
  font-weight: 600;
  font-size: .95rem;
  margin: .35rem 0 .8rem;
  color: var(--ink);
}

.product__add {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--orange);
  background: transparent;
  color: var(--orange-dark);
  font: inherit;
  font-weight: 600;
  font-size: .92rem;
  transition: background-color .2s ease, color .2s ease;
}

.product__add:hover {
  background: var(--orange);
  color: var(--white);
}

.product__add.is-added {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

@media (max-width: 575.98px) {
  .product__body {
    padding: .8rem;
  }

  .product__name {
    font-size: 1rem;
  }

  .product__add {
    font-size: .85rem;
    padding: .55rem .6rem;
  }
}

/* ---------- Botón de pedido en la cabecera ---------- */
.cart-btn {
  position: relative;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-size: 1.2rem;
  transition: background-color .2s ease, color .2s ease;
}

.cart-btn:hover {
  background: var(--ink);
  color: var(--white);
}

.cart-btn__count {
  position: absolute;
  top: -.35rem;
  right: -.35rem;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 .3rem;
  border-radius: var(--radius-pill);
  background: var(--orange);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3rem;
  text-align: center;
}

.cart-btn__count[data-empty="true"] {
  display: none;
}

/* ---------- Panel de pedido ---------- */
.cart-panel {
  background: var(--paper);
  color: var(--ink);
  width: min(420px, 100vw);
}

.cart-panel .offcanvas-title {
  font-family: var(--font-display);
  font-weight: 700;
}

.cart-panel .offcanvas-body {
  display: flex;
  flex-direction: column;
}

.cart-empty {
  color: var(--ink-soft);
}

.cart-list {
  margin: 0;
  padding: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: .8rem;
  align-items: center;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item__name {
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.cart-item__unit {
  color: var(--ink-soft);
  font-size: .85rem;
  margin: 0;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
}

.qty button {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 50%;
}

.qty button:hover {
  background: rgba(16, 48, 47, .1);
}

.qty span {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 600;
}

.cart-foot {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .9rem;
  background: var(--white);
}

.cart-foot .field label {
  color: var(--ink);
}

.cart-foot .field input {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.cart-foot .field input::placeholder {
  color: var(--ink-soft);
  opacity: .7;
}

.cart-foot .field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(241, 90, 41, .25);
}

.btn-pill:disabled {
  opacity: .45;
  pointer-events: none;
}

.cart-clear {
  background: none;
  border: 0;
  color: var(--ink-soft);
  text-decoration: underline;
  font: inherit;
  font-size: .9rem;
  justify-self: center;
}

.cart-clear:hover {
  color: var(--orange-dark);
}

/* ---------- Contactos WhatsApp ---------- */
.contact__numbers { margin-top: 1.25rem; }
.contact__numbers p { margin-bottom: .45rem; }
.contact__numbers a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ==========================================================
   Ajustes responsive: tablet y móvil
   ========================================================== */
html {
  scroll-padding-top: 5.5rem;
  overflow-x: clip;
}

body {
  min-width: 320px;
  overflow-x: clip;
}

.container,
.container-fluid {
  min-width: 0;
}

.row > * {
  min-width: 0;
}

h1, h2, h3, h4, p, a, button, span {
  overflow-wrap: anywhere;
}

.navbar-brand {
  min-width: 0;
  flex-shrink: 1;
}

.navbar-brand span {
  overflow-wrap: normal;
}

.hero__title {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero__line {
  max-width: 100%;
}

.hero__photo {
  display: block;
}

.services__preview img,
.slogans__img,
.product__img,
.gallery-swiper img {
  max-width: 100%;
}

.contact__form,
.field,
.field input,
.field select,
.field textarea {
  min-width: 0;
}

@media (max-width: 991.98px) {
  .navbar > .container {
    flex-wrap: wrap;
  }

  .navbar-brand {
    font-size: clamp(1rem, 3.6vw, 1.2rem);
    gap: .45rem;
  }

  .navbar-brand img {
    width: 38px;
    height: 41px;
    object-fit: contain;
  }

  .navbar-collapse {
    flex-basis: 100%;
    width: 100%;
    order: 3;
  }

  .navbar-collapse .navbar-nav {
    padding-top: .4rem;
  }

  .navbar-collapse .btn-pill {
    display: inline-flex;
    max-width: 100%;
    white-space: normal;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero__aside {
    margin-top: .25rem;
  }

  .services__preview {
    margin-top: 1.25rem;
  }

  .slogans .col-md-6:nth-child(2) {
    margin-top: 0;
  }

  .contact__form .btn-pill {
    justify-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 767.98px) {
  .hero__title {
    font-size: clamp(2rem, 9vw, 3.5rem);
    line-height: 1.06;
    letter-spacing: -.035em;
  }

  .hero__photos {
    margin-top: 1.5rem;
  }

  .hero__photo {
    height: clamp(190px, 58vw, 320px);
  }

  .hero__chips {
    gap: .5rem;
  }

  .chip {
    padding: .6rem .9rem;
    font-size: .9rem;
  }

  .section-head {
    margin-bottom: 1.75rem;
  }

  .section-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .service {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: .65rem;
    padding: 1rem 0;
  }

  .service__desc {
    max-width: 100%;
  }

  .gallery-swiper .swiper-slide {
    width: min(76vw, 280px);
  }

  .gallery__controls {
    margin-top: 1rem;
  }

  .filters {
    gap: .45rem;
  }

  .filter {
    padding: .5rem .85rem;
    font-size: .9rem;
  }

  .cart-panel {
    width: min(100vw, 420px);
  }

  .cart-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .65rem;
  }

  .cart-item img {
    width: 48px;
    height: 48px;
  }

  .cart-item .qty {
    grid-column: 2;
    justify-self: start;
  }

  .contact__numbers a {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 575.98px) {
  .navbar {
    padding: .55rem 0;
  }

  .navbar-brand {
    font-size: .98rem;
    gap: .35rem;
  }

  .navbar-brand img {
    width: 32px;
    height: 35px;
  }

  .navbar-toggler {
    font-size: 1.55rem;
    margin-left: .25rem !important;
    padding: .1rem .25rem;
  }

  .cart-btn {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1.05rem;
  }

  .hero {
    padding: 2rem 0 2.5rem;
  }

  .hero__title {
    font-size: clamp(1.8rem, 8.6vw, 2.8rem);
  }

  .hero__count strong {
    font-size: 2.6rem;
  }

  .hero__chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chip {
    justify-content: center;
    text-align: center;
    min-width: 0;
    padding: .6rem .5rem;
    font-size: .82rem;
  }

  .services,
  .products,
  .contact {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  .section-title {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .service__name {
    font-size: 1.08rem;
  }

  .service__desc {
    font-size: .9rem;
    max-height: none;
  }

  .service.is-active .service__desc {
    max-height: 14rem;
  }

  .gallery-swiper .swiper-slide {
    width: 78vw;
  }

  .product__body {
    padding: .7rem;
  }

  .product__name {
    font-size: .95rem;
  }

  .product__unit,
  .product__price {
    font-size: .84rem;
  }

  .product__add {
    width: 100%;
    font-size: .82rem;
    padding: .55rem .4rem;
  }

  .wa-float {
    right: .75rem;
    bottom: max(.75rem, env(safe-area-inset-bottom));
    width: 3rem;
    height: 3rem;
    font-size: 1.45rem;
  }

  .site-footer .row {
    row-gap: 1rem;
  }

  .contact__form {
    gap: 1rem;
  }

  .btn-pill--lg {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .navbar-brand span {
    max-width: 112px;
    line-height: 1.05;
  }

  .navbar-brand img {
    width: 29px;
    height: 32px;
  }

  .hero__title {
    font-size: 1.75rem;
  }

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

  .product__body {
    padding: .55rem;
  }

  .cart-item__name {
    font-size: .9rem;
  }
}
