/* ===== Paleta de marca PCSCOM (tonos sacados directamente del logo) ===== */
:root {
    --color-navy: #0f2947;
    --color-navy-oscuro: #0a1c32;
    --color-celeste: #4073aa;
    --color-celeste-oscuro: #2f5a87;
}

/* ===== Reset básico ===== */
* { box-sizing: border-box; }
html { overflow-x: hidden; max-width: 100%; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #fafafa;
    color: #262626;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.contenedor {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

/* ===== Header ===== */
.sitio-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 10;
}
.sitio-header .contenedor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 8px;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.sitio-header .logo { display: flex; align-items: center; white-space: nowrap; }
.sitio-header .logo img { height: 42px; width: auto; display: block; }
.buscador { display: flex; flex: 1 1 200px; min-width: 0; max-width: 420px; }
.buscador input {
    width: 100%;
    border: 1px solid #d4d4d4;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 8px 12px;
    font-size: 14px;
}
.buscador button {
    background: var(--color-celeste);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.buscador button:hover { background: var(--color-celeste-oscuro); }

@media (max-width: 640px) {
    .sitio-header .contenedor { justify-content: space-between; }
    .buscador { order: 3; flex-basis: 100%; max-width: 100%; }
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #16a34a;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 8px;
    white-space: nowrap;
}
.btn-whatsapp:hover { background: #15803d; }

/* ===== Layout principal ===== */
main { flex: 1; width: 100%; padding: 24px 0; }
.layout-catalogo {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (min-width: 1024px) {
    .layout-catalogo { flex-direction: row; }
    .filtros { width: 224px; flex-shrink: 0; }
}

/* ===== Filtros ===== */
.filtros form {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.filtros label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #737373;
    margin-bottom: 4px;
}
.filtros select {
    width: 100%;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
}
.filtros .limpiar { font-size: 12px; color: #737373; text-decoration: underline; }

/* ===== Header del listado: breadcrumb + título + contador + orden ===== */
.listado-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.listado-titulo {
    font-size: 20px;
    font-weight: 600;
    color: #171717;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.listado-contador { font-size: 13px; font-weight: 400; color: #a3a3a3; }
.orden-selector { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #737373; }
.orden-selector select {
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
}

/* ===== Grilla de productos ===== */
.sin-resultados {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 48px;
    text-align: center;
    color: #737373;
}
.grilla-productos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}
@media (min-width: 640px)  { .grilla-productos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grilla-productos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tarjeta-producto {
    position: relative;
    min-width: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease;
}
.tarjeta-producto:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.form-favorito { position: absolute; top: 8px; right: 8px; z-index: 2; }
.btn-favorito {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,.9);
    color: #d4d4d4;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.btn-favorito:hover { color: #dc2626; }
.btn-favorito.activo { color: #dc2626; }
.btn-quitar-favorito { background: #fff; color: #dc2626; border: 1px solid #fecaca; }
.btn-quitar-favorito:hover { background: #fef2f2; }
.tarjeta-producto-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}
.form-agregar {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
}
.input-cantidad-mini {
    width: 44px;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
}
.btn-agregar-carrito {
    flex: 1;
    background: var(--color-navy);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
    font-weight: 500;
}
.btn-agregar-carrito:hover { background: var(--color-navy-oscuro); }

.tienda-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%; /* fuerza proporción 1:1 sin depender de aspect-ratio */
    background: #f5f5f5;
    overflow: hidden;
}
.tienda-img-wrap img,
.tienda-img-wrap .tienda-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.badge-stock {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
}
.badge-stock.disponible { background: #dcfce7; color: #15803d; }
.badge-stock.sin-stock { background: #fee2e2; color: #b91c1c; }

.tarjeta-producto .info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.tarjeta-producto .marca { font-size: 12px; color: #a3a3a3; }
.tarjeta-producto h2 {
    font-size: 14px;
    font-weight: 500;
    color: #171717;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tarjeta-producto .precio { margin-top: auto; padding-top: 8px; }
.precio { font-size: 16px; font-weight: 600; color: #171717; margin: 0; }
.stock { font-size: 12px; margin: 2px 0 0; }
.stock.disponible { color: #16a34a; }
.stock.sin-stock { color: #dc2626; }

/* ===== Paginación ===== */
.paginacion { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.paginacion .puntos { padding: 6px 4px; font-size: 14px; color: #a3a3a3; }
.paginacion a {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #d4d4d4;
    color: #525252;
}
.paginacion a.activa { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

/* ===== Ficha de producto ===== */
.breadcrumb { font-size: 12px; color: #a3a3a3; margin-bottom: 16px; }
.breadcrumb a:hover { text-decoration: underline; }

.ficha-producto {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 768px) { .ficha-producto { grid-template-columns: 1fr 1fr; } }

.ficha-producto .imagen-principal { border-radius: 10px; margin-bottom: 12px; }
.miniaturas { display: flex; gap: 8px; overflow-x: auto; }
.miniaturas button {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: none;
    padding: 0;
    overflow: hidden;
}

.ficha-info .marca { font-size: 14px; color: #a3a3a3; }
.ficha-info h1 { font-size: 20px; font-weight: 600; color: #171717; margin: 4px 0 0; }
.ficha-titulo-fila { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.btn-favorito-ficha {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #d4d4d4;
    font-size: 17px;
    cursor: pointer;
}
.btn-favorito-ficha:hover { color: #dc2626; }
.btn-favorito-ficha.activo { color: #dc2626; border-color: #fecaca; }

.specs-resumen {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    font-size: 13px;
    color: #525252;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.specs-resumen li::before { content: '•'; color: #d4d4d4; margin-right: 6px; }
.specs-resumen strong { color: #171717; font-weight: 600; }
.link-ver-todas { display: inline-block; font-size: 13px; text-decoration: underline; color: #525252; margin-bottom: 16px; }

.caja-compra {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
}
.caja-compra .precio-grande { font-size: 26px; font-weight: 700; color: #171717; margin: 0; }
.caja-compra .precio-usd { font-size: 14px; color: #a3a3a3; margin: 2px 0 0; }
.caja-compra .garantia { font-size: 14px; color: #737373; margin: 4px 0 0; }

.form-agregar-ficha {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}
.form-agregar-ficha .input-cantidad {
    width: 64px;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    padding: 0 8px;
    text-align: center;
    font-size: 14px;
}
.form-agregar-ficha .btn-primario { border: none; cursor: pointer; flex: 1; }

.form-alerta-stock {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}
.form-alerta-stock input[type="email"] {
    flex: 1;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
}
.form-alerta-stock .btn-primario { border: none; cursor: pointer; white-space: nowrap; }

.btn-whatsapp-grande {
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #16a34a;
    color: #fff;
    font-weight: 500;
    padding: 14px 20px;
    border-radius: 10px;
}
.btn-whatsapp-grande:hover { background: #15803d; }

.atributos { margin-top: 24px; border-top: 1px solid #e5e5e5; padding-top: 16px; }
.atributos h2 { font-size: 14px; font-weight: 600; color: #171717; margin: 0 0 8px; }
.atributos dl { margin: 0; font-size: 14px; }
.atributos .fila {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f5;
    padding: 6px 0;
}
.atributos dt { color: #737373; }
.atributos dd { margin: 0; text-align: right; }

.descripcion-producto {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    margin-top: 16px;
}
.descripcion-producto h2 { font-size: 16px; font-weight: 600; color: #171717; margin: 0 0 12px; }
.descripcion-producto p { font-size: 14px; line-height: 1.7; color: #404040; margin: 0; white-space: pre-line; }
.sin-atributos {
    margin-top: 24px;
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
    font-size: 13px;
    color: #a3a3a3;
}
.sin-atributos a { color: #525252; text-decoration: underline; }

/* ===== Header: acciones (carrito, cuenta) ===== */
.header-acciones { display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px; gap: 16px; }
.link-carrito, .link-cuenta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #404040;
    white-space: nowrap;
}
.link-carrito:hover, .link-cuenta:hover { color: var(--color-navy); }
.icono { flex-shrink: 0; }
.badge-carrito {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    padding: 0 4px;
    margin-left: 4px;
}

.aviso-agregado {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.aviso-agregado a { text-decoration: underline; }

/* ===== Carrusel de destacados ===== */
.carrusel-destacados { margin-bottom: 32px; }
.carrusel-destacados h2 {
    font-size: 16px;
    font-weight: 600;
    color: #171717;
    margin: 0 0 12px;
}
.carrusel-pista {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.carrusel-item {
    scroll-snap-align: start;
    flex: 0 0 200px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.carrusel-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.carrusel-item .info { padding: 10px; }
.carrusel-item .marca { font-size: 11px; color: #a3a3a3; }
.carrusel-item h3 {
    font-size: 13px;
    font-weight: 500;
    color: #171717;
    margin: 2px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.carrusel-item .precio { font-size: 14px; font-weight: 600; color: #171717; margin: 0; }

/* ===== Carrito ===== */
.titulo-pagina { font-size: 20px; font-weight: 600; color: #171717; margin: 0 0 16px; }

.layout-carrito {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}
@media (min-width: 900px) {
    .layout-carrito { flex-direction: row; }
    .layout-carrito .tabla-carrito { flex: 1; margin-bottom: 0; min-width: 0; }
    .resumen-carrito-lateral { width: 300px; flex-shrink: 0; position: sticky; top: 76px; }
}

.tabla-carrito { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.fila-carrito {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px;
}
.fila-carrito-resumen { grid-template-columns: minmax(0, 1fr) auto; }

@media (max-width: 560px) {
    .fila-carrito {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        grid-template-areas:
            "img info quitar"
            "img cantidad subtotal";
        row-gap: 8px;
    }
    .fila-carrito-resumen { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "info subtotal"; }
    .fila-carrito-img { grid-area: img; }
    .fila-carrito-info { grid-area: info; }
    .fila-carrito-cantidad { grid-area: cantidad; }
    .fila-carrito-subtotal { grid-area: subtotal; justify-self: end; }
    .fila-carrito > form:last-child { grid-area: quitar; justify-self: end; }
}
.fila-carrito-img { width: 64px; }
.fila-carrito-info { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.fila-carrito-info a { color: #171717; font-weight: 500; }
.precio-unitario { font-size: 12px; color: #a3a3a3; }
.fila-carrito-cantidad input {
    width: 56px;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    padding: 6px;
    text-align: center;
}
.fila-carrito-subtotal { font-weight: 600; color: #171717; white-space: nowrap; }
.btn-quitar {
    background: none;
    border: none;
    color: #a3a3a3;
    font-size: 16px;
    padding: 4px 8px;
}
.btn-quitar:hover { color: #dc2626; }

/* Panel lateral del carrito (dos columnas) */
.resumen-carrito-lateral {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
}
.resumen-carrito-lateral h2 { font-size: 15px; font-weight: 600; color: #171717; margin: 0 0 12px; }
.resumen-fila { display: flex; justify-content: space-between; font-size: 14px; color: #525252; padding: 6px 0; }
.resumen-total-fila { border-top: 1px solid #e5e5e5; margin-top: 4px; padding-top: 12px; font-weight: 600; color: #171717; font-size: 16px; }
.resumen-carrito-lateral .resumen-total { font-size: 20px; }
.resumen-nota { font-size: 12px; color: #a3a3a3; margin: 12px 0 0; text-align: center; }

/* Resumen simple (usado en finalizar.php) */
.resumen-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}
.resumen-total { font-size: 20px; }
.btn-primario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-navy);
    color: #fff;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    text-decoration: none;
}
.btn-primario:hover { background: var(--color-navy-oscuro); }
.btn-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--color-navy);
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--color-navy);
    font-size: 15px;
    text-decoration: none;
    margin-top: 8px;
}
.btn-secundario:hover { background: #f5f7fa; }
.btn-finalizar { width: 100%; box-sizing: border-box; }
.pedido-confirmado {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
}

/* ===== Cuenta (login / registro) ===== */
.form-cuenta {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
}
.form-cuenta h1 { font-size: 20px; margin: 0 0 4px; color: #171717; }
.form-cuenta .subtitulo { font-size: 14px; color: #737373; margin: 0 0 16px; }
.form-cuenta label { display: block; font-size: 13px; font-weight: 500; color: #525252; margin: 12px 0 4px; }
.form-cuenta input {
    width: 100%;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
}
.form-cuenta .btn-primario { width: 100%; margin-top: 20px; border: none; cursor: pointer; }
.form-cuenta .ayuda { font-size: 13px; color: #737373; margin-top: 16px; text-align: center; }
.form-cuenta .ayuda a { text-decoration: underline; }
.mensaje-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* ===== Newsletter ===== */
.newsletter { background: var(--color-navy); margin-top: 40px; }
.newsletter-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 32px 16px;
}
@media (min-width: 640px) {
    .newsletter-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.newsletter h2 { color: #fff; font-size: 18px; margin: 0; }
.newsletter p { color: #a3a3a3; font-size: 14px; margin: 4px 0 0; }
.newsletter-form { display: flex; gap: 8px; width: 100%; max-width: 360px; }
.newsletter-form input {
    flex: 1;
    border: 1px solid transparent;
    background: #fff;
    color: #171717;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
}
.newsletter-form input::placeholder { color: #a3a3a3; }
.newsletter-form input:focus { outline: 2px solid var(--color-celeste); outline-offset: 1px; }
.newsletter-form button {
    background: var(--color-celeste);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 18px;
    font-weight: 600;
    font-size: 14px;
}
.newsletter-gracias { color: #4ade80; font-size: 14px; margin: 0; }

/* ===== Páginas legales (términos, privacidad, arrepentimiento) ===== */
.pagina-legal {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #404040;
}
.pagina-legal h2 { font-size: 15px; font-weight: 600; color: #171717; margin: 20px 0 6px; }
.pagina-legal h2:first-child { margin-top: 0; }
.pagina-legal a { text-decoration: underline; }

/* ===== Footer links ===== */
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-links a span { text-decoration: underline; }
.footer-links a svg { flex-shrink: 0; opacity: .75; }

/* ===== Mis pedidos ===== */
.mis-pedidos-lista { display: flex; flex-direction: column; gap: 12px; }
.mi-pedido-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 16px;
}
.mi-pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.estado-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}
.estado-pendiente { background: #fef3c7; color: #b45309; }
.estado-confirmado { background: #dbeafe; color: #1d4ed8; }
.estado-pagado { background: #dcfce7; color: #15803d; }
.estado-cancelado { background: #fee2e2; color: #b91c1c; }

/* ===== Footer ===== */
.sitio-footer { background: #fff; border-top: 1px solid #e5e5e5; margin-top: 40px; }
.sitio-footer .contenedor {
    padding: 24px 16px;
    font-size: 13px;
    color: #a3a3a3;
    display: flex;
    flex-direction: column;
    gap: 16px;
    line-height: 1.6;
}
@media (min-width: 640px) {
    .sitio-footer .contenedor {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 32px;
    }
    .sitio-footer .contenedor > span:last-child { max-width: 340px; text-align: right; }
}

/* ===== WhatsApp flotante ===== */
.whatsapp-flotante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    z-index: 50;
}
.whatsapp-flotante:hover { background: #15803d; }

/* ===== Subnav con mega-menús ===== */
.sitio-subnav {
    background: var(--color-navy-oscuro);
    border-bottom: 1px solid var(--color-navy-oscuro);
}
.sitio-subnav-inner {
    display: flex;
    gap: 4px;
    padding: 0;
}
.mega-menu, .subnav-link { flex-shrink: 0; white-space: nowrap; }
.mega-menu { position: relative; }
.mega-menu summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    user-select: none;
}
.mega-menu summary::-webkit-details-marker { display: none; }
.mega-menu summary:hover { background: rgba(255,255,255,.08); color: var(--color-celeste); }
.mega-menu[open] summary { background: rgba(255,255,255,.08); color: var(--color-celeste); }
.mega-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 45;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    padding: 20px;
    min-width: 320px;
    max-width: 90vw;
    max-height: 70vh;
    overflow-y: auto;
}
.mega-menu-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    align-content: start;
}
.mega-menu-columna { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mega-menu-titulo {
    font-weight: 600;
    color: #171717;
    font-size: 14px;
    margin-bottom: 4px;
}
.mega-menu-columna a:not(.mega-menu-titulo) {
    font-size: 13px;
    color: #737373;
    padding: 2px 0;
}
.mega-menu-columna a:hover { color: #171717; text-decoration: underline; }
.mega-menu-marcas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    align-content: start;
}
.mega-menu-marca {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #262626;
}
.mega-menu-marca:hover { border-color: #171717; background: #fafafa; }
.mega-menu-marca { min-height: 64px; line-height: 1.25; overflow-wrap: anywhere; }
/* El nowrap de la barra de navegación se hereda al panel: acá los nombres largos tienen que partirse en líneas */
.mega-menu-panel { white-space: normal; }
.mega-menu-marca.con-logo { padding: 8px 10px; background: #fff; }
.mega-menu-marca.con-logo img {
    display: block;
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 640px) {
    .sitio-subnav-inner {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .sitio-subnav-inner::-webkit-scrollbar { display: none; }

    .mega-menu-panel {
        position: fixed;
        top: 12px;
        bottom: 12px;
        left: 8px;
        right: 8px;
        width: auto;
        min-width: 0;
        max-height: none;
    }
}

/* ===== Ofertas y productos propios ===== */
.badge-oferta {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 1;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}
.badge-oferta-ficha { position: static; display: inline-block; margin-bottom: 6px; }
.precio-antes {
    font-size: 13px;
    color: #a3a3a3;
    text-decoration: line-through;
    margin: 0;
}
.precio-antes-grande { font-size: 16px; }
.precio-oferta { color: #dc2626 !important; }
.badge-propio {
    display: inline-block;
    background: var(--color-navy, #171717);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ===== Página de Ofertas / Productos propios (reutiliza estilos del listado) ===== */
.pagina-intro {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.pagina-intro h1 { margin: 0 0 4px; font-size: 20px; color: #171717; }
.pagina-intro p { margin: 0; font-size: 14px; color: #737373; }

.subnav-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
}
.subnav-link:hover { background: rgba(255,255,255,.08); color: var(--color-celeste); }

.subnav-dolar {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-celeste);
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-baja {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 1;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}
.precio-baja { color: #16a34a !important; }

/* ===== Banner rotativo (home, a todo el ancho) ===== */
.banner-fullwidth {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 24px;
    position: relative;
}
.banner-carrusel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 4;
    max-height: 400px;
    overflow: hidden;
    background: #f5f5f5;
}
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    display: block;
}
.banner-slide.activo { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-puntos {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.banner-punto {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,.6);
    padding: 0;
    cursor: pointer;
}
.banner-punto.activo { background: #fff; }
@media (max-width: 640px) {
    .banner-carrusel { aspect-ratio: 4 / 3; max-height: 280px; }
}

/* ===== Barra de navegación fija abajo (solo mobile) ===== */
.bottom-nav {
    display: none;
}
@media (max-width: 640px) {
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        background: #fff;
        border-top: 1px solid #e5e5e5;
        box-shadow: 0 -2px 10px rgba(0,0,0,.05);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        border: none;
        background: none;
        color: #737373;
        font-size: 10px;
        font-family: inherit;
        padding: 4px 2px;
    }
    .bottom-nav-item:active,
    .bottom-nav-item:hover { color: var(--color-navy, #171717); }
    .bottom-nav-whatsapp { color: #16a34a; }
    .bottom-nav-icono { position: relative; display: inline-flex; }
    .bottom-nav-badge {
        position: absolute;
        top: -6px;
        right: -8px;
        background: #dc2626;
        color: #fff;
        font-size: 10px;
        font-weight: 600;
        min-width: 15px;
        height: 15px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
    }

    /* En mobile ya está el WhatsApp en la barra de abajo, no hace falta el flotante también */
    .whatsapp-flotante { display: none; }
}

.envio-mensaje {
    font-size: 12px;
    color: #737373;
    text-align: center;
    margin: 8px 0 0;
}
.envio-mensaje-ok { color: #16a34a; font-weight: 600; }

/* ===== Selector de envío vs retiro en tienda (finalizar.php) ===== */
.selector-entrega { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.opcion-entrega {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.opcion-entrega:has(input:checked) { border-color: var(--color-navy, #171717); background: #f8fafc; }
.caja-retiro {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ===== Modo emergencia: precios ocultos, se consulta por WhatsApp ===== */
.btn-consultar-precio {
    flex: 1;
    display: block;
    text-align: center;
    background: #16a34a;
    color: #fff;
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
.btn-consultar-precio:hover { background: #15803d; }
.precio-consultar { color: #737373 !important; font-size: 14px !important; font-weight: 500 !important; }
.precio-grande.precio-consultar { font-size: 20px !important; }

/* ===== Redes sociales en el pie ===== */
.footer-marca { display: flex; flex-direction: column; gap: 10px; }
.footer-redes { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-redes a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    color: #525252;
    background: #fff;
}
.footer-redes a:hover { color: var(--color-navy, #171717); border-color: var(--color-navy, #171717); }
.footer-redes svg { display: block; }

/* ===== Compartir producto ===== */
.compartir { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e5e5e5; font-size: 13px; color: #737373; }
.btn-compartir {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background: #fff;
    color: #404040;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}
.btn-compartir:hover { border-color: #171717; color: #171717; }
.btn-compartir-wa { color: #16a34a; border-color: #bbf7d0; }
.btn-compartir-wa:hover { border-color: #16a34a; color: #15803d; }

/* ===== Íconos junto al texto (botones, menú) ===== */
.btn-icono { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn-icono svg { flex-shrink: 0; }
.mega-menu summary { display: flex; align-items: center; gap: 7px; }
.subnav-link { gap: 7px; }
.compartir .btn-compartir svg { flex-shrink: 0; }

/* ===== Menú de Categorías/Marcas en celular: barra para poder cerrarlo ===== */
.mega-menu-cerrar { display: none; }
@media (max-width: 640px) {
    .mega-menu-cerrar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        grid-column: 1 / -1;
        position: sticky;
        top: -20px; /* compensa el relleno del panel, así la barra queda pegada al borde de arriba */
        z-index: 2;
        margin: -20px -20px 6px;
        padding: 12px 20px;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        border-radius: 10px 10px 0 0;
        font-size: 16px;
        font-weight: 600;
        color: #171717;
    }
    .mega-menu-cerrar button {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 50%;
        background: #f5f5f5;
        color: #404040;
        cursor: pointer;
    }
}
