:root {
    /* Colores */
    --black: #000;
    --white: #fff;
    --gray: #f2f2f2;
	--darkgrey: #cfcfcf;
    --green: #25d366;
    --primary: #5487c5;
    --secondary: #1f3b73;

    /* Bordes y radio */
    --border-soft: rgba(0, 0, 0, 0.08);
    --border-radius: 4px;
    --border-radius-search: 8px;

    /* Espaciados */
    --header-padding-desktop: 0 35px;
    --header-padding-tablet: 8px 0px;
    --header-gap: 15px;
    --header-gap-row: 12px;
    --header-gap-col: 6px;

    --btn-categories-padding: 10px 14px;
    --btn-categories-gap: 8px;

    --header-min-height: 70px;

    --search-min-width: 180px;
}

/* =========================
   Frame base reutilizable
========================= */

.frame-box {
    border: 1px solid var(--secondary); /* color del frame */
    border-radius: 12px;
    background: var(--white);
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* Quitar highlight azul en tap (móvil WebKit/Chrome) */
*:focus {
    outline: none;
}

/* Versión específica para el efecto de toque */
button,
a,
.product-card,
.category-item,
.thumb-btn,
.variation-btn,
.empty-btn,
.product-detail-whatsapp,
.product-detail-share,
.product-share-option {
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--gray);
}

/* ============================
   Header Desktop
============================ */
.header,
.header-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10; /* se queda por debajo del overlay (900) y de sidebars (1000+) */
}

.header-top {
    width: 100%;
    background: var(--secondary);
    overflow: visible;
    min-height: var(--header-min-height);
    display: flex;
    align-items: center;
    padding: var(--header-padding-desktop);
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.header-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* logo primero, botón a la derecha */
    gap: var(--header-gap);
    flex-wrap: nowrap;
}

.header-top-row {
    display: contents; /* no afecta layout desktop */
}

.logo {
    margin-right: 7px;
}

.logo img {
    height: 40px;
    display: block;
    margin-right: 0;
}

@media (hover: hover) {
    .logo-link:hover {
        opacity: 0.9;
    }
}

/* Dejar espacio para el header fijo */
.main-content {
    padding-top: var(--header-min-height);
}

/* En tablet/móvil el header es más alto (2 filas), subimos el padding */
@media (max-width: 685px) {
    .main-content {
        padding-top: 120px;
    }
}

/* Botón Categorías */
.btn-categories {
    display: flex;
    align-items: center;
    gap: var(--btn-categories-gap);
    background: var(--gray);
    border: 1px solid var(--white);
    padding: var(--btn-categories-padding);
    cursor: pointer;
    border-radius: var(--border-radius);
    margin-left: 0;
}

.btn-categories .text { font-size: 14px; }

.btn-categories .icon {
    width: 18px;
    height: 12px;
    position: relative;
    overflow: hidden;
}

.btn-categories .icon::before,
.btn-categories .icon::after,
.btn-categories .icon span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
}

.btn-categories .icon::before { top: 0; }
.btn-categories .icon span { top: 5px; }
.btn-categories .icon::after { bottom: 0; }

@keyframes slide-reappear {
    0% { transform: translateX(0); opacity: 1; }
    40% { transform: translateX(120%); opacity: 0; }
    41% { transform: translateX(-120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.btn-categories:hover .icon::before { animation: slide-reappear 0.8s ease forwards; }
.btn-categories:hover .icon span { animation: slide-reappear 0.8s ease forwards; animation-delay: 0.06s; }
.btn-categories:hover .icon::after { animation: slide-reappear 0.8s ease forwards; animation-delay: 0.2s; }

/* Buscador */
.search-box {
    display: flex;
    flex: 1;
    max-width: 1200px;
    border: 1px solid var(--white);
    border-radius: var(--border-radius-search);
    overflow: hidden;
}

.search-box input {
	background: var(--gray);
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    outline: none;
}

.search-box button {
    background: var(--secondary);
    border: none;
    padding: 0 12px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background: var(--primary);
}

/* Botón WhatsApp */
.header-catalog-logo {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 120px;
    margin-left: 0;
}

.header-catalog-logo img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================
   Responsive
============================ */

/* Tablet grande */
@media (min-width: 686px) and (max-width: 864px) {
    :root {
        --header-padding-desktop: 0 25px;
    }

    .header-container {
        padding: var(--header-padding-tablet);
    }

    .btn-categories {
        order: 1;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        flex-shrink: 0;
    }

    .btn-categories .text { display: none; }

    .logo {
        order: 2;
        margin-left: 12px;
        margin-right: auto;
        flex-shrink: 0;
    }

    .search-box {
        order: 3;
        flex: 1 1 auto;
        min-width: var(--search-min-width);
        margin-left: 12px;
    }

    .header-catalog-logo { display: none; }
}

/* Tablet intermedio */
@media (min-width: 461px) and (max-width: 685px) {
    :root {
        --header-padding-desktop: 0 25px;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--header-padding-tablet);
        gap: var(--header-gap-col);
        width: 100%;
    }
    
    .header-top-row {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: var(--header-gap-row);
        width: 100%;
    }

    .btn-categories {
        order: 1;
        width: auto;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .btn-categories .text { display: inline-block; margin-left: 6px; }

    .logo { order: 2; flex: 1 1 auto; min-width: 0; }
    .logo img { max-width: 100%; height: auto; max-height: 40px; }

    .search-box {
        display: flex;
        width: 100%;
        max-width: 100%;
    }

    .search-box input { flex: 1 1 auto; min-width: 0; max-width: 100%; box-sizing: border-box; }
    .search-box button { flex: 0 0 auto; }

    .header-catalog-logo { display: none; }
}

/* Mobile */
@media (max-width: 460px) {
    :root {
        --header-padding-desktop: 0 25px;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--header-padding-tablet);
        gap: var(--header-gap-col);
        width: 100%;
    }

    .header-top-row {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: var(--header-gap-row);
        width: 100%;
    }
	
	.btn-categories {
        order: 1;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        flex-shrink: 0;
		display: flex;
		align-items: center;
		margin: 0 !important;
    }

    .btn-categories .text { display: none; }

    .logo { order: 2; flex: 1 1 auto; min-width: 0; }
    .logo img { max-width: 100%; height: auto; max-height: 40px; margin: 0 !important; }

    .search-box {
        display: flex;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .search-box input { flex: 1 1 auto; min-width: 0; max-width: 100%; box-sizing: border-box; }
    .search-box button { flex: 0 0 auto; }

    .header-catalog-logo { display: none; }
}

/* Card name tooltip (desktop hover) */
@media (hover: hover) {
    #card-name-tooltip {
        position: fixed;
        z-index: 9999;
        background: rgba(28, 28, 28, 0.75);
        color: #fff;
        font-size: 0.8rem;
        font-weight: 500;
        line-height: 1.4;
        padding: 6px 10px;
        border-radius: 6px;
        max-width: 220px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s ease;
        white-space: normal;
        word-break: break-word;
        box-shadow: 0 2px 10px rgba(0,0,0,0.22);
        transform: translateY(calc(-100% - 8px));
    }
    #card-name-tooltip.below {
        transform: translateY(8px);
    }
    #card-name-tooltip.visible {
        opacity: 1;
    }
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 900;
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar base (OCULTO POR DEFECTO) */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0; /* CLAVE */
    width: 320px;
    background: #fff;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-main {
    transform: translateX(-100%);
}

.sidebar-sub {
    transform: translateX(-100%);
}

/* Sidebar secundario */
.sidebar-sub {
    left: 320px;              /* se coloca a la derecha del principal */
    transform: translateX(0); /* posición natural */
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1100;
}

/* Activo */
body.sub-open .sidebar-sub {
    opacity: 1;
    pointer-events: auto;
}

/* Estados activos */
body.sidebar-open .sidebar-main {
    transform: translateX(0);
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Botones */
.sidebar-close,
.sidebar-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* Categorías */
.category-list,
.subcategory-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.category-item {
    display: flex;
    justify-content: space-between; /* left content vs right arrow */
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
}

.cat-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1; /* take all available space */
}

.cat-expand {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0; /* no encoger */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #000;
}

.cat-expand::after {
    content: '>';       /* arrow */
    transition: transform 0.3s ease;
}

/* Rotate arrow on mobile when submenu open */
@media (max-width: 768px) {
    .category-item.open .cat-expand::after {
        transform: rotate(90deg);
    }
}

.cat-left img {
    width: 22px;
    height: 22px;
}

/*Categorías*/
.cat-left a {
    text-decoration: none;
    color: #000;
    font-weight: 700; /*Negrita*/
}

/* Flecha */
.cat-expand {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* Subcategorías */
.subcategory-list li {
    padding: 12px 0;          /* espacio vertical entre líneas de las Subcategorías*/
}

.subcategory-list a {
    text-decoration: none;   /* quita subrayado */
    color: #000;
    font-weight: 500;
    display: block;          /* asegura que el padding funcione bien */
}

/* =========================
   MÓVIL: subcategorías en acordeón
========================= */
@media (max-width: 768px) {

    .subcategory-inline {
        list-style: none;
        width: 100%;
        margin-top: 8px;
        padding-left: 42px;

        max-height: 0;
        overflow: hidden;
        opacity: 0;

        transition:
            max-height 0.35s ease,
            opacity 0.25s ease;
    }

    .category-item.open .subcategory-inline {
        max-height: 500px; /* suficiente para tus subcategorías */
        opacity: 1;
    }

    .subcategory-inline li {
        padding: 8px 0;
    }

    .subcategory-inline a {
        text-decoration: none;
        color: #000;
        font-weight: 500;
        display: block;
    }

    .category-item {
        flex-wrap: wrap;
    }

    .cat-left {
        flex: 1 1 auto;
    }

    .cat-expand {
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }
}


/* =========================
   Layout base (footer al fondo)
========================= */

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* =========================
   Footer
========================= */

.footer {
    width: 100%;
}

/* Banner PNG */
.footer-banner {
    width: 100%;
    line-height: 0;
	overflow: hidden; /* recorta la imagen si es más grande que el contenedor */
    position: relative; /* para posicionar el contenido sobre la imagen */
}

.footer-banner > img {
    display: block;
	width: auto; /* mantiene el ancho original de la imagen */
    height: auto; /* mantiene la altura original proporcional */
	max-width: none; /* asegura que no se limite el ancho */
	transform: scale(0.6);   /* 70% */
    transform-origin: bottom left; /* queda pegada abajo a la barra */
}

/* Contenido del footer sobre la imagen */
.footer-content {
    position: absolute;
    left: 60px; /* AJUSTAR: posición desde la izquierda */
    top: 80px;  /* AJUSTAR: posición desde arriba */
    display: flex;
    gap: 80px;  /* AJUSTAR: espacio entre columnas */
    z-index: 1; /* por encima de la imagen */
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column:last-child {
    margin-left: 50px; /* AJUSTAR: espacio extra antes de la 3ra columna */
}

.footer-column-title {
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    color: var(--secondary);
    margin: 0 0 24px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li {
    font-size: 14px;
    color: var(--secondary);
    line-height: 1.6;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}

/* Footer movil: acordeon */
@media (max-width: 864px) {
    .footer {
        position: relative; /* el contenido se posiciona relativo al footer */
        margin-top: 0;     /* el margen lo ajusta JS dinámicamente */
        transition: margin-top 0.25s ease;
    }

    .footer-banner {
        position: static; /* quita position:relative para que no recorte el contenido */
        /* overflow: hidden se mantiene del bloque general para recortar la imagen */
    }

    .footer-content {
        position: absolute;
        left: 24px;   /* AJUSTAR: posicion desde la izquierda */
        bottom: 55px; /* AJUSTAR: posicion desde abajo */
        top: auto;
        display: flex;
        flex-direction: column;
        gap: 0;
        z-index: 1;
    }

    .footer-column {
        border-bottom: none;
        margin-bottom: 10px;
    }

    .footer-column:last-child {
        margin-left: 0; /* anula el margen extra de desktop */
    }

    .footer-column-title {
        margin: 0;
        padding: 12px 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.24);
        backdrop-filter: blur(2px);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
        transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
    }

    .footer-column-title::after {
        content: '>';
        font-style: normal;
        font-size: 14px;
        color: var(--secondary);
        transition: transform 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
        flex-shrink: 0;
    }

    .footer-column.open .footer-column-title::after {
        transform: rotate(90deg);
    }

    .footer-column.open .footer-column-title {
        border-color: rgba(236, 201, 75, 0.75);
        background: rgba(0, 0, 0, 0.34);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
    }

    .footer-links {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
        padding: 0 10px;
        margin-top: 8px;
    }

    .footer-column.open .footer-links {
        max-height: 300px;
        opacity: 1;
        padding: 8px 10px 10px;
    }

}

/* Barra inferior tipo header */
.footer-bar {
    background: var(--darkgrey);
    /*color: var(--white);*/
    text-align: center;
    padding: 14px 16px;
    font-size: 14px;
}

/* =========================
   Productos Grid
========================= */

.products-view {
    padding: 24px;
}

/* Fila breadcrumb + selector de orden */
.breadcrumb-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.breadcrumb-row .breadcrumb {
    align-self: flex-start;
    width: 100%;
}

.catalog-tagline {
    --inner-pad-x: 0px; /* compensación por padding interno de la vista */
    padding: 0 calc(35px - var(--inner-pad-x));
    margin: 2px 0 14px;
    color: var(--secondary);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
}

/* Home tiene padding horizontal 16px */
.home-view .catalog-tagline {
    --inner-pad-x: 16px;
}

/* Detalle tiene padding horizontal 24px */
.product-detail-view .catalog-tagline {
    --inner-pad-x: 24px;
}

.sort-select {
    font-size: 0.88rem;
    padding: 8px 12px;
    margin-right: 35px;
    margin-bottom: 8px;
    border: 2px solid var(--secondary);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: var(--primary);
}

@media (max-width: 864px) {
    .sort-select {
        margin-right: 25px;
    }

    .catalog-tagline {
        padding: 0 calc(25px - var(--inner-pad-x));
    }

    .breadcrumb {
        padding-left: calc(25px - var(--crumb-inner-pad-x));
        padding-right: calc(25px - var(--crumb-inner-pad-x));
    }

    .static-page-view .breadcrumb {
        --crumb-inner-pad-x: 25px; /* static-page-view móvil/tablet */
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 0 35px; /* mismo margen lateral que el header */
}

@media (max-width: 864px) {
    .products-grid {
        padding: 0 25px; /* mismo margen lateral que el header en tablet/móvil */
    }
}

/* =========================
   Tarjeta de producto
========================= */

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* Imagen */

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f1f3f6 20%, #e8ebef 38%, #f1f3f6 56%);
    background-size: 220% 100%;
    animation: card-skeleton-shimmer 1.2s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    opacity: 0;
    transition: opacity 220ms ease;
}

.product-image.is-loaded {
    animation: none;
    background: #f6f6f6;
}

.product-image.is-loaded img {
    opacity: 1;
}

/* Info */

.product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
    min-height: 3.9em; /* 3 líneas × line-height 1.3 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Precio */

.product-price {
    margin-top: auto;
}

.product-price .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

/* Botón */

.product-btn {
    margin-top: 10px;
    padding: 10px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.product-btn:hover {
    background: #1fb85b;
}

/* Footer del card de producto */
.product-card-footer {
    background: var(--secondary);
    color: var(--white);
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* =========================
   Carrusel de Productos Destacados
========================= */

.home-view {
    padding: 24px 16px 10px;
}

.featured-section {
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 865px) {
    /* 5 cards * 242.59px = 1212.95px */
    .home-view .featured-section {
        max-width: 1320px; /* incluye flechas + gaps laterales */
    }

    .home-view .featured-carousel .carousel-viewport {
        max-width: 1212.95px;
        margin-left: auto;
        margin-right: auto;
    }
}

.featured-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 20px;
    text-align: center;
}

.featured-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 10px;
}

.featured-track {
    display: flex;
    transition: transform 400ms ease;
}

.featured-card {
    flex: 0 0 calc(100% / 1);
    padding: 0 8px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    display: block;
}

.featured-card > div,
.featured-card > .featured-card-badge {
    pointer-events: none;
}

.featured-card .featured-card-title {
    pointer-events: auto;
}

.featured-card-img {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(90deg, #f1f3f6 20%, #e8ebef 38%, #f1f3f6 56%);
    background-size: 220% 100%;
    animation: card-skeleton-shimmer 1.2s linear infinite;
}

.featured-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: transform 350ms ease, opacity 250ms ease;
}

.featured-card-img.is-loaded {
    animation: none;
    background: #f5f5f5;
}

.featured-card-img.is-loaded img {
    opacity: 1;
}

.featured-card:hover .featured-card-img img {
    transform: scale(1.05);
}

@keyframes card-skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.featured-card-body {
    padding: 14px 16px 10px;
    background: var(--white);
    border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft);
}

.featured-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.3;
    margin: 0 0 6px;
    min-height: 3.9em; /* 3 líneas × line-height 1.3 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.featured-card-badge {
    background: var(--secondary);
    color: var(--white);
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0 0 10px 10px;
    transition: background 200ms ease;
}

.featured-card:hover .featured-card-badge {
    background: var(--primary);
}

/* Flechas */
.carousel-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--secondary);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease, transform 200ms ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.carousel-arrow:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background 200ms ease, transform 200ms ease;
}

.carousel-dot.active {
    background: var(--secondary);
    transform: scale(1.3);
}

.carousel-dot:hover:not(.active) {
    background: var(--primary);
}

.featured-empty {
    text-align: center;
    color: #999;
    font-size: 1rem;
    padding: 40px 0;
}

/* Responsive: 2 cards en tablet */
@media (min-width: 640px) {
    .featured-card {
        flex: 0 0 calc(100% / 2);
    }
}

/* Responsive: 3 cards en desktop */
@media (min-width: 1024px) {
    .featured-card {
        flex: 0 0 calc(100% / 3);
    }
    .featured-title {
        font-size: 1.6rem;
    }
    .offers-text {
        padding-left: 19px;
    }
    .offers-carousel .carousel-arrow:last-child {
        margin-right: 19px;
    }
}

/* Igualar tamano de cards del home con cards de subcategoria
   (solo tablet grande + PC) */
@media (min-width: 865px) {
    .home-view .featured-track .featured-card,
    .home-view .offers-track .featured-card {
        flex: 0 0 242.59px;
        max-width: 242.59px;
    }
}

/* Ocultar flechas en mobile (se usa swipe) */
@media (max-width: 639px) {
    .carousel-arrow {
        display: none;
    }
    .featured-carousel,
    .offers-carousel {
        gap: 0;
    }
}

/* =========================
   Badge de descuento y precio tachado
========================= */

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e53935;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 3px 9px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.3;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85em;
    margin-left: 6px;
}

/* =========================
   Seccion de ofertas (home)
========================= */

.offers-section {
    margin-top: 40px;
    padding: 24px 0;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    background: var(--white);
}

.offers-text {
    flex: 0 0 28%;
    max-width: 280px;
    padding-top: 12px;
}

.offers-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.3;
    margin: 0 0 12px;
}

.offers-title span {
    color: var(--secondary);
}

.offers-desc {
    font-size: 0.95rem;
    color: var(--primary);
    line-height: 1.5;
    margin: 0;
}

.offers-carousel-wrap {
    flex: 1;
    min-width: 0;
}

.offers-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.offers-carousel .carousel-viewport {
    overflow: hidden;
    flex: 1;
}

.offers-track {
    display: flex;
    transition: transform 400ms ease;
}

.offers-track .featured-card {
    flex: 0 0 100%;
}

.offers-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.offers-dots .carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.offers-dots .carousel-dot.active {
    background: var(--secondary);
    transform: scale(1.3);
}

@media (min-width: 768px) {
    .offers-track .featured-card {
        flex: 0 0 50%;
    }
}

@media (max-width: 767px) {
    .offers-section {
        flex-direction: column;
        gap: 16px;
    }

    .offers-text {
        flex: none;
        max-width: none;
        text-align: center;
    }

    .offers-title {
        font-size: 1.3rem;
    }

    .offers-carousel-wrap {
        width: 100%;
    }
}

/* =========================
   Panel de soluciones (home)
========================= */
.connectivity-solutions {
    margin: 42px auto 8px;
    max-width: 1280px;
    padding: 0 35px;
}

.connectivity-header {
    margin-bottom: 20px;
}

.connectivity-kicker {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(84, 135, 197, 0.28);
}

.connectivity-title {
    margin: 0 0 8px;
    color: var(--secondary);
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.2;
}

.connectivity-subtitle {
    margin: 0;
    color: #4f5f78;
    max-width: 860px;
    line-height: 1.55;
    font-size: 0.98rem;
}

.connectivity-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.connectivity-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(31, 59, 115, 0.12);
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.connectivity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(31, 59, 115, 0.12);
    border-color: rgba(31, 59, 115, 0.28);
    background: #fbfdff;
}

.connectivity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 18px;
    color: var(--secondary);
    background: rgba(31, 59, 115, 0.08);
    border: 1px solid rgba(31, 59, 115, 0.14);
}

.connectivity-card-title {
    margin: 0;
    color: var(--secondary);
    font-size: 1rem;
    line-height: 1.3;
}

.connectivity-card-text {
    margin: 0;
    color: var(--secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    min-height: 4.2em;
}

.connectivity-preview {
    margin: 4px 0 2px;
}

.connectivity-preview--static {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.connectivity-preview--carousel {
    overflow: hidden;
}

.connectivity-preview-track {
    display: flex;
    gap: 8px;
    transition: transform 0.5s ease;
    will-change: transform;
}

.connectivity-thumb {
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(31, 59, 115, 0.12);
    background: #f7f9fc;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
}

.connectivity-preview--carousel .connectivity-thumb {
    flex: 0 0 calc((100% - 16px) / 3);
}

.connectivity-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    display: block;
}

.connectivity-cta {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.connectivity-cta::after {
    content: '→';
    transition: transform 0.2s ease;
}

.connectivity-card:hover .connectivity-cta::after {
    transform: translateX(2px);
}

@media (max-width: 1200px) {
    .connectivity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 864px) {
    .connectivity-solutions {
        padding: 0 25px;
        margin-top: 30px;
    }
}

@media (max-width: 640px) {
    .connectivity-grid {
        grid-template-columns: 1fr;
    }
    .connectivity-card-text {
        min-height: 0;
    }
}

/* =========================
   Estado vacío (Productos)
========================= */

.products-empty {
  padding: 18px 16px 6px;
}

.empty-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  text-align: center;
}

.empty-icon {
  width: 44px;
  height: 44px;
  margin: 2px auto 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.55);
}

.empty-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.empty-text {
  margin: 0 0 14px;
  color: #666;
  line-height: 1.5;
}

.empty-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(0,0,0,0.06);
}

.empty-btn:hover {
  background: rgba(0,0,0,0.09);
}

/* =========================
   Breadcrumb
========================= */

.breadcrumb {
    --crumb-inner-pad-x: 0px; /* compensación por padding interno del contenedor */
    padding: 16px calc(35px - var(--crumb-inner-pad-x)) 12px;
    font-size: 14px;
    color: #666;
}

.breadcrumb span {
    cursor: pointer;
}

.breadcrumb span:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 6px;
}

.product-detail-view .breadcrumb {
    --crumb-inner-pad-x: 24px; /* product-detail-view tiene padding horizontal 24px */
}

.static-page-view .breadcrumb {
    --crumb-inner-pad-x: 35px; /* static-page-view desktop */
}


/* =========================
   Detalle de producto
========================= */

.product-detail-view {
    padding: 0px 24px 40px;
}

.product-detail-content {
    margin: 16px auto 0;
    display: grid;
    gap: 18px;
    max-width: 1200px;
}

/* Evita overflow horizontal en CSS Grid cuando el contenido es largo */
.product-detail-image,
.product-detail-info {
    min-width: 0;
}

/* Tablet / Desktop estrecho: 2 columnas flexibles para que no desborde */
@media (min-width: 769px) and (max-width: 1350px) {
    .product-detail-content {
        grid-template-columns: minmax(360px, 1fr) minmax(320px, 1fr);
        gap: 24px;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;

        align-items: start;
        justify-content: center;
    }

    .product-detail-info {
        max-width: none;
    }
}

/* Desktop ancho: 2 columnas fijas (cuando ya cabe sin overflow) */
@media (min-width: 1351px) {
    
    .product-detail-content {
        --pd-left: 630px;
        --pd-right: 650px; /* ancho máximo de la columna derecha */
        --pd-gap: 32px;

        grid-template-columns: var(--pd-left) var(--pd-right);
        gap: var(--pd-gap);

        max-width: calc(var(--pd-left) + var(--pd-right) + var(--pd-gap));
        margin-left: auto;
        margin-right: auto;

        align-items: start;
        justify-content: center;

        overflow-x: clip; /* opcional */
    }
    .product-tabs {
        max-width: calc(630px + 650px + 32px);
    }
}

.product-main-frame {
    position: relative;
    overflow: hidden;
}

.product-main-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;  /* el radio ahora lo controla el frame */
  background: transparent;
}

/*Detalle de producto: zoom ligero en desktop*/
@media (min-width: 769px) {
  .product-main-img {
    transition: opacity 180ms ease, transform 220ms ease;
    transform-origin: center;
  }
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    .product-main-img {
        transition: opacity 180ms ease, transform 260ms ease;
        will-change: transform;
        transform: translateZ(0);
    }

    .product-main-img:hover {
        transform: scale(1.03);
        cursor: zoom-in;
    }
}

.product-main-img.is-fading {
  opacity: 0;
}

/* =========================
   Galería detalle: miniaturas
========================= */

.product-thumbs {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    align-items: center;
}

.thumb-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.thumb-frame {
    display: block;
    padding: 4px; /* espacio para ver el contorno */
}

.thumb-btn:hover .thumb-frame {
  border-color: var(--secondary);
}

.thumb-frame img {
    width: 76px;
    height: 76px;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
}

/* Miniatura activa */
.thumb-btn.is-active .thumb-frame {
    border-color: rgba(0,0,0,0.22);
}

@media (max-width: 768px) {
    .thumb-frame img {
        width: 64px;
        height: 64px;
    }
}

.product-detail-info {
    max-width: 650px;
    width: 100%;
}

/* Resumen de valoraciones (cabecera): móvil bajo miniaturas; desktop encima del título */
.product-detail-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

/* <button> nativo (mejor primer clic en Chrome que div[tabindex]) */
button.product-detail-rating {
    font: inherit;
    color: inherit;
    border: 0;
    background: transparent;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    touch-action: manipulation;
}

.product-detail-rating--mobile {
    margin-top: 24px;
    width: 100%;
}

.product-detail-rating--desktop {
    display: none;
    margin-bottom: 10px;
}

@media (min-width: 769px) {
    .product-detail-rating--mobile {
        display: none !important;
    }

    .product-detail-rating--desktop {
        display: flex !important;
    }
}

.pd-rating-stars {
    position: relative;
    display: inline-block;
    font-size: 1.22rem;
    line-height: 1;
    letter-spacing: 0.12em;
    flex-shrink: 0;
}

.pd-rating-stars-bg {
    color: #ddd;
    display: block;
}

.pd-rating-stars-fg {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #ffa41c;
    display: block;
    pointer-events: none;
}

.pd-rating-label {
    font-size: 0.92rem;
    color: #5a5a5a;
    line-height: 1.35;
}

.product-detail-rating--clickable {
    cursor: pointer;
    border-radius: 8px;
    outline-offset: 3px;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.product-detail-rating--clickable:hover {
    background-color: rgba(31, 59, 115, 0.06);
}

.product-detail-rating--clickable:focus-visible {
    outline: 2px solid var(--primary, #1f3b73);
}

.product-detail-info .view-title {
    padding: 0;
    margin: 0 0 12px;
    color: var(--secondary);
}

.product-detail-description {
    margin: 0 0 12px;
    line-height: 1.5;
    color: var(--secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-detail-description ul,
.product-detail-description ol,
.spec-text ul,
.spec-text ol {
    padding-inline-start: 20px;
    margin: 4px 0;
}

.product-detail-description li,
.spec-text li {
    margin: 3px 0;
    line-height: 1.6;
}

.product-detail-description p,
.spec-text p {
    margin: 0 0 4px;
}

.product-detail-price {
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.product-detail-price .price-label {
  font-size: 14px;
  color: #666;
  font-weight: 600;
}

.product-detail-price .price-amount {
  font-size: 20px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.product-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.product-detail-share-wrap {
    position: relative;
}

.product-detail-share-wrap--floating {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 8;
    width: auto;
}

.product-detail-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.product-detail-share--icon-only {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    gap: 0;
}

.product-detail-share-icon {
    display: flex;
    flex-shrink: 0;
}

.product-detail-share:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(84, 135, 197, 0.25);
}

.product-detail-share:active {
    transform: scale(0.96);
}

/* Tooltip “Compartir”: solo puntero fino + hover (desktop) */
.product-detail-share-tooltip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 11px;
    border-radius: 8px;
    background: var(--secondary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    z-index: 9;
}

@media (hover: hover) and (pointer: fine) {
    .product-detail-share-wrap--floating:hover .product-detail-share-tooltip {
        opacity: 1;
        visibility: visible;
    }

    .product-detail-share-wrap--floating.is-open .product-detail-share-tooltip {
        opacity: 0;
        visibility: hidden;
    }
}

.product-share-dropdown {
    position: absolute;
    z-index: 50;
    left: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    width: max-content;
    max-width: min(280px, calc(100vw - 32px));
    padding: 6px;
    margin: 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: scale(0.96) translateY(-6px);
    transform-origin: top left;
    pointer-events: none;
    visibility: hidden;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s;
}

.product-detail-share-wrap.is-open .product-share-dropdown {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.product-share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.product-share-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.product-share-option-icon {
    display: flex;
    flex-shrink: 0;
    color: var(--primary);
}

.product-share-option--wa .product-share-option-icon {
    color: #25d366;
}

.product-share-option--fb .product-share-option-icon {
    color: #1877f2;
}

.product-share-toast {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--secondary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 55;
    transform: translateY(4px);
}

.product-share-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.product-detail-whatsapp {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

/* =========================
   Tabs detalle de producto
========================= */

.product-tabs {
  margin: 18px auto 0;
  border-radius: 12px;
  overflow: hidden; /* para que el borde se vea limpio con radios */
}

.tabs-header {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--secondary);
  padding: 10px 14px;
  overflow-x: auto;
}

.tabs-body {
  padding: 14px 16px 18px;
}

.tab-btn {
  border: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 6px;
  white-space: nowrap;
  font-size: 16px;
  letter-spacing: 0.05em;
  color: var(--primary);
}

/* Tabs en móvil muy pequeño: 2 arriba, 1 abajo */
@media (max-width: 460px) {
  .tabs-header {
    flex-wrap: wrap;
    row-gap: 4px;
    overflow-x: visible; /* ya no necesitamos scroll horizontal */
  }

  .tab-btn {
    white-space: normal;       /* permite que el texto ocupe varias líneas */
    flex: 1 1 50%;             /* dos botones por fila */
    text-align: center;
  }

  .tab-btn:nth-child(3) {
    flex-basis: 100%;          /* tercera pestaña pasa a la fila de abajo ocupando todo el ancho */
  }

  .product-detail-actions {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}

.tab-btn.is-active {
  color: var(--secondary);
  text-decoration: none;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.muted {
  color: #666;
}

/* =========================
   Reseñas de producto
========================= */
.reviews-wrap {
  display: grid;
  gap: 16px;
}

.reviews-summary {
  padding: 14px;
}

.reviews-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reviews-summary-score {
  font-size: 1.6rem;
  color: var(--secondary);
}

.reviews-summary-stars,
.review-stars {
  color: #f4b400;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.reviews-summary-meta {
  margin-top: 8px;
  color: #666;
  font-size: 0.95rem;
}

.reviews-list {
  display: grid;
  gap: 12px;
}

.review-card {
  padding: 14px;
}

.review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.review-author {
  font-size: 1rem;
  color: var(--secondary);
}

.review-date {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6f6f6f;
}

.review-comment {
  margin-top: 10px;
  color: #2f2f2f;
  line-height: 1.5;
  white-space: pre-wrap;
}

.review-badge-verified {
  margin-top: 10px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f9ef;
  color: #1e7f45;
  font-size: 0.8rem;
  font-weight: 700;
}

.reviews-form-card {
  padding: 14px;
}

/* notice encima del acordeón (fuera del cuerpo colapsable) */
.reviews-form-card > .reviews-form-notice:not([hidden]) {
  margin-bottom: 10px;
}

/* --- Acordeón del formulario de reseña --- */
.review-form-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  text-align: left;
  gap: 10px;
  border-radius: 6px;
  outline-offset: 3px;
}

.review-form-accordion-trigger:focus-visible {
  outline: 2px solid var(--primary, #1f3b73);
}

.review-form-accordion-trigger:hover {
  opacity: 0.8;
}

.review-form-accordion-label {
  flex: 1 1 auto;
}

.review-form-accordion-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
  color: var(--secondary);
  transition: transform 0.28s ease;
  transform: rotate(0deg);
}

.reviews-form-card.is-open .review-form-accordion-arrow {
  transform: rotate(180deg);
}

.review-form-accordion-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.reviews-form-card.is-open .review-form-accordion-body {
  max-height: 1400px;
  opacity: 1;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: 12px;
}

.reviews-form-title {
  color: var(--secondary);
  margin-bottom: 12px;
}

.reviews-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reviews-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reviews-field-full {
  grid-column: 1 / -1;
}

.reviews-field input,
.reviews-field select,
.reviews-field textarea {
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.reviews-form-actions {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  /* móvil: ítems a ancho completo (botón “grande” como antes) */
  justify-items: stretch;
}

.reviews-form-status {
  font-size: 0.9rem;
  color: #5f5f5f;
}

.reviews-form-status.is-error {
  color: #c0392b;
}

.reviews-form-status.is-ok {
  color: #1e7f45;
}

.review-pending-banner {
  padding: 14px 16px;
  border-radius: 10px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  margin-bottom: 16px;
  display: grid;
  gap: 10px;
}

/* [hidden] por defecto no gana frente a display:grid del bloque anterior */
.review-pending-banner[hidden] {
  display: none !important;
}

.review-pending-banner-text {
  margin: 0;
  color: #1e3a5f;
  line-height: 1.5;
  font-size: 0.95rem;
}

.review-pending-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}


.review-pending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.review-pending-wa-wrap {
  flex: 1 1 auto;
  max-width: 100%;
}

.review-pending-wa-btn {
  box-sizing: border-box;
}

/* Móvil: botones verdes a todo el ancho útil (evita el aspecto “chiquito” por fit-content/min-width:0) */
@media (max-width: 640px) {
  .review-pending-wa-wrap {
    width: 100%;
    flex: 1 1 100%;
  }

  #productDetail button#reviewPendingWaBtn.review-pending-wa-btn {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: unset !important;
  }

  #productDetail #productReviewSubmitBtn.product-btn {
    width: 100% !important;
    max-width: none !important;
  }
}

/* Tablet / PC: 240px y centrados */
@media (min-width: 641px) {
  .reviews-form-actions {
    justify-items: center;
  }

  .review-pending-actions {
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .review-pending-wa-wrap {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }

  #productDetail button#reviewPendingWaBtn.review-pending-wa-btn {
    display: inline-block !important;
    width: 240px !important;
    max-width: 240px !important;
    min-width: 240px !important;
    box-sizing: border-box !important;
  }

  #productDetail #productReviewSubmitBtn.product-btn {
    width: 240px !important;
    max-width: 240px !important;
    box-sizing: border-box !important;
  }

  a#reviewVerifyModalWa.review-verify-modal-wa {
    display: flex !important;
    width: 240px !important;
    max-width: 240px !important;
    min-width: 240px !important;
    box-sizing: border-box !important;
  }

  .review-verify-modal-wa-wrap {
    width: auto !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

.review-pending-retry-btn {
  justify-self: start;
}


.reviews-form-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.reviews-form-notice.is-success {
  background: #e8f9ef;
  color: #1a5c32;
  border: 1px solid rgba(30, 127, 69, 0.25);
}

.reviews-form-notice.is-warning {
  background: #fff8e6;
  color: #6b4a00;
  border: 1px solid rgba(180, 140, 0, 0.35);
}

.link-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary, #1f3b73);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  opacity: 0.85;
}

.review-verify-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.review-verify-modal[hidden] {
  display: none !important;
}

.review-verify-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 40, 0.55);
  backdrop-filter: blur(2px);
}

.review-verify-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.review-verify-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5f6b86;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-verify-modal-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #2f3545;
}

.review-verify-modal-title {
  margin: 0 28px 12px 0;
  font-size: 1.2rem;
  color: var(--secondary, #1f3b73);
}

.review-verify-modal-text {
  margin: 0 0 18px;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.55;
}

.review-verify-modal-wa-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.review-verify-modal-wa {
  display: inline-flex;
  width: auto;
  min-width: 200px;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  font-weight: 700;
}

@media (max-width: 640px) {
  .reviews-form {
    grid-template-columns: 1fr;
  }

  .review-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Zoom Modal */
.img-zoom-modal[hidden] {
  display: none !important;
}


/* =========================
   Especificaciones (texto libre)
========================= */

.spec-text {
    color: var(--secondary);
    line-height: 1.6;
    margin: 0 0 10px;
}


/* =========================
   Vista general: banners
========================= */

.overview-banner {
  margin: 20px auto;
  max-width: 1168px;
  background: #fff;
}

.overview-banner + .overview-banner {
  margin-top: 36px;
}

.banner-media {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden;
}

.banner-media img,
.banner-media picture {
  display: block;
  width: 100%;
}

.banner-media picture img {
  width: 100%;
  height: auto;
  display: block;
}

.banner-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
}

.banner-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 560px);
  object-fit: contain;
  background: #000;
}

.banner-video-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.banner-video-toggle:hover {
  background: rgba(0, 0, 0, 0.72);
}

/* Texto del banner */
.banner-copy {
  padding: 14px 16px;
  background: transparent;
  text-align: center;
}

.banner-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--secondary);
}

.banner-text {
  margin: 0;
  color: #333;
  line-height: 1.6;
  font-size: 15px;
  color: var(--primary);
}

/* =========================
   Product image zoom modal
========================= */

.img-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 2000; /* por encima de header (10) y sidebars (1000/1100) */
  background: var(--gray);
  display: flex;
  flex-direction: column;
}

.img-zoom-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--black);
}

.img-zoom-counter {
  font-weight: 700;
  font-size: 14px;
  user-select: none;
}

.img-zoom-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.25);
  color: var(--black);
  font-size: 20px;
  cursor: pointer;
}

.img-zoom-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 6px;
  min-height: 0;
  overflow: hidden;   /* clave: recorta dentro del marco */
  position: relative; /* para posicionar capas */
}

.img-zoom-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-zoom-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.img-zoom-layer img {
  max-width: min(1200px, 96vw);
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.img-zoom-bottombar {
  padding: 12px 12px 16px;
}

.img-zoom-strip {
  display: flex;
  align-items: center;
  justify-content: center; /* centra TODO el grupo */
  gap: 10px;
}

/*Flechas de navegación*/
.img-zoom-nav {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.25);
  color: var(--black);
  font-size: 18px;
  cursor: pointer;
}

/* Hover flechas (solo desktop) */
@media (hover: hover) and (pointer: fine) {
  .img-zoom-nav {
    transition:
      transform 180ms cubic-bezier(.22,.61,.36,1),
      background-color 180ms ease,
      border-color 180ms ease;
  }

  .img-zoom-nav:hover:not(:disabled) {
    background-color: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.35);
    transform: scale(1.06);
  }

  .img-zoom-nav:active:not(:disabled) {
    transform: scale(0.98);
  }
}

/*Miniaturas*/
.img-zoom-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;              /* móvil: deslizar */
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
  max-width: min(820px, 78vw);
}

.img-zoom-thumbbtn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  flex: 0 0 auto;
}

.img-zoom-thumbframe {
  display: block;
  padding: 4px;
}

.img-zoom-thumbframe img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent;
  border-radius: 10px;
  display: block;
}

.img-zoom-thumbbtn.is-active .img-zoom-thumbframe {
  border-color: var(--black); /* el frame-box ya tiene borde, aquí lo hacemos destacar */
}

/* Desktop: cursor y un poquito más de aire */
@media (min-width: 769px) {
  .img-zoom-main { cursor: default; }
}

/* Navegar a la IZQUIERDA (prev):
   - la actual se mueve un poco a la derecha y sale hacia la izquierda
   - la nueva entra desde la derecha
*/
.img-leave-left  { animation: leaveLeft 520ms cubic-bezier(.22,.61,.36,1) both; }
.img-enter-right { animation: enterRight 520ms cubic-bezier(.22,.61,.36,1) both; }

/* Navegar a la DERECHA (next):
   - la actual se mueve un poco a la izquierda y sale hacia la derecha
   - la nueva entra desde la izquierda
*/
.img-leave-right { animation: leaveRight 520ms cubic-bezier(.22,.61,.36,1) both; }
.img-enter-left  { animation: enterLeft 520ms cubic-bezier(.22,.61,.36,1) both; }

@keyframes leaveLeft {
  0%   { transform: translateX(0); opacity: 1; }
  36%  { transform: translateX(18px); opacity: 1; }      /* pre-mov a la derecha */
  100% { transform: translateX(-115%); opacity: .98; }   /* sale a la izquierda */
}

@keyframes enterRight {
  0%   { transform: translateX(115%); opacity: 0; }
  36%  { transform: translateX(115%); opacity: 0; }    /* HOLD invisible (igual al pre-mov) */
  37%  { transform: translateX(115%); opacity: .98; }  /* aparece y comienza */
  100% { transform: translateX(0);    opacity: 1; }
}

@keyframes leaveRight {
  0%   { transform: translateX(0); opacity: 1; }
  36%  { transform: translateX(-18px); opacity: 1; }     /* pre-mov a la izquierda */
  100% { transform: translateX(115%); opacity: .98; }    /* sale a la derecha */
}

@keyframes enterLeft {
  0%   { transform: translateX(-115%); opacity: 0; }
  36%  { transform: translateX(-115%); opacity: 0; }   /* HOLD invisible */
  37%  { transform: translateX(-115%); opacity: .98; }
  100% { transform: translateX(0);     opacity: 1; }
}

/* =========================
   Familia de producto (hermanos)
========================= */
.product-family {
  margin-top: 12px;
}

.family-label {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 14px;
}

.family-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.family-btn {
  padding: 10px 14px;
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.family-btn:hover {
  background-color: rgba(0,0,0,0.05);
  border-color: var(--secondary);
}

.family-btn.is-active {
  color: var(--white);
  border-color: var(--secondary);
  background-color: var(--secondary);
}

/* =========================
   Variaciones de producto
========================= */
.product-variations {
  margin-top: 12px;
}

.variations-label {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 14px;
}

.variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variation-btn {
  padding: 10px 14px;
  background: var(--white);
  color: var(--secondary);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.variation-btn:hover {
  border-color: rgba(0,0,0,0.35);
  background-color: rgba(0,0,0,0.02);
}

.variation-btn.is-active {
  color: var(--secondary);
  border-color: var(--secondary);
  background-color: rgba(0,0,0,0.04);
}

/* =========================
   Transición detalle de producto
========================= */
.pd-fade {
  transition: opacity 160ms ease, transform 160ms ease;
}

.pd-fade-out {
  opacity: 0;
  transform: translateY(6px);
}

.pd-fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Paginas estaticas
========================= */
.static-page-view {
  width: 100%;
  margin: 0;
  padding: 18px 35px 24px; /* mismo margen lateral que header desktop */
}

.static-page-card {
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 22px 24px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.static-page-card h1 {
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: 1.35rem;
  text-align: center;
}

.static-page-card p {
  margin: 0 0 12px;
  line-height: 1.6;
  color: var(--primary);
  text-align: justify;
}

.static-page-list {
  margin: 0 0 12px 20px;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--primary);
}

.static-page-list li {
  line-height: 1.6;
  text-align: justify;
}

.static-page-tip {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(31, 59, 115, 0.06);
  border: 1px solid rgba(31, 59, 115, 0.15);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.015);
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--secondary);
}

.faq-item p {
  margin: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.contact-panel {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.015);
  margin-bottom: 12px;
}

.contact-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--secondary);
}

.contact-panel p {
  margin: 0 0 8px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--secondary);
  background: #fff;
  font-weight: 600;
}

.contact-cta-primary {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
}

@media (max-width: 767px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 864px) {
  .static-page-view {
    padding: 16px 25px 22px; /* mismo margen lateral que header tablet/movil */
  }

  .static-page-card {
    padding: 18px 18px 12px;
  }
}

/* =========================
   WhatsApp policy modal
========================= */
.wa-policy-overlay {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wa-policy-overlay.show {
  display: flex;
}

.wa-policy-modal {
  width: min(760px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  padding: 18px 18px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  color: #111;
}

.wa-policy-modal h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  color: var(--secondary);
}

.wa-policy-modal p {
  margin: 0 0 10px;
  line-height: 1.45;
  font-size: 0.94rem;
}

.wa-policy-modal ul {
  margin: 0 0 12px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.wa-policy-modal li {
  line-height: 1.45;
  font-size: 0.93rem;
}

.wa-policy-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.wa-policy-btn {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
}

.wa-policy-accept {
  background: var(--secondary);
  color: #fff;
}

.wa-policy-cancel {
  background: #ececec;
  color: #333;
}

body.wa-policy-open {
  overflow: hidden;
}

@media (max-width: 864px) {
  .wa-policy-modal {
    max-height: 90vh;
    padding: 14px 14px 12px;
  }

  .wa-policy-actions {
    justify-content: stretch;
    gap: 8px;
  }

  .wa-policy-btn {
    flex: 1;
  }
}
