/* styles.css */

/* RESET MUY BÁSICO */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-bg, #ffffff);
    color: var(--color-text, #222222);
}

/* CONTENEDOR GENERAL */
.container {
    width: min(1200px, 100% - 2rem);
    margin: 0 auto;
}

/* HEADER */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background: linear-gradient(
        to bottom,
        var(--color-primary, #111827) 0%,
        var(--color-secondary, #4b5563) 100%
    );
    backdrop-filter: blur(10px);
    color: #fff;
}

/* ====== Productos (categorías) ====== */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1.25rem;
}
.section-head .section-subtitle{ margin:0; max-width:680px; }

.product-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.product-card{
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 14px 35px rgba(0,0,0,0.08);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(0,0,0,0.12);
}

.product-media{
  position:relative;
  height: 220px;
  background: rgba(0,0,0,0.06);
}
.product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.product-media-placeholder{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(0,0,0,0.55);
  font-weight:700;
  letter-spacing: .04em;
}

.product-body{
  padding: 1.1rem 1.1rem 1.2rem;
}
.product-body h3{
  margin: 0 0 .35rem;
  font-size: 1.15rem;
  color: #111827;
}
.product-body p{
  margin: 0 0 1rem;
  color: rgba(0,0,0,0.62);
  line-height:1.4;
  min-height: 2.6em;
}
/* ===== BOTÓN CATÁLOGO (PRODUCTOS) ===== */
/* Botón catálogo (usa color del tema) */
.product-body .btn,
.btn-catalogo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;

  padding:.75rem 1.7rem;
  border-radius:999px;

  background: var(--color-primary);
  color:var(--color-text);

  font-family:'Montserrat', sans-serif;
  font-weight:800;
  font-size:.85rem;
  letter-spacing:.08em;
  text-transform:uppercase;

  border:none;
  text-decoration:none;
  cursor:pointer;

  box-shadow:0 10px 28px rgba(0,0,0,.25);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.product-body .btn:hover,
.btn-catalogo:hover{
  transform:translateY(-2px);
  filter:brightness(1.08);
  box-shadow:0 18px 45px rgba(0,0,0,.35);
}

.product-body .btn:active,
.btn-catalogo:active{
  transform:translateY(0);
  box-shadow:0 8px 20px rgba(0,0,0,.25);
}

.product-body .btn::after,
.btn-catalogo::after{
  content:"↗";
  font-size:.9rem;
  opacity:.9;
}


/* Responsive */
@media (max-width: 980px){
  .product-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px){
  .section-head{ flex-direction:column; align-items:flex-start; }
  .product-grid{ grid-template-columns: 1fr; }
  .product-media{ height: 200px; }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.logo-mark {
    font-weight: 800;
    letter-spacing: 0.1em;
    font-size: 1.1rem;

color: var(--color-accent);
}

/* NAV */
.main-nav {
    display: flex;
    gap: 1.25rem;
}

.main-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-accent, #ffcc00);
}


.main-nav a:hover {
    color: var(--color-accent, #ffcc00);
}

/* SEARCH */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.1);
}

.search-form input {
    border: none;
    background: transparent;
    color: #fff;
    padding: 0.25rem 0.5rem;
    outline: none;
    font-size: 0.9rem;
}

.search-form input::placeholder {
    color: #ddd;
}

.search-form button {
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
}

/* MOBILE MENU */
.mobile-menu-toggle {
    display: none;
    border: none;
    background: none;
    color: #fff;
    font-size: 1.4rem;
}

/* HERO SLIDER */
.hero-slider {
    position: relative;
    height: 80vh;
    min-height: 480px;
    margin-top: 56px; /* altura aprox del header */
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 4s linear;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* El color/fondo ahora será dinámico por slide desde PHP */
}


.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    z-index: 2;
    margin-top: 120px;
}

.hero-subtitle {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #ddd;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: clamp(2.3rem, 4vw, 3.2rem);
    max-width: 22ch;
    margin-bottom: 1.25rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary, #e6232a);
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;

}

.hero-btn:hover {
    background: var(--color-accent, #ffcc00);
    color: #000;
}

/* CONTROLES CARRUSEL */
.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 2rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-control.prev {
    left: 1.5rem;
}

.hero-control.next {
    right: 1.5rem;
}

/* DOTS */
.hero-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: transparent;
    cursor: pointer;
}

.hero-dot.active {
    background: #fff;
}

/* SECCIONES */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    text-align: center;
    /* color: var(--color-primary);  */
    color: rgba(0,0,0,0.90);
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(0,0,0,0.65);
}

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--color-primary, #e6232a);
}

/* FOOTER */
.main-footer {
    background: #111;
    color: #aaa;
    padding: 1.5rem 0;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
}

/* BOTÓN WHATSAPP */
.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    z-index: 30;
    font-size: 1.4rem;
}

/* RESPONSIVE */
/* RESPONSIVE */
/* RESPONSIVE */
@media (max-width: 900px) {

    /* Para poder posicionar el nav respecto al header */
    .header-inner {
        position: relative;
        gap: 0.5rem;
    }

    /* Ocultamos el buscador en móvil */
    .search-form {
        display: none;
    }

    /* Botón hamburguesa visible en móvil */
    .mobile-menu-toggle {
        display: block;
    }

    /* NAV como dropdown debajo del header */
    .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary, --color-secondary);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    z-index: 50;
}


    .main-nav a {
        font-size: 0.95rem;
        text-transform: uppercase;
        padding: 0.25rem 0;
    }

    /* Cuando el JS agrega .open, se muestra */
    .main-nav.open {
        display: flex;
    }
}



/* TEMAS - por si quieres definir algunos directos en CSS
   (aunque los valores vienen principalmente de PHP con variables) */

body.theme-rojo {
    /* podrías sobreescribir algo específico aquí si quieres */
}

body.theme-morado {
}

body.theme-turquesa {
}



/* ===== Carrusel Servicio Técnico (CORREGIDO) ===== */
.tech-carousel{
  position: relative;
  border-radius: 28px;
  padding: 1.25rem 1.25rem 1rem;
  background: rgba(10,10,10,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}

/* ESTE es el viewport que recorta */
.tech-carousel__viewport{
  overflow: hidden;
  border-radius: 22px;
  position: relative;
  background: rgba(255,255,255,0.06);
}

/* Track se mueve */
.tech-carousel__track{
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform .45s ease;
  will-change: transform;
}

/* Slide ocupa 100% */
.tech-carousel__slide{
  flex: 0 0 100%;
  position: relative;
}

/* Imagen responsive */
.tech-carousel__slide img{
  width: 100%;
  height: clamp(220px, 46vw, 420px);
  object-fit: cover;
  display:block;
}

/* Caption encima */
.tech-carousel__caption{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.65));
  border: 1px solid rgba(255,255,255,0.10);
}

.tech-carousel__caption h3{
  margin: 0 0 4px 0;
  font-family:'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color:#fff;
}

.tech-carousel__caption p{
  margin:0;
  color: rgba(255,255,255,0.85);
  font-family:'Montserrat', sans-serif;
  font-weight: 500;
  line-height:1.35;
  font-size: .95rem;
}

/* Botones prev/next */
.tech-carousel__btn{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index: 3;
  transition: transform .18s ease, background .18s ease, filter .18s ease;
}

.tech-carousel__btn:hover{
  background: rgba(0,0,0,0.55);
  filter: brightness(1.08);
}

.tech-carousel__btn--prev{ left: 14px; }
.tech-carousel__btn--next{ right: 14px; }

/* Dots */
.tech-carousel__dots{
  display:flex;
  justify-content:center;
  gap: 10px;
  margin-top: 12px;
}

.tech-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.18);
  cursor:pointer;
  transition: background .18s ease, width .18s ease;
}

.tech-dot.is-active{
  background: var(--color-accent);
  border-color: rgba(255,255,255,0.35);
  width: 26px;
}

/* Responsive */
@media (max-width: 900px){
  .tech-carousel{
    padding: 1rem;
  }
  .tech-carousel__btn{
    width: 40px;
    height: 40px;
  }
}
