
/* ==========================================
   SHOPYDAS - CATÁLOGO MODERNO
   Azul marino + amarillo
========================================== */

:root {
    --primary: #10254d;
    --primary-dark: #091a39;
    --accent: #f5b400;
    --dark: #101b35;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e5eaf1;
    --background: #f7f9fc;
    --green: #15803d;
    --red: #dc2626;
}

/* REGLAS GENERALES */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

/* ==========================================
   ENCABEZADO SHOPYDAS
========================================== */

.header {
    background: #ffffff;
    padding: 16px 14px 12px;
    width: 100%;
    border-bottom: 1px solid #edf0f5;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.header .icon-btn {
    position: relative;
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 34px;
    flex-shrink: 0;
    padding: 0;
}

.header .icon-btn svg {
    width: 23px;
    height: 23px;
    stroke-width: 1.9;
}

/* LOGO */

.header .logo {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-size: 21px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -1px;
    white-space: nowrap;
    text-decoration: none;
}

.header .logo svg {
    width: 31px;
    height: 31px;
    color: var(--accent);
    stroke-width: 2;
}

.header .logo b {
    color: var(--accent);
}

/* ACCIONES */

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header .cart-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BUSCADOR DEL HEADER */

.header .search-box {
    width: 100%;
    height: 39px;
    background: #f6f7fb;
    border: 1px solid #dfe4ef;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
}

.header .search-box svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
    flex-shrink: 0;
}

.header .search-box input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--primary);
    padding: 0;
}

.header .search-box input::placeholder {
    color: #8791a3;
}

/* ==========================================
   CONTENEDOR
========================================== */

.contenedor {
    max-width: 1350px;
    margin: 0 auto;
    padding: 32px 24px 70px;
}

/* ==========================================
   TÍTULO
========================================== */

.titulo {
    margin-bottom: 28px;
}

.titulo h1 {
    margin: 0 0 10px;
    font-size: clamp(25px, 3vw, 35px);
    letter-spacing: -1px;
    font-weight: 800;
    color: var(--dark);
}

.titulo p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================
   FILTROS
========================================== */

.filtros {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 23px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .025);
}

.filtros input,
.filtros select {
    height: 45px;
    border: 1px solid #dce3ed;
    border-radius: 10px;
    background: #ffffff;
    outline: none;
    padding: 0 15px;
    font-size: 14px;
    color: var(--text);
}

.filtros input {
    flex: 2;
    min-width: 200px;
}

.filtros select {
    flex: 1;
    min-width: 175px;
}

.filtros input:focus,
.filtros select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 37, 77, .08);
}

.filtros button,
.limpiar-btn {
    height: 45px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filtros button {
    background: var(--primary);
    color: #ffffff;
    border: none;
}

.filtros button:hover {
    background: var(--primary-dark);
}

.limpiar-btn {
    background: #f1f5f9;
    color: #475569;
    border: none;
}

.limpiar-btn:hover {
    background: #e5eaf1;
}

.contador {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 20px;
}

/* ==========================================
   GALERÍA DE PRODUCTOS
========================================== */

.galeria {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* ==========================================
   TARJETAS
========================================== */

.producto {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .035);
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.producto:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.producto:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* FOTOGRAFÍA */

.producto-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fafbfc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.producto-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: normal;
    transition: transform .4s ease;
}

.producto:hover .producto-img img {
    transform: scale(1.045);
}

.sin-foto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #94a3b8;
}

.sin-foto span {
    font-size: 40px;
}

.sin-foto small {
    font-size: 12px;
}

/* ETIQUETAS NUEVO / USADO */

.etiqueta-condicion {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.etiqueta-nuevo {
    background: #dcfce7;
    color: #166534;
}

.etiqueta-usado {
    background: #fef3c7;
    color: #92400e;
}

/* ==========================================
   INFORMACIÓN DEL PRODUCTO
========================================== */

.producto .info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* CATEGORÍA */

.producto .categoria {
    display: inline-block;
    align-self: flex-start;
    background: #f0f4fb;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 7px;
    padding: 6px 10px;
    margin-bottom: 12px;
}

/* NOMBRE */

.producto .info h3 {
    font-size: 16px;
    line-height: 1.45;
    font-weight: 750;
    color: var(--dark);
    margin: 0 0 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
}

/* SUBCATEGORÍA */

.producto .subcategoria {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* DESCRIPCIÓN */

.producto .descripcion-corta {
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

/* PRECIO */

.producto .precio {
    color: var(--primary);
    font-weight: 800;
    font-size: 25px;
    letter-spacing: -.5px;
    margin: 0 0 13px;
}

/* ==========================================
   STOCK
========================================== */

.stock-catalogo {
    margin-bottom: 15px;
}

.stock-disponible,
.stock-agotado {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
}

.stock-disponible {
    color: var(--green);
}

.stock-agotado {
    color: var(--red);
}

.punto-stock {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* ==========================================
   INFORMACIÓN DE LA TIENDA
========================================== */

.tienda-producto {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #edf0f5;
    padding-top: 14px;
    margin-top: auto;
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.tienda-producto strong {
    color: var(--dark);
    font-weight: 700;
}

.icono-tienda {
    font-size: 15px;
    flex-shrink: 0;
}

/* ==========================================
   BOTÓN VER PRODUCTO
========================================== */

.ver-detalle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 12px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s ease;
}

.producto:hover .ver-detalle {
    background: var(--primary-dark);
}

/* ==========================================
   SIN RESULTADOS
========================================== */

.vacio {
    background: #ffffff;
    border-radius: 14px;
    padding: 50px 20px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--border);
}

/* ==========================================
   PAGINACIÓN
========================================== */

.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 40px;
}

.paginacion a {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--primary);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
}

.paginacion a:hover {
    background: #f0f4fb;
}

.paginacion span {
    color: var(--muted);
    font-size: 13px;
}

/* ==========================================
   PÁGINA DE DETALLE
========================================== */

.volver {
    display: inline-block;
    margin-bottom: 25px;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

.detalle-producto {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
}

.imagen-grande {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border-radius: 15px;
    overflow: hidden;
}

.abrir-foto {
    width: 100%;
    height: 100%;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: zoom-in;
}

.abrir-foto img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.miniaturas {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.miniatura {
    width: 75px;
    height: 75px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;
}

.miniatura.activa {
    border-color: var(--accent);
}

.miniatura img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cantidad-fotos {
    font-size: 12px;
    color: var(--muted);
}

.informacion-detalle h1 {
    font-size: clamp(25px, 3vw, 35px);
    line-height: 1.3;
    color: var(--dark);
}

.precio-detalle {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin: 25px 0;
}

.linea {
    height: 1px;
    background: var(--border);
    margin: 25px 0;
}

.descripcion-completa {
    color: #475569;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.datos-adicionales > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.datos-adicionales span {
    color: var(--muted);
}

.datos-adicionales strong {
    text-align: right;
}

.boton-volver {
    display: block;
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    color: #ffffff;
    font-weight: 700;
    background: var(--primary);
    border-radius: 10px;
}

.boton-volver:hover {
    background: var(--primary-dark);
}

/* ==========================================
   VISOR DE FOTOGRAFÍAS
========================================== */

.visor-fotos {
    width: 95vw;
    height: 95vh;
    max-width: 1200px;
    max-height: 900px;
    border: none;
    border-radius: 15px;
    padding: 45px 15px 15px;
    background: #ffffff;
    position: fixed;
}

.visor-fotos::backdrop {
    background: #000000d9;
}

.visor-fotos img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cerrar-visor {
    position: absolute;
    top: 8px;
    right: 15px;
    border: none;
    background: transparent;
    font-size: 35px;
    cursor: pointer;
}

/* ==========================================
   TABLET
========================================== */

@media (max-width: 1100px) {
    .galeria {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 850px) {
    .galeria {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detalle-producto {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   COMPUTADORAS
========================================== */

@media (min-width: 768px) {
    .header {
        padding: 18px 5%;
    }

    .header-top {
        max-width: 1200px;
        margin: 0 auto 16px;
    }

    .header .search-box {
        max-width: 1200px;
        margin: auto;
        height: 45px;
    }
}

/* ==========================================
   CELULARES
========================================== */

@media (max-width: 600px) {

    .header {
        padding: 16px 14px 12px;
    }

    .header .logo {
        font-size: 21px;
    }

    .contenedor {
        padding: 24px 12px 45px;
    }

    .titulo {
        margin-bottom: 22px;
    }

    .titulo h1 {
        font-size: 25px;
    }

    .titulo p {
        font-size: 13px;
    }

    .filtros {
        padding: 13px;
        gap: 10px;
    }

    .filtros input,
    .filtros select {
        flex-basis: 100%;
        min-width: 0;
    }

    .filtros button,
    .limpiar-btn {
        flex: 1;
    }

    .galeria {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .producto {
        border-radius: 13px;
    }

    .producto-img {
        padding: 8px;
    }

    .producto .info {
        padding: 11px;
    }

    .producto .info h3 {
        font-size: 13px;
        min-height: 38px;
    }

    .producto .categoria {
        font-size: 9px;
        padding: 5px 7px;
        margin-bottom: 9px;
    }

    .producto .subcategoria {
        font-size: 10px;
        margin-bottom: 9px;
    }

    .producto .descripcion-corta {
        font-size: 10px;
        min-height: 33px;
        margin-bottom: 12px;
    }

    .producto .precio {
        font-size: 19px;
    }

    .stock-disponible,
    .stock-agotado {
        font-size: 10px;
        gap: 5px;
    }

    .tienda-producto {
        font-size: 10px;
        gap: 5px;
    }

    .ver-detalle {
        font-size: 11px;
        padding: 11px 7px;
    }

    .etiqueta-condicion {
        top: 8px;
        left: 8px;
        padding: 5px 8px;
        font-size: 9px;
    }

    .detalle-producto {
        padding: 15px;
        gap: 25px;
    }

    .precio-detalle {
        font-size: 30px;
    }

    .paginacion {
        gap: 8px;
    }

    .paginacion a {
        padding: 10px 12px;
        font-size: 11px;
    }
}

/* PANTALLAS MUY PEQUEÑAS */

@media (max-width: 350px) {
    .galeria {
        grid-template-columns: 1fr;
    }
}








/*estilos para los  iconos*/


/* =====================================
   CATEGORÍAS DESLIZABLES - CATÁLOGO
===================================== */

.catalogo-categorias {
    width: 100%;
    margin: 0 0 22px;
}

.catalogo-categorias-slider {
    display: flex;
    align-items: stretch;
    gap: 10px;

    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
    padding: 4px 0 10px;
}

.catalogo-categorias-slider::-webkit-scrollbar {
    display: none;
}

/* TARJETAS DE CATEGORÍAS */

.catalogo-categoria {
    flex: 0 0 92px;
    min-width: 0;
    min-height: 82px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;

    background: #f0f3f9;
    border: 1px solid transparent;
    border-radius: 13px;

    color: #10254d;
    text-decoration: none;

    scroll-snap-align: start;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

.catalogo-categoria svg {
    width: 27px;
    height: 27px;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.catalogo-categoria span {
    max-width: 100%;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.catalogo-categoria:hover {
    background: #e5eaf5;
    transform: translateY(-2px);
}

/* CATEGORÍA SELECCIONADA */

.catalogo-categoria.seleccionada {
    background: #10254d;
    color: #ffffff;
    border-color: #10254d;
}

.catalogo-categoria.seleccionada:hover {
    background: #091a39;
}

.catalogo-categoria:focus-visible {
    outline: 3px solid #f5b400;
    outline-offset: 2px;
}

/* LIMPIAR FILTROS */

.catalogo-limpiar {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 20px;
}

.catalogo-limpiar a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
}

.catalogo-limpiar a:hover {
    color: #10254d;
}

.catalogo-limpiar svg {
    width: 15px;
    height: 15px;
}

/* TELÉFONOS */

@media (max-width: 600px) {

    .catalogo-categorias-slider {
        gap: 7px;
    }

    .catalogo-categoria {
        flex-basis: 70px;
        min-height: 70px;
        gap: 7px;
        border-radius: 11px;
    }

    .catalogo-categoria svg {
        width: 24px;
        height: 24px;
    }

    .catalogo-categoria span {
        font-size: 9px;
    }
}
