:root {
    --morado: #2b1156;
    --morado-header: #2a225d;
    --amarillo: #f6c945;
    --rosa: #ec4899;
    --naranja: #f97316;
    --cian: #22d3ee;
}

* { box-sizing: border-box; }
body { font-family: 'Poppins', Arial, sans-serif; margin: 0; color: #222; background: #faf9fc; }
a { color: #7c3aed; text-decoration: none; }

.tienda-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 24px;
    background: var(--morado-header);
    flex-wrap: wrap;
    gap: 16px;
}
.tienda-header .logo img { height: 110px; display: block; }
.tienda-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.buscador { flex: 1; min-width: 200px; max-width: 420px; }
.buscador input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 20px;
    border: none;
    min-width: 160px;
}
.nav-link { color: #fff; font-size: 14px; transition: transform .15s ease, color .15s ease; display: inline-block; }
.nav-link:hover { color: var(--amarillo); transform: scale(1.05); }
#contador-carrito {
    background: var(--rosa);
    color: #fff;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 11px;
}

.toggle-sidebar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--morado);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin: 20px auto 0;
    max-width: 1300px;
    transition: transform .15s ease;
}
.toggle-sidebar:hover { transform: scale(1.05); }

.layout-tienda {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 26px;
}
.sidebar-categorias {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 20px;
}
.sidebar-categorias.oculto { display: none; }
.sidebar-categorias a {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--amarillo);
    color: var(--morado);
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 999px;
    transition: transform .15s ease;
}
.sidebar-categorias a:hover,
.sidebar-categorias a.activo { transform: scale(1.05); }
.sidebar-categorias .icono { font-size: 16px; }

.tienda-main { flex: 1; min-width: 0; min-height: 60vh; }

@media (max-width: 780px) {
    .layout-tienda { flex-direction: column; }
    .sidebar-categorias {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
    }
}

.hero-carrusel {
    position: relative;
    height: 320px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 28px;
    background: var(--morado);
}
.hero-carrusel .slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .8s ease;
}
.hero-carrusel .slide.activo { opacity: 1; }
.hero-carrusel .slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(43,17,86,.85), rgba(43,17,86,0) 60%);
}
.hero-carrusel .slide .texto { position: relative; padding: 24px; color: #fff; z-index: 2; }
.hero-carrusel .slide .texto h2 { margin: 0 0 6px; font-size: 20px; }
.hero-carrusel .puntos { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 6px; z-index: 3; }
.hero-carrusel .puntos span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; }
.hero-carrusel .puntos span.activo { background: var(--amarillo); }

.grilla-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px;
}
.tarjeta-producto {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tarjeta-producto img { width: 100%; height: 170px; object-fit: contain; background: transparent; border-radius: 0; }
.tarjeta-producto .cuerpo { padding: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tarjeta-producto h3 { font-size: 14px; margin: 0; flex: 1; font-weight: 500; }
.tarjeta-producto .precio { font-weight: bold; color: var(--morado); font-size: 20px; }

.boton {
    display: inline-block;
    background: #7c3aed;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: transform .15s ease, background .15s ease;
}
.boton:hover { background: #6d28d9; transform: scale(1.05); }
.boton.secundario { background: #e5e0f0; color: var(--morado); }
.boton:disabled { background: #ccc; cursor: not-allowed; transform: none; }

.boton-agregar {
    display: block;
    width: 100%;
    background: var(--amarillo);
    color: var(--morado);
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 0;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    transition: transform .15s ease;
}
.boton-agregar:hover { transform: scale(1.05); }
.boton-agregar:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.producto-detalle { display: flex; gap: 32px; flex-wrap: wrap; }
.producto-detalle .imagenes { flex: 1; min-width: 280px; }
.producto-detalle .imagenes img { width: 100%; border-radius: 10px; }
.producto-detalle .info { flex: 1; min-width: 280px; }
.producto-detalle .precio { font-size: 26px; font-weight: bold; color: var(--morado); margin: 10px 0; }
.selector-variante { margin: 14px 0; }
.selector-variante select { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #ccc; }

.fila-carrito {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0; border-bottom: 1px solid #eee;
}
.fila-carrito img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: #f0f0f0; }
.fila-carrito .nombre { flex: 1; }
.fila-carrito input[type="number"] { width: 60px; padding: 6px; border-radius: 6px; border: 1px solid #ccc; }
@media (max-width: 480px) {
    .fila-carrito {
        display: grid;
        grid-template-columns: 64px minmax(0,1fr) auto auto;
        grid-template-rows: auto auto;
        column-gap: 10px;
        row-gap: 8px;
        align-items: center;
    }
    .fila-carrito img { grid-column: 1; grid-row: 1 / span 2; }
    .fila-carrito .nombre { grid-column: 2 / span 3; grid-row: 1; }
    .fila-carrito input[type="number"] { grid-column: 2; grid-row: 2; width: 55px; justify-self: start; }
    .fila-carrito .subtotal-item { grid-column: 3; grid-row: 2; justify-self: end; font-weight: bold; white-space: nowrap; }
    .fila-carrito .btn-quitar { grid-column: 4; grid-row: 2; justify-self: end; }
}

.resumen-total { text-align: right; font-size: 18px; font-weight: bold; margin: 16px 0; }

form.checkout label { display: block; font-size: 13px; font-weight: bold; margin: 10px 0 4px; }
form.checkout input { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #ccc; }

.mensaje { padding: 10px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.mensaje.error { background: #fde8e8; color: #b91c1c; }
.mensaje.exito { background: #e6f6ec; color: #15803d; }

.marcas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.marcas-grid a {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    height: 130px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.marcas-grid a:hover { transform: scale(1.05); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.marcas-grid img { max-width: 100%; max-height: 100%; object-fit: contain; }

.tiendas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tienda-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform .15s ease;
}
.tienda-card:hover { transform: scale(1.03); }
.tienda-card img { max-height: 90px; max-width: 100%; object-fit: contain; margin-bottom: 12px; }
.tienda-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--morado); }
.tienda-card p { margin: 4px 0; font-size: 13px; color: #555; }

.quienes-somos { line-height: 1.7; font-size: 15px; color: #333; }
.quienes-somos h1 { color: var(--morado); }

.tienda-footer { text-align: center; padding: 28px 20px; color: #888; font-size: 13px; background: #fff; border-top: 1px solid #eee; }
.footer-redes { display: flex; justify-content: center; gap: 16px; margin-bottom: 14px; }
.footer-redes a {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--morado); color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s ease, background .15s ease;
}
.footer-redes a:hover { background: var(--rosa); transform: scale(1.15); }
.footer-redes svg { width: 20px; height: 20px; fill: #fff; }
.footer-links { display: flex; justify-content: center; gap: 18px; margin-bottom: 10px; flex-wrap: wrap; }
.footer-links a { color: var(--morado); font-size: 13px; }
