/* VARIABLES */
:root {
    --color-principal: #DD1C1A; 
    --negro-estudio: #0a0a0a;
    --gris-texto: #666666;
    --gris-claro: #f5f5f5;
    --fuente-titulos: 'Syne', sans-serif;
    --fuente-cuerpo: 'Manrope', sans-serif;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fuente-cuerpo);
    background-color: #ffffff;
    color: var(--negro-estudio);
    padding-top: 110px;
}

/* HEADER */
/************************ HEADER PREMIUM (CATÁLOGO) ************************/
.header-premium {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 95px;
    z-index: 1000;

    background-color: #2f2f32;
    border-bottom: 1px solid rgba(255,255,255,0.06);

    transition: 
        background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Línea roja inferior igual al inicio */
.header-premium::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    transition: height 0.3s ease;
    background: var(--color-principal);
}

/* Layout idéntico al inicio */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 95px;
    transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-premium.scrolled {
    background-color: rgba(0, 0, 0, 0.852);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.header-premium.scrolled .nav-link {
    color: rgba(255,255,255,0.9);
}

.header-premium.scrolled {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Opcional: logo apenas más chico */
.header-premium.scrolled .img-logo-header {
    height: 70px;
    margin-top: 10px;
}

/* Logo centrado verticalmente */
.img-logo-header {
    padding: 2px;
    height: 80px; 
    width: auto;
    display: block;
    transition: all 0.45s ease;
}

/* Contenedor central (Donde va Inicio | Catálogo) */
.nav-main {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Ajuste de textos para fondo oscuro */
.back-link {
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    transition: color 0.25s ease;
}

.back-link:hover {
    color: white;
}

.red-separator {
    width: 2px;
    height: 18px;
    background-color: var(--color-principal);
}

.page-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4); /* Color más tenue para el título actual */
}

/* Botón de la derecha idéntico al de Inicio */
.btn-cta-header {
    text-decoration: none;
    font-family: 'Syne', sans-serif;

    font-size: 0.78rem;
    font-weight: 600;

    letter-spacing: 1.5px;
    text-transform: uppercase;

    color: white;

    display: flex;
    align-items: center;
    gap: 6px;

    position: relative;
}

/* Subrayado elegante */
/* Subrayado elegante: Se queda igual siempre */
.btn-cta-header::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;

    width: 100%;
    height: 1px;

    background: var(--color-principal);

    transform: scaleX(0.6);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* El hover sigue funcionando igual, sin importar el scroll */
.btn-cta-header:hover::after {
    transform: scaleX(1);
}

/* Flecha: También se queda igual */
.btn-cta-header:hover .arrow {
    transform: translate(3px, -3px);
}

/* Flecha sutil */
.arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

/* --- ESTADO SCROLLED (Cópialo igual) --- */
.header-premium.scrolled {
    background-color: rgba(0, 0, 0, 0.852);
    height: 90px;
}

.header-premium.scrolled .img-logo-header {
    height: 70px; /* Aquí se centra solo por el flex align-items center */
}

.header-premium.scrolled .header-container {
    height: 85px;
}

.header-premium.scrolled::after {
    height: 2px;
}

/* LAYOUT */
main {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height:100vh;
    padding: 50px;
    gap: 60px;
}

/* SIDEBAR */
.sidebar {
    max-height: 90vh;
}

.sidebar-inner {
    position: sticky;
    max-height: 80%;
    overflow: auto;
}

.sidebar-label {
    font-family: var(--fuente-titulos);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #cccccc;
    margin-bottom: 25px;
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 50%;
}

.cat-btn {
    background: none;
    border: none;
    text-align: left;
    font-family: var(--fuente-titulos);
    font-size: 1.03rem;
    font-weight: 700;
    color: #bbbbbb;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.cat-btn:hover, 
.cat-btn.active {
    color: var(--negro-estudio);
}

.cat-btn.active {
    border-left: 3px solid var(--color-principal);
    padding-left: 15px;
}

/* GRID DE PRODUCTOS */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 50px 30px;
    height: 85%;
    overflow: auto;
    scrollbar-width: none;
}

.card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s ease;
}

.img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--gris-claro);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover img {
    transform: scale(1.08);
}

.card h3 {
    font-family: var(--fuente-titulos);
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--negro-estudio);
}

/* --- SOLUCIÓN PARA TRUNCAR TEXTO EN MEB --- */
.card p {
    font-size: 0.85rem;
    color: var(--gris-texto);
    line-height: 1.4;
    margin-top: 10px;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* 👈 el que realmente funciona */
    line-clamp: 2;         /* 👈 para compatibilidad futura */
    -webkit-box-orient: vertical;
    overflow: hidden;

    /* opcional: mejora el "..." */
    text-overflow: ellipsis;

    min-height: 2.8em;
}

/****************** FOOTER ******************/
.footer-meb {
    background-color: #0a0a0a; /* Negro profundo */
    color: #fff;
    padding: 10px 10px 10px;
}

.footer-superior {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 40px; /* Reducimos el espacio entre columnas */
    padding-bottom: 30px; /* Reducimos de 80px a 40px */
    grid-template-columns: 2fr 1fr 1fr;
    align-items: flex-start;
}

/* Agregamos este bloque para bajar los textos de las columnas de la derecha */
.footer-col.redes, 
.footer-col.creditos {
    padding-top: 30px; /* Ajusta este valor (10px, 15px o 20px) hasta que lo veas perfecto a tu ojo */
}

/* Columna Branding */
.logo-footer {
    height: 60px;        /* Subí de 60px a 110px (ajustalo a tu gusto) */
    width: auto;         /* Mantiene la proporción */
    margin-bottom: 0;
    margin-top: 20px;
    display: block;      /* Asegura que el margen inferior funcione bien */
    transition: transform 0.3s ease;
}

/* 2. Alineación del texto de abajo */
.footer-tagline {
    font-size: 0.85rem;
    color: #888;
    max-width: 250px;    /* Un poco más estrecho para que no se vea desparramado */
    line-height: 1.4;
    margin-left: 0;      /* Asegura que empiece donde empieza el logo */
}

.footer-titulo {
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #555;
    margin-bottom: 12px; /* Reducimos de 25px a 15px */
}

/* Enlaces de Redes */
.footer-social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-social-links a {
    color: #fff;
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-social-links a:hover {
    color: var(--color-principal); /* Rojo MEB */
}

/* Créditos */
.footer-credito {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
}

.footer-credito span {
    color: #fff;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
}

/* Copyright Inferior */
.footer-inferior {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #222;
    padding-top: 15px; /* Reducimos de 40px a 25px */
    display: flex;
    justify-content: center;
}

.footer-inferior p {
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 0.5px;
}

/****************** WHATSAPP FLOTANTE ******************/
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  line-height: 60px;
  z-index: 99999; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/************** ANIMACIONES EXTRA **************/
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--color-principal);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

#cart-count.bounce {
  animation: bounce 0.3s ease;
}

@keyframes bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ==================================================================================
   MOBILE REAL (Hasta 450px)
   ================================================================================== */
@media (max-width: 450px) {

    body {
        padding-top: 105px;
    }

    /* HEADER */
    .header-premium {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 110px;
        padding: 0;
    }

    .header-container {
        flex-direction: column;
        align-items: center;
        justify-content: space-between;

        height: 100px;
    }

    /* LOGO */
    .brand-logo {
        display: flex;
        justify-content: center;
    }

    .img-logo-header {
        height: 60px;
        margin-top: 0;
        width: auto;
    }

    /* BLOQUE CENTRAL */
    .nav-main{
        width:100%;
        display:flex;
        justify-content:center;
        margin-top:-5px;
        padding:0;
    }

    .header-center {
        justify-content: center;
        align-items: center;

        gap: 6px;
    }

    /* TEXTOS */
    .back-link,
    .page-title {
        font-size: 0.85rem;
        letter-spacing: 1.8px;
        line-height: 1.8;
    }

    .red-separator{
        height:12px;
    }

    /* BOTÓN */
    .header-actions {
        display: none;
    }

    /* LAYOUT */
    main {
        display: flex;
        flex-direction: column;

        padding:30px 14px 18px;
        gap:10px;
    }

    /* FILTROS */
    .sidebar-label {
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 0.85rem;
    }

    .categories {
        gap: 10px;
        padding-bottom: 12px;
    }

    .cat-btn {
        padding: 9px 16px;
        font-size: 0.8rem;
    }

    /* PRODUCTOS */
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 20px;
    }

    .card h3 {
        font-size: 0.95rem;
    }

    .card p {
        font-size: 0.85rem;
    }

    .img-wrapper {
        margin-bottom: 8px;
    }

    /* =========================
   HEADER SCROLLED MOBILE
========================= */

.header-premium.scrolled {
    background-color: rgba(0,0,0,.852);
    height: 90px;
}

.header-premium.scrolled .img-logo-header{
    height: 50px;
    margin-top: 0;
}

.header-premium.scrolled .header-container {
    height: 85px;
}

.header-premium.scrolled .header-center {
    padding-top: 0;
}

.header-premium.scrolled .btn-cta-header {
    font-size: 0.64rem;
}

.footer-superior {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra las columnas */
    justify-content: center;
    text-align: center;
    gap: 50px;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra logo, títulos y párrafos internos */
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .footer-social-links {
    display: flex;
    flex-direction: column; /* Las redes una debajo de otra o en fila centrada */
    align-items: center;
    gap: 15px;
  }

  .footer-credito {
    margin: 0 auto;
  }
}

/* ==================================================================================
   RESPONSIVE: PANTALLAS CHICAS (Max 768px)
   ================================================================================== */
/* AJUSTE ESPECÍFICO PARA RANGO INTERMEDIO (TABLETS/PHABLETS) */
@media (min-width: 450px) and (max-width: 768px) {

    body{
        padding-top: 105px;
    }

    /* HEADER */
    .header-premium{
        height: 110px;
        padding:0;
    }

    .header-container{
        height: 100px;
        padding: 0 18px;

        display:flex;
        flex-direction:column;
        justify-content:center;
        align-items:center;

        gap: 10px;
    }

     /* LOGO */
    .brand-logo {
        display: flex;
        justify-content: center;
    }

    .img-logo-header{
        height: 60px;
        margin-top: 0;
        width: auto;
    }

    /* MENÚ */
    .nav-main{
        width:100%;
        display:flex;
        justify-content:center;
        margin-top:-5px;
        padding:0;
    }

    .header-center{
        justify-content: center;
        align-items: center;

        gap: 6px;
        margin-top:-25px;
    }

    .back-link,
    .page-title{
        font-size: .85rem;
        letter-spacing: 1.8px;
    }

    .red-separator{
        height:12px;
    }

    /* OCULTAMOS EL BOTÓN */
    .header-actions{
        display:none;
    }

        /* FILTROS */
    .sidebar-label {
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 0.85rem;
    }

    /* CONTENIDO */
    main {
        display: flex;
        flex-direction: column;
        padding:30px 14px 18px;
        gap:10px;
    }

    .sidebar-inner{
        position:relative;
    }

    .categories{
        flex-direction:row;
        overflow-x:auto;
        gap:10px;
        padding-bottom:12px;
        scrollbar-width:none;
    }

    .categories::-webkit-scrollbar{
        display:none;
    }

    .cat-btn{
        white-space:nowrap;
        padding:10px 18px;
        border-radius:50px;
        font-size:.9rem;
    }

    .cat-btn.active{
        border-left:none;
        padding-left:18px;
    }

    /* PRODUCTOS */
    .product-grid{
        grid-template-columns:repeat(2,1fr);
        gap:40px 20px;
    }

    /* FOOTER */
    .footer-superior{
        grid-template-columns:1fr;
        text-align:center;
        gap:50px;
    }

    .footer-tagline{
        margin:0 auto;
    }

      .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra logo, títulos y párrafos internos */
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .footer-social-links {
    display: flex;
    flex-direction: column; /* Las redes una debajo de otra o en fila centrada */
    align-items: center;
    gap: 15px;
  }

  .footer-credito {
    margin: 0 auto;
  }

/* =========================
   HEADER SCROLLED MOBILE
========================= */

.header-premium.scrolled {
    background-color: rgba(0,0,0,.852);
    height: 90px;
}

.header-premium.scrolled .img-logo-header{
    height: 50px;
    margin-top: 0;
}

.header-premium.scrolled .header-container {
    height: 85px;
}

.header-premium.scrolled .header-center {
    padding-top: 0;
}

.header-premium.scrolled .btn-cta-header {
    font-size: 0.64rem;
}
}

/* ==================================================================================
   RESPONSIVE: PANTALLAS CHICAS (Max 900px)
   ================================================================================== */
   @media (max-width: 900px) {
    main {
        padding: 20px; /* Menos margen lateral */
        gap: 20px;
    }

    .sidebar-inner {
        position: relative;
        top: 0;
        height: auto;
    }

    .categories {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 10px;
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
        scrollbar-width: none; /* Oculta scrollbar en Firefox */
    }

    .categories::-webkit-scrollbar {
        display: none; /* Oculta scrollbar en Chrome/Safari */
    }

    .cat-btn {
        white-space: nowrap;
        background: #f5f5f5;
        padding: 8px 15px;
        border-radius: 50px; /* Estilo pastilla/pill */
        font-size: 0.9rem;
    }

    .cat-btn.active {
        border-left: none; /* Quitamos el borde lateral */
        background-color: var(--color-principal);
        color: white;
        padding-left: 15px; /* Reseteamos el padding */
    }

    .footer-col.redes, 
    .footer-col.creditos {
        padding-top: 0;
    }

    .footer-superior {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
    
    .footer-tagline {
        margin: 0 auto;
    }

    .footer-inferior {
        text-align: center;
    }
}