/* ================================================================
   SECCIONES DE CATEGORÍA Y PRODUCTOS
   ================================================================ */

.category-section {
    margin-bottom: 2rem;
    padding: 0.5rem 0.8rem 1rem;
    background: transparent;
    border-radius: 0;
}

.category-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    color: var(--color-primario);
    text-align: left;
    text-transform: capitalize;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-gris-claro);
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.category-title a:hover {
    color: var(--color-acento);
}

.category-subtitle {
    display: block;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--color-gris-muted);
    margin-top: 0.15rem;
    font-style: italic;
    border: none;
}

.subcategory-section {
    margin-bottom: 1.2rem;
}

.subcategory-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1rem 0 0.6rem;
    color: var(--color-primario-hover);
    border-bottom: 2px solid var(--color-acento);
    padding-bottom: 3px;
    text-transform: capitalize;
    display: inline-block;
}


/* GRILLA */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem 1.4rem;
    max-width: calc(5 * 215px + 4 * 1rem);
    margin: 0 auto;
}


/* Tarjeta de producto */

.product {
    cursor: pointer;
    background: transparent;
    padding: 0 0 0.5rem;
    border-radius: 0;
    border: none;
    box-shadow: none;
    text-align: left;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
}

.product:hover {
    transform: none;
    box-shadow: none;
}
.product:hover .prod-img-wrap {
    transform: none;
}


/* Wrapper relativo para el badge de stock + imagen */

.prod-img-wrap {
    position: relative;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f3f4f6;
}

.prod-img-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product:hover .prod-img-wrap img {
    transform: scale(1.04);
}

.product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    background: #f5f5f5;
    display: block;
}


/* ── Carrusel multi-foto en tarjeta de producto ── */

.prod-main-img {
    transition: opacity .38s ease;
}

.prod-img-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.82);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s, background .15s;
    z-index: 3;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.prod-img-prev {
    left: 6px;
}

.prod-img-next {
    right: 6px;
}

.prod-img-arrow:hover {
    background: rgba(255, 255, 255, 1);
}

.prod-img-multi:hover .prod-img-arrow {
    opacity: 1;
}

.prod-img-dots {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 3;
    pointer-events: none;
}

.prod-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background .2s;
}

.prod-dot.active {
    background: #fff;
}

.prod-stock-badge {
    position: absolute;
    bottom: 0.4rem;
    left: 0.4rem;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.17rem 0.5rem;
    border-radius: 0;
    letter-spacing: 0.04em;
    pointer-events: none;
}

.prod-stock-badge.pocas {
    background: rgba(255,255,255,0.9);
    color: #333;
    border: 1px solid rgba(0,0,0,0.15);
}

.prod-stock-badge.agotado {
    background: rgba(255,255,255,0.9);
    color: #555;
    border: 1px solid rgba(0,0,0,0.15);
}

.product h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.85rem 0 0.15rem;
    padding: 0 0.5rem;
    color: #0f172a !important;
    line-height: 1.3;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: left;
}

.product p {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primario) !important;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
    letter-spacing: -0.01em;
    text-align: left;
}

.product>button:not(.quantity-controls button) {
    padding: 0.68rem 0.8rem;
    background: var(--color-primario);
    color: var(--color-secundario);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    width: calc(100% - 1rem);
    margin: 0 0.5rem 0.6rem;
    letter-spacing: 0.02em;
    text-transform: none;
    box-sizing: border-box;
}

.product>button:not(.quantity-controls button):hover {
    opacity: 1;
    filter: brightness(0.88);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
}


/* Controles de cantidad */

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--color-gris-claro);
    border: none;
    border-radius: 99px;
    padding: 2px;
    width: auto;
    margin: 0 auto 0.3rem;
    box-sizing: border-box;
}

.quantity-controls button {
    background: transparent;
    color: var(--color-primario);
    border: none;
    border-radius: 99px;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}

.quantity-controls button:hover {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.quantity-controls span {
    font-weight: 600;
    font-size: 0.92rem;
    color: #333;
    min-width: 1.8rem;
    text-align: center;
}

.espacio-vacio {
    visibility: hidden;
    pointer-events: none;
}


/* VER MÁS */

.ver-mas-card {
    background: var(--color-fondo-qty);
    border: 2px dashed var(--color-gris-medio);
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    cursor: pointer;
    transition: background 0.18s;
}

.ver-mas-card:hover {
    background: var(--color-fondo-hover-cat);
}

.boton-ver-mas {
    width: 52px;
    height: 52px;
    fill: var(--color-primario-hover);
    opacity: 0.65;
}

.ver-mas-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primario);
    margin-top: 0.5rem;
}


/* VOLVER BTN */

.volver-btn {
    background: transparent;
    color: var(--color-primario);
    border: 1px solid var(--color-gris-medio);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 1.1rem;
    border-radius: 7px;
    font-weight: 500;
    font-size: 0.84rem;
    margin: 0.8rem 0 1.2rem;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    letter-spacing: 0.02em;
}

.volver-btn:hover {
    background: var(--color-primario);
    color: var(--color-secundario);
    border-color: var(--color-primario);
}



/* ══════════════════════════════════════════════════════════════════════════════
   FORMATOS DE TARJETAS DE PRODUCTO
   Activados por clase en <body>: cards-galeria | cards-editorial | cards-borde | cards-caja
   Los templates premium del admin establecen uno de estos estilos junto con
   su paleta de colores y layout.
   ══════════════════════════════════════════════════════════════════════════════ */

/* GALERÍA — fotos sobre el fondo de página, sin caja blanca (Aesop) */
body.cards-galeria .product                          { background: transparent; box-shadow: none; border-radius: 0; border: none; }
body.cards-galeria .product:hover                    { box-shadow: none; transform: translateY(-4px); }
body.cards-galeria .prod-img-wrap                    { border-radius: 14px; background: #f0f0f0; }
body.cards-galeria .product img                      { border-radius: 14px; }
body.cards-galeria .product>button:not(.quantity-controls button) { border-radius: 8px; font-size: 0.78rem; letter-spacing: 0.02em; text-transform: none; }
body.cards-galeria .product>button:not(.quantity-controls button):hover { filter: brightness(0.88); opacity: 1; }

/* EDITORIAL — imagen muy alta, tipografía italiana, minimal (Zara Home) */
body.cards-editorial .product                        { background: transparent; box-shadow: none; border-radius: 0; border: none; }
body.cards-editorial .product:hover                  { box-shadow: none; transform: translateY(-3px); }
body.cards-editorial .product img                    { height: 360px; object-fit: cover; border-radius: 4px; }
body.cards-editorial .product h3                     { font-style: italic; font-family: var(--font-display); font-size: 0.9rem; font-weight: 400; }
body.cards-editorial .product>button:not(.quantity-controls button) { border-radius: 0; font-size: 0.78rem; letter-spacing: 0.02em; text-transform: none; }
body.cards-editorial .product>button:not(.quantity-controls button):hover { filter: brightness(0.88); opacity: 1; }

/* BORDE — caja blanca solo con borde fino, sin sombra (Apple) */
body.cards-borde .product                            { background: #fff; box-shadow: none; border-radius: 12px; border: 1px solid rgba(0,0,0,0.09); overflow: hidden; }
body.cards-borde .product:hover                      { box-shadow: 0 6px 28px rgba(0,0,0,.10); border-color: rgba(0,0,0,.18); transform: translateY(-3px); }
body.cards-borde .product img                        { border-radius: 0; }
body.cards-borde .product>button:not(.quantity-controls button) { border-radius: 0; }

/* CAJA — caja blanca con sombra suave refinada (clásico premium) */
body.cards-caja .product                             { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05); border-radius: 14px; border: none; overflow: hidden; }
body.cards-caja .product:hover                       { box-shadow: 0 6px 24px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.07); transform: translateY(-4px); }
body.cards-caja .product img                         { border-radius: 0; }
body.cards-caja .product>button:not(.quantity-controls button) { border-radius: 0 0 13px 13px; }

/* ══════════════════════════════════════════════════════
