/* ==========================================
   JYH COLECCIONES - Estilos principales
   Paleta: Blanco / Rojo / Negro
========================================== */
:root {
    --rojo: #d81324;
    --rojo-oscuro: #a30d1b;
    --negro: #111111;
    --negro-suave: #1c1c1c;
    --blanco: #ffffff;
    --gris-claro: #f5f5f5;
    --gris-medio: #e2e2e2;
    --gris-texto: #555555;
    --sombra: 0 4px 18px rgba(0,0,0,.08);
    --radio: 14px;
    --nav-inferior-alto: 64px;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    touch-action: pan-x pan-y;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--blanco);
    color: var(--negro);
    padding-bottom: calc(var(--nav-inferior-alto) + 10px);
    -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
.contenedor { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: var(--blanco);
    border-bottom: 3px solid var(--rojo);
    box-shadow: var(--sombra);
}
.site-header .contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo-header img {
    max-height: 50px;
    width: auto;
}
.logo-header-texto {
    font-weight: 800;
    font-size: 22px;
    color: var(--negro);
    letter-spacing: .5px;
}
.logo-header-texto span { color: var(--rojo); }

.header-acciones { display: flex; align-items: center; gap: 16px; }
.icono-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gris-claro);
    border: none;
    position: relative;
    transition: background .2s;
}
.icono-btn:hover { background: var(--gris-medio); }
.icono-btn svg { width: 22px; height: 22px; stroke: var(--negro); }
.badge-carrito {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--rojo);
    color: var(--blanco);
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ===== NAV INFERIOR TIPO APP ===== */
.nav-inferior {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-inferior-alto);
    background: var(--negro);
    display: flex;
    z-index: 900;
    box-shadow: 0 -3px 14px rgba(0,0,0,.25);
}
.nav-inferior a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #b7b7b7;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: color .2s;
}
.nav-inferior a svg {
    width: 22px;
    height: 22px;
    stroke: #b7b7b7;
    fill: none;
    transition: stroke .2s;
}
.nav-inferior a.activo,
.nav-inferior a:hover { color: var(--rojo); }
.nav-inferior a.activo svg,
.nav-inferior a:hover svg { stroke: var(--rojo); }

/* ===== SLIDER PRINCIPAL (sin flechas, sin relleno, imagen completa) ===== */
.slider-hero {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: var(--negro);
}
.slider-track {
    display: flex;
    transition: transform .6s ease-in-out;
}
.slider-slide {
    flex-shrink: 0;
    width: 100%;
}
.slider-slide img {
    width: 100%;
    height: auto;
    display: block;
}
.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.slider-dots button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.55);
    padding: 0;
}
.slider-dots button.activo { background: var(--rojo); }

/* ===== SECCIONES ===== */
.seccion { padding: 46px 0; }
.seccion-titulo {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--negro);
    margin: 0 0 6px;
}
.seccion-subtitulo {
    text-align: center;
    color: var(--gris-texto);
    font-size: 15px;
    margin: 0 0 30px;
}
.seccion-titulo span { color: var(--rojo); }

/* ===== CARRUSEL DE PRODUCTOS DESTACADOS ===== */
.carrusel-wrap { position: relative; }
.carrusel-productos {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.carrusel-productos::-webkit-scrollbar { display: none; }
.carrusel-productos .tarjeta-producto {
    scroll-snap-align: start;
    min-width: 210px;
    max-width: 210px;
}
.carrusel-flecha {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blanco);
    border: 1px solid var(--gris-medio);
    box-shadow: var(--sombra);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.carrusel-flecha svg { width: 20px; height: 20px; stroke: var(--negro); }
.carrusel-flecha.izq { left: -6px; }
.carrusel-flecha.der { right: -6px; }
@media (max-width: 640px) { .carrusel-flecha { display: none; } }

/* ===== TARJETAS DE PRODUCTO ===== */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
}
.tarjeta-producto {
    background: var(--blanco);
    border: 1px solid var(--gris-medio);
    border-radius: var(--radio);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.tarjeta-producto:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
.tarjeta-producto .img-wrap {
    aspect-ratio: 1 / 1;
    background: var(--gris-claro);
    overflow: hidden;
    position: relative;
}
.tarjeta-producto .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.etiqueta-oferta {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--rojo);
    color: var(--blanco);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}
.tarjeta-producto .info { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tarjeta-producto .categoria-mini { font-size: 11px; color: var(--rojo); font-weight: 700; text-transform: uppercase; }
.tarjeta-producto .nombre { font-size: 14.5px; font-weight: 700; color: var(--negro); line-height: 1.3; min-height: 38px; }
.tarjeta-producto .precios { display: flex; align-items: baseline; gap: 8px; }
.precio-actual { font-size: 17px; font-weight: 800; color: var(--negro); }
.precio-tachado { font-size: 13px; color: #999; text-decoration: line-through; }
.btn-agregar {
    margin-top: auto;
    background: var(--rojo);
    color: var(--blanco);
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s;
}
.btn-agregar:hover { background: var(--rojo-oscuro); }
.btn-agregar svg { width: 16px; height: 16px; stroke: var(--blanco); }

/* ===== CATEGORÍAS ===== */
.grid-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
.tarjeta-categoria {
    position: relative;
    border-radius: var(--radio);
    overflow: hidden;
    aspect-ratio: 1/1;
    background: var(--negro);
}
.tarjeta-categoria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .75;
    transition: transform .3s, opacity .3s;
}
.tarjeta-categoria:hover img { transform: scale(1.06); opacity: .55; }
.tarjeta-categoria .nombre-cat {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px 10px;
    color: var(--blanco);
    font-weight: 800;
    font-size: 14px;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
}

/* ===== BOTONES GENERALES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14.5px;
    border: none;
}
.btn-primario { background: var(--rojo); color: var(--blanco); }
.btn-primario:hover { background: var(--rojo-oscuro); }
.btn-oscuro { background: var(--negro); color: var(--blanco); }
.btn-borde { background: transparent; border: 2px solid var(--negro); color: var(--negro); }
.btn svg { width: 18px; height: 18px; }

/* ===== HERO TEXTO (si no hay slider) ===== */
.hero-texto {
    text-align: center;
    padding: 50px 20px;
    background: var(--negro);
    color: var(--blanco);
}
.hero-texto h1 { font-size: 30px; font-weight: 800; margin: 0 0 10px; }
.hero-texto h1 span { color: var(--rojo); }
.hero-texto p { color: #cfcfcf; font-size: 15px; margin: 0 0 20px; }

/* ===== NOSOTROS ===== */
.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}
.nosotros-grid img { border-radius: var(--radio); box-shadow: var(--sombra); }
.nosotros-texto p { color: var(--gris-texto); line-height: 1.7; font-size: 15.5px; }
@media (max-width: 760px) {
    .nosotros-grid { grid-template-columns: 1fr; }
}

/* ===== CONTACTO ===== */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.contacto-tarjeta {
    background: var(--gris-claro);
    border-radius: var(--radio);
    padding: 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.contacto-tarjeta .icono-c {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--rojo); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.contacto-tarjeta .icono-c svg { width: 22px; height: 22px; stroke: var(--blanco); }
.contacto-tarjeta h3 { margin: 0 0 4px; font-size: 16px; }
.contacto-tarjeta p { margin: 0; color: var(--gris-texto); font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) { .contacto-grid { grid-template-columns: 1fr; } }

.form-contacto { display: flex; flex-direction: column; gap: 14px; }
.form-contacto input, .form-contacto textarea {
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid var(--gris-medio);
    font-size: 14.5px;
    font-family: inherit;
}
.form-contacto textarea { min-height: 120px; resize: vertical; }

/* ===== PRODUCTO DETALLE ===== */
.detalle-producto { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.detalle-galeria img { border-radius: var(--radio); width: 100%; aspect-ratio: 1/1; object-fit: cover; background: var(--gris-claro); }
.detalle-info h1 { font-size: 24px; margin: 0 0 6px; }
.detalle-info .precio-actual { font-size: 26px; }
.detalle-info .categoria-mini { display:block; margin-bottom: 6px; }
.detalle-desc { color: var(--gris-texto); line-height: 1.7; margin: 16px 0; }
.selector-cantidad { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.selector-cantidad button {
    width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--gris-medio);
    background: var(--blanco); font-size: 18px; font-weight: 700;
}
.selector-cantidad span { font-weight: 700; font-size: 16px; min-width: 24px; text-align: center; }
@media (max-width: 760px) { .detalle-producto { grid-template-columns: 1fr; } }

/* ===== CARRITO ===== */
.fila-carrito {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--gris-medio);
}
.fila-carrito img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; background: var(--gris-claro); }
.fila-carrito .info-fila { flex: 1; }
.fila-carrito .nombre-fila { font-weight: 700; font-size: 14.5px; }
.fila-carrito .quitar-fila { background: none; border: none; }
.fila-carrito .quitar-fila svg { width: 18px; height: 18px; stroke: var(--rojo); }
.resumen-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; padding: 18px 0; }

/* ===== WIDGET FLOTANTE CARRITO ===== */
.widget-carrito-flotante {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(var(--nav-inferior-alto) + 14px);
    background: var(--negro);
    color: var(--blanco);
    border-radius: 40px;
    padding: 10px 10px 10px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    z-index: 950;
    max-width: 460px;
    margin: 0 auto;
}
.widget-carrito-flotante.mostrar { display: flex; }
.widget-carrito-flotante .cantidad-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
}
.widget-carrito-flotante .cantidad-info svg { width: 20px; height: 20px; stroke: var(--blanco); }
.widget-carrito-flotante .num-productos {
    background: var(--rojo);
    border-radius: 50%;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.widget-carrito-flotante .btn-ver-carrito {
    background: var(--rojo);
    color: var(--blanco);
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 13.5px;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--negro);
    color: #d8d8d8;
    padding: 40px 0 20px;
    margin-top: 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 26px;
}
.logo-footer img { max-height: 46px; margin-bottom: 12px; }
.footer-texto-desc { font-size: 13.5px; color: #a9a9a9; line-height: 1.6; }
.footer-col h4 { color: var(--blanco); font-size: 15px; margin: 0 0 12px; }
.footer-col a, .footer-col p { display: block; color: #a9a9a9; font-size: 13.5px; margin-bottom: 9px; }
.footer-col a:hover { color: var(--rojo); }
.footer-redes { display: flex; gap: 10px; margin-top: 10px; }
.footer-redes a {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
}
.footer-redes a svg { width: 17px; height: 17px; stroke: var(--blanco); }
.btn-libro-reclamaciones {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(216,19,36,.15);
    border: 1px solid var(--rojo);
    color: var(--blanco);
    padding: 9px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 6px;
}
.btn-libro-reclamaciones svg { width: 16px; height: 16px; stroke: var(--rojo); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 16px;
    text-align: center;
    font-size: 12.5px;
    color: #888;
}
@media (max-width: 760px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== ADMIN LOGIN (para no chocar con estilos del panel) ===== */
.sin-resultados { text-align: center; padding: 60px 20px; color: var(--gris-texto); }

/* ===== UTILIDADES ===== */
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
