/*
Theme Name:   Perijapp Astra Child
Description:  Tema hijo de Astra para Perijapp.com — homepage estilo marketplace
Author:       Perijapp
Template:     astra
Version:      1.1.1
Text Domain:  perijapp-child
*/

/* ================================================
   RESET
================================================ */

/* Skip link accesibilidad — invisible hasta Tab */
.pj-skip-link {
    position: absolute;
    top: -200px;
    left: 0;
    background: #1a2e44;
    color: #fff;
    padding: 8px 16px;
    z-index: 99999;
    font-size: 14px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transition: top 0.15s;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}
.pj-skip-link:focus {
    top: 0;
    clip: auto;
    overflow: visible;
    white-space: normal;
}

/* Imágenes optimizadas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contenido principal */
#pj-main {
    display: block;
    width: 100%;
}
*, *::before, *::after { box-sizing: border-box; }

body {
    background: #f2f3f5 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ocultar header y footer ORIGINAL de Astra en todas las páginas
   (usamos nuestro propio header.php) */
.site-header,
#masthead,
.ast-primary-header-bar,
.ast-above-header,
.ast-below-header,
.site-footer,
#colophon,
.ast-site-footer-wrap {
    display: none !important;
}

/* Quitar padding/margin que Astra agrega al contenido en la home */
.home .site-content,
.home #content,
.home .ast-container,
.home .entry-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.home .ast-article-single,
.home .entry-header,
.home h1.entry-title {
    display: none !important;
}

/* ================================================
   PÁGINAS INTERNAS (categorías, producto, carrito)
================================================ */

/* Ocultar título de categoría, breadcrumb y contador */
.woocommerce-breadcrumb,
.ast-breadcrumbs-wrapper,
.woocommerce-products-header,
.woocommerce-products-header__title,
.woocommerce-result-count,
.product_cat .woocommerce-loop-category__title,
nav.woocommerce-breadcrumb {
    display: none !important;
}

/* ---- Wrapper principal en páginas internas ----
   Astra usa #primary > .site-content > #content > .entry-content
   y también .ast-container. Cubrimos todas las rutas posibles.
*/
body:not(.home) #primary,
body:not(.home) #main,
body:not(.home) .site-main,
body:not(.home) #content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Contenedor real de WooCommerce — aquí sí aplicamos el padding lateral */
body:not(.home) .woocommerce:not(#perijapp-header *),
body:not(.home) .woocommerce-page:not(.home) #primary .woocommerce,
.tax-product_cat #primary .woocommerce,
.woocommerce-shop #primary .woocommerce {
    padding: 12px 12px 70px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Página de producto individual
   (mayor especificidad que "body:not(.home) #primary" para que SÍ aplique) */
body.single-product:not(.home) #primary,
.single-product #primary {
    padding: 16px 12px 60px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Evitar doble padding: el wrapper .woocommerce interno no necesita
   su propio padding/máx-ancho aquí, #primary ya lo aplica */
body.single-product #primary .woocommerce,
body.single-product:not(.home) #primary .woocommerce {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* ================================================
   PÁGINA DE PRODUCTO INDIVIDUAL
================================================ */
.single-product .product {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 768px) {
    .single-product .product {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        align-items: start;
    }
}
/* Evitar márgenes/espacios extra que Astra añade al resumen del producto
   (causaban un hueco blanco grande antes de la descripción en móvil) */
.single-product .product > .summary,
.single-product .product > .entry-summary {
    margin: 0 !important;
    padding: 0 !important;
}
.single-product .summary > *:last-child {
    margin-bottom: 0 !important;
}

.single-product .woocommerce-product-gallery {
    background: #f8f8f8;
    border-radius: 12px;
    overflow: hidden;
}
.single-product .woocommerce-product-gallery img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.single-product .product_title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2e44;
    margin: 0 0 6px;
    line-height: 1.3;
}

.single-product .price {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #e84040 !important;
    margin: 4px 0 !important;
    display: block;
}
.single-product .price del .woocommerce-Price-amount {
    font-size: 15px !important;
    color: #aaa !important;
    font-weight: 500 !important;
}
.single-product .price br {
    display: none;
}
.single-product .perijapp-precio-bs,
.single-product .perijapp-precio-cop,
.single-product small.perijapp-precio-bs,
.single-product small.perijapp-precio-cop {
    display: block !important;
    font-size: 13px !important;
    color: #666 !important;
    font-weight: 400 !important;
    margin: 0 0 2px !important;
}

.single-product .woocommerce-product-details__short-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
}

.single-product .stock {
    font-size: 13px;
    color: #2e7d32;
    font-weight: 600;
    margin: 6px 0;
}
.single-product .stock.out-of-stock {
    color: #c0392b;
}

/* Formulario de cantidad + botón */
.single-product form.cart {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}
.single-product form.cart .quantity {
    margin: 0;
}
.single-product form.cart .quantity input.qty {
    width: 64px;
    padding: 10px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}
.single-product form.cart button.single_add_to_cart_button {
    background: #1a2e44 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.15s;
    flex: 1 1 auto;
    text-align: center;
}
.single-product form.cart button.single_add_to_cart_button:hover {
    background: #2d4f74 !important;
}

/* Categorías del producto */
.single-product .product_meta {
    font-size: 12px;
    color: #888;
    margin-top: 14px;
}
.single-product .product_meta a {
    color: #1a2e44;
    text-decoration: none;
    font-weight: 600;
}
.single-product .product_meta a:hover { text-decoration: underline; }

/* Pestañas (Descripción / Valoraciones)
   En móvil el grid ya separa las filas con su "gap"; no añadimos margen
   superior extra para evitar el hueco blanco grande entre "Categorías" y
   "Descripción". En PC sí ponemos separación porque van a ancho completo. */
.single-product .woocommerce-tabs {
    margin-top: 0;
    grid-column: 1 / -1;
}
@media (min-width: 768px) {
    .single-product .woocommerce-tabs { margin-top: 20px; }
}
.single-product .woocommerce-tabs ul.tabs {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid #ebebeb;
}
.single-product .woocommerce-tabs ul.tabs li {
    margin: 0;
}
.single-product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 9px 16px;
    border-radius: 20px 20px 0 0;
    color: #888;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.single-product .woocommerce-tabs ul.tabs li.active a,
.single-product .woocommerce-tabs ul.tabs li a:hover {
    background: #eef2f7;
    color: #1a2e44;
}
.single-product .woocommerce-tabs .panel {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

/* Productos relacionados */
.single-product .related.products {
    margin-top: 20px;
    grid-column: 1 / -1;
}
.single-product .related.products > h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a2e44;
    margin: 0 0 12px;
}

/* "Más de esta categoría" — scroll infinito en página de producto
   (se renderiza con woocommerce_after_single_product, FUERA del grid .product,
   así que va a ancho completo del contenedor) */
.single-product .pj-more-from-cat {
    margin-top: 24px;
    clear: both;
}
.single-product .pj-more-from-cat .pj-section-title {
    padding: 0 0 10px;
    max-width: none;
    margin: 0;
}
.single-product .pj-more-from-cat #perijapp-products {
    padding: 0 0 40px;
    max-width: none;
}

/* Título de categoría compacto */
.woocommerce-page h1.page-title,
.tax-product_cat h1.page-title {
    font-size: 18px !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #1a2e44 !important;
    font-weight: 700 !important;
}

/* Breadcrumb custom — mostramos el que viene después del header */
.ast-breadcrumbs-wrapper.ast-breadcrumbs-outer-wrapper {
    display: block !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    color: #888 !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* Ordenar por */
.woocommerce-ordering {
    margin-bottom: 10px !important;
}

/* Quitar padding doble que Astra agrega al .ast-container en páginas internas */
body:not(.home) .ast-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

/* Ancho completo para el bloque de categoría — y quitar la "tarjeta" de Astra
   (fondo/borde/sombra del contenedor separado) que dibujaba un cuadro feo
   alrededor de Mi Cuenta, Carrito y la página de producto. */
body:not(.home) .ast-article-post,
body:not(.home) .ast-article-single,
body:not(.home).ast-separate-container .ast-article-post,
body:not(.home).ast-separate-container .ast-article-single {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
/* El contenedor separado de Astra a veces tiene su propio fondo de tarjeta */
body:not(.home).ast-separate-container .site-content .ast-container,
body:not(.home).ast-separate-container #primary {
    background: transparent !important;
    box-shadow: none !important;
}

/* ================================================
   GRID DE PRODUCTOS EN CATEGORÍAS
   — especificidad alta para superar astra-theme-dynamic-css
================================================ */

/* Reset completo del ul.products que Astra rompe */
.woocommerce-page ul.products,
.tax-product_cat ul.products,
.woocommerce ul.products.columns-1,
.woocommerce ul.products.columns-2,
.woocommerce ul.products.columns-3,
.woocommerce ul.products.columns-4,
.woocommerce ul.products.columns-5,
ul.products.columns-1,
ul.products.columns-2,
ul.products.columns-3,
ul.products.columns-4,
ul.products.columns-5,
ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

@media (min-width: 580px) {
    .woocommerce-page ul.products,
    .tax-product_cat ul.products,
    ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 860px) {
    .woocommerce-page ul.products,
    .tax-product_cat ul.products,
    ul.products { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (min-width: 1100px) {
    .woocommerce-page ul.products,
    .tax-product_cat ul.products,
    ul.products { grid-template-columns: repeat(5, 1fr) !important; }
}

/* ---- Tarjeta individual ----
   Doble clase para ganar a Astra sin recurrir solo a !important en todo
*/
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product {
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #ebebeb !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: box-shadow 0.2s, transform 0.2s !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    /* Anular cualquier width% que Astra inyecte via JS/CSS dinámico */
    min-width: 0 !important;
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover,
ul.products li.product:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.11) !important;
    transform: translateY(-2px) !important;
}

/* Imagen */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product a img,
.woocommerce-page ul.products li.product img,
ul.products li.product a img,
ul.products li.product img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    display: block !important;
    margin: 0 !important;
    /* Anular el padding/margin que Astra pone en .attachment-woocommerce_thumbnail */
    padding: 0 !important;
}

/* Nombre */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product h2,
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
    font-size: 12.5px !important;
    padding: 8px 10px 4px !important;
    margin: 0 !important;
    color: #333 !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

/* Precio */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
ul.products li.product .price {
    padding: 2px 10px 6px !important;
    margin: 0 !important;
    display: block !important;
}

.woocommerce ul.products li.product .price .woocommerce-Price-amount,
.woocommerce-page ul.products li.product .price .woocommerce-Price-amount,
ul.products li.product .price .woocommerce-Price-amount {
    color: #e84040 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

.woocommerce ul.products li.product .price del .woocommerce-Price-amount,
.woocommerce-page ul.products li.product .price del .woocommerce-Price-amount,
ul.products li.product .price del .woocommerce-Price-amount {
    color: #aaa !important;
    font-size: 12px !important;
}

/* Bs. y COP en categorías */
.woocommerce ul.products li.product .perijapp-precio-bs,
.woocommerce ul.products li.product small.perijapp-precio-bs,
.woocommerce-page ul.products li.product .perijapp-precio-bs,
.woocommerce-page ul.products li.product small.perijapp-precio-bs,
ul.products li.product .perijapp-precio-bs,
ul.products li.product small.perijapp-precio-bs {
    display: block !important;
    font-size: 11px !important;
    color: #666 !important;
    padding: 0 10px !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product .perijapp-precio-cop,
.woocommerce ul.products li.product small.perijapp-precio-cop,
.woocommerce-page ul.products li.product .perijapp-precio-cop,
.woocommerce-page ul.products li.product small.perijapp-precio-cop,
ul.products li.product .perijapp-precio-cop,
ul.products li.product small.perijapp-precio-cop {
    display: block !important;
    font-size: 11px !important;
    color: #888 !important;
    padding: 0 10px 4px !important;
    margin: 0 !important;
}

/* Botón agregar al carrito */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce-page ul.products li.product .button,
.woocommerce-page ul.products li.product .add_to_cart_button,
ul.products li.product .button,
ul.products li.product .add_to_cart_button {
    display: block !important;
    width: calc(100% - 20px) !important;
    margin: auto 10px 10px !important;
    background: #1a2e44 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 9px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    box-shadow: none !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover,
.woocommerce-page ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .add_to_cart_button:hover,
ul.products li.product .button:hover,
ul.products li.product .add_to_cart_button:hover {
    background: #2d4f74 !important;
    color: #fff !important;
}

/* Categoría encima del nombre */
.woocommerce ul.products li.product .ast-woo-product-category,
.woocommerce-page ul.products li.product .ast-woo-product-category,
ul.products li.product .ast-woo-product-category {
    font-size: 10px !important;
    color: #999 !important;
    padding: 6px 10px 0 !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ================================================
   HEADER PERSONALIZADO
================================================ */
#perijapp-header {
    background: #1a2e44;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.pj-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 12px;
}

.pj-logo {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    flex-shrink: 0;
}

.pj-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.pj-logo-text {
    font-weight: 800;
    font-size: 12px;
    color: #1a2e44;
    text-align: center;
    line-height: 1.2;
}

.pj-header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pj-header-icons a {
    color: #fff;
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.pj-header-icons a:hover { opacity: 0.75; }

.pj-header-icons svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pj-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e84040;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ================================================
   BUSCADOR
================================================ */
.pj-search-form {
    display: flex;
    align-items: center;
    background: #f2f3f5;
    border-radius: 24px;
    padding: 0 6px 0 14px;
    max-width: 800px;
    margin: 0 auto;
    border: 1.5px solid #e0e0e0;
    transition: border-color 0.2s;
}

.pj-search-form:focus-within {
    border-color: #1a2e44;
}

.pj-search-form input[type="search"] {
    border: none;
    background: transparent;
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
    outline: none;
    -webkit-appearance: none;
}

.pj-search-form input::placeholder { color: #aaa; }

/* ---- BUSCADOR EN HEADER (móvil y desktop) ---- */
#pj-header-search-desktop {
    display: flex;
    flex: 1;
    min-width: 0;
    max-width: 500px;
}

#pj-header-search-desktop .pj-search-form {
    width: 100%;
    max-width: 100% !important;
    margin: 0;
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
}

#pj-header-search-desktop .pj-search-form:focus-within {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
}

#pj-header-search-desktop .pj-search-form input[type="search"] {
    color: #fff;
    font-size: 13px;
    width: 100%;
}

#pj-header-search-desktop .pj-search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

#pj-header-search-desktop .pj-search-form button {
    background: rgba(255,255,255,0.2) !important;
}

#pj-header-search-desktop .pj-search-form button:hover {
    background: rgba(255,255,255,0.35) !important;
}

@media (min-width: 768px) {
    .pj-header-inner {
        gap: 20px;
    }
    #pj-header-search-desktop {
        max-width: 900px;
        flex: 1 1 auto;
        width: 100%;
    }
}

.pj-search-form button {
    background: #1a2e44 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    padding: 0 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    margin: 5px 4px 5px 0 !important;
    transition: background 0.2s;
    box-shadow: none !important;
}

.pj-search-form button:hover { background: #2d4f74; }

.pj-search-form button svg {
    width: 13px;
    height: 13px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* ================================================
   FRANJA PROMO
================================================ */
#perijapp-promo {
    background: #fff8e1;
    border-bottom: 1px solid #ffe082;
    padding: 7px 16px;
    text-align: center;
    font-size: 12.5px;
    color: #7a5c00;
}

/* ================================================
   CATEGORÍAS DESLIZANTES — solo texto (pills)
================================================ */
#perijapp-cats {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.pj-cats-scroll {
    display: flex;
    gap: 8px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding: 0 14px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    touch-action: pan-x;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    will-change: scroll-position;
}

.pj-cats-scroll:active { cursor: grabbing; }
.pj-cats-scroll::-webkit-scrollbar { display: none; }

.pj-cat-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #e0e0e0;
    background: #f8f8f8;
    font-size: 13px;
    color: #444;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pj-cat-item:hover {
    background: #eef2f7;
    border-color: #1a2e44;
    color: #1a2e44;
}

.pj-cat-item.active {
    background: #1a2e44;
    border-color: #1a2e44;
    color: #fff;
    font-weight: 600;
}

/* "Todo" como botón (abre el panel) — mismo look que las demás pills */
.pj-cat-item-menu {
    font-family: inherit;
    cursor: pointer;
    gap: 6px;
}
.pj-cat-item-menu svg { flex-shrink: 0; }

/* ================================================
   PANEL "TODO" (drawer lateral)
================================================ */
#pj-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 45, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 10010;
}
#pj-menu-overlay.pj-open {
    opacity: 1;
    visibility: visible;
}

#pj-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 86%;
    max-width: 340px;
    background: #fff;
    z-index: 10011;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    overflow: hidden;
}
#pj-menu-drawer.pj-open {
    transform: translateX(0);
}

.pj-drawer-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #1a2e44;
    color: #fff;
    padding: 18px 16px;
    flex-shrink: 0;
}
.pj-drawer-account-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}
.pj-drawer-account-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    flex-shrink: 0;
}
.pj-drawer-account-text {
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pj-drawer-account-text strong { font-weight: 700; }

#pj-menu-close {
    background: transparent;
    border: none;
    color: #fff;
    padding: 6px;
    line-height: 0;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.15s;
}
#pj-menu-close:hover { background: rgba(255,255,255,0.12); }

.pj-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0 24px;
}

.pj-drawer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pj-drawer-menu li { margin: 0; }
.pj-drawer-menu a {
    display: block;
    padding: 13px 18px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.12s;
}
.pj-drawer-menu a:hover,
.pj-drawer-menu a:active { background: #f5f6f8; }

.pj-drawer-section {
    display: block;
    padding: 14px 18px 6px;
    font-size: 17px;
    font-weight: 700;
    color: #1a2e44;
}

.pj-drawer-divider {
    height: 1px;
    background: #eef0f2;
    margin: 10px 0;
}

/* Secciones colapsables con submenú */
.pj-drawer-section-toggle > .pj-drawer-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-right: 18px;
}
.pj-drawer-section-toggle > .pj-drawer-section::after {
    content: '';
    width: 9px;
    height: 9px;
    border-right: 2px solid #8a93a0;
    border-bottom: 2px solid #8a93a0;
    transform: rotate(-45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.pj-drawer-section-toggle.pj-expanded > .pj-drawer-section::after {
    transform: rotate(45deg);
}
.pj-drawer-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.pj-drawer-section-toggle.pj-expanded .pj-drawer-submenu {
    max-height: 1000px;
}
.pj-drawer-submenu a { padding-left: 32px; font-size: 14px; color: #5a6a7a; }

/* ================================================
   BANNERS
================================================ */
#perijapp-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 12px 4px;
    max-width: 1200px;
    margin: 0 auto;
}

.pj-banner {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    transition: transform 0.2s;
}

.pj-banner:hover { transform: translateY(-2px); }

.pj-banner img.pj-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pj-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.05) 60%);
}

.pj-banner-emoji {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 34px;
    opacity: 0.65;
}

.pj-banner-content {
    position: relative;
    z-index: 2;
    padding: 11px 13px;
}

.pj-banner-tag {
    font-size: 9.5px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 3px;
}

.pj-banner-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.pj-banner-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.82);
    margin-top: 3px;
}

.pj-banner-1 { background: linear-gradient(135deg, #1a2e44, #2d6a9f); }
.pj-banner-2 { background: linear-gradient(135deg, #c0392b, #e74c3c); }

/* ================================================
   SECCIÓN PRODUCTOS
================================================ */
.pj-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 14px 8px;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 16px;
    font-weight: 700;
    color: #1a2e44;
}

.pj-section-title .pj-icon { font-size: 18px; }

/* ================================================
   GRID DE PRODUCTOS
================================================ */
#perijapp-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 12px 90px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 580px)  { #perijapp-products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px)  { #perijapp-products { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { #perijapp-products { grid-template-columns: repeat(5, 1fr); } }

.pj-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ebebeb;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

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

.pj-product-card a { text-decoration: none; color: inherit; }

.pj-prod-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
}

.pj-prod-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.pj-product-card:hover .pj-prod-image img { transform: scale(1.05); }

/* Placeholder sin imagen */
.pj-prod-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    background: #f8f8f8;
}

.pj-prod-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e84040;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 5px;
    padding: 2px 7px;
    z-index: 2;
}

.pj-prod-badge.pj-badge-new  { background: #f39c12; }
.pj-prod-badge.pj-badge-hot  { background: #e67e22; }



.pj-prod-info {
    padding: 8px 10px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pj-prod-name {
    font-size: 12.5px;
    color: #333;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pj-price-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 3px;
}

.pj-price-row .price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

/* Los <br> que añade el plugin de precios son hijos directos de
   .pj-price-row (van DESPUÉS de </span class="price">), no dentro de
   .price. Dentro de un flex container cada <br> se vuelve un elemento
   de bloque y ocupa su propia línea, generando espacios verticales
   extra entre el precio en $ y las líneas de Bs./COP. Se ocultan. */
.pj-price-row br {
    display: none;
}

/* Sobreescribir estilos de precio de WooCommerce */
.pj-price-row .woocommerce-Price-amount,
.pj-price-row ins .woocommerce-Price-amount {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #e84040 !important;
}

.pj-price-row del .woocommerce-Price-amount {
    font-size: 12px !important;
    color: #aaa !important;
}

/* Precio en Bs. y COP debajo del precio en $ */
.pj-price-row .perijapp-precio-bs,
.pj-price-row small.perijapp-precio-bs,
.pj-price-row .perijapp-precio-cop,
.pj-price-row small.perijapp-precio-cop {
    display: block !important;
    flex-basis: 100% !important;
    font-size: 11px !important;
    color: #666 !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* COP en color ligeramente diferente para distinguir */
.pj-price-row small.perijapp-precio-cop,
.pj-price-row .perijapp-precio-cop {
    color: #888 !important;
}

.pj-prod-stars {
    font-size: 11px;
    color: #f39c12;
}

/* Botón agregar al carrito / ver opciones */
.pj-product-card .pj-add-btn {
    display: block;
    width: 100%;
    background: #1a2e44 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 0 12px 12px !important;
    padding: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
    transition: background 0.2s;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.pj-product-card .pj-add-btn:hover,
.pj-product-card .pj-add-btn:focus { background: #2d4f74 !important; color: #fff !important; }

.pj-product-card .pj-add-btn.added::after { display: none !important; }

/* "Ver carrito" — centrado y discreto */
.pj-product-card .added_to_cart,
.pj-product-card a.added_to_cart,
.pj-product-card .added_to_cart.wc-forward {
    display: block !important;
    text-align: center !important;
    font-size: 11px !important;
    color: #888 !important;
    padding: 4px 0 6px !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    box-shadow: none !important;
}
.pj-product-card .added_to_cart:hover {
    color: #1a2e44 !important;
    text-decoration: underline !important;
}



/* ================================================
   SEGUIR VIENDO
================================================ */
#pj-seguir-viendo {
    max-width: 1200px;
    margin: 0 auto;
}

.pj-products-grid-recent {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 12px 4px;
}

@media (min-width: 580px)  { .pj-products-grid-recent { grid-template-columns: repeat(5, 1fr); } }

/* Las tarjetas de "Seguir viendo" usan el mismo estilo que .pj-product-card */
#pj-recent-grid .pj-product-card {
    width: 100%;
}

/* ================================================
   VACÍO / LOADING
================================================ */
.pj-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #aaa;
    font-size: 15px;
}

/* ================================================
   ENCABEZADO DE PÁGINA (Mi cuenta / Carrito)
================================================ */

/* Ocultar el título por defecto de Astra en estas páginas,
   usamos nuestro propio .pj-page-heading */
.pj-account-page .entry-header,
.pj-account-page h1.entry-title,
.pj-account-page h1.page-title,
.pj-cart-page .entry-header,
.pj-cart-page h1.entry-title,
.pj-cart-page h1.page-title {
    display: none !important;
}

.pj-page-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px 6px;
}
.pj-page-heading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef2f7;
    color: #1a2e44;
    flex-shrink: 0;
}
.pj-page-heading h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1a2e44;
    margin: 0;
    padding: 0;
}

/* ================================================
   AVISOS DE WOOCOMMERCE (mensajes, info, errores)
   Ej: "Tu cuenta está usando una contraseña temporal..."
================================================ */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-error,
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error {
    max-width: 1200px;
    margin: 0 auto 14px;
    list-style: none;
    background: #eef2f7;
    border: 1px solid #dbe4ee;
    border-left: 4px solid #1a2e44;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #2c3e50;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.woocommerce-account .woocommerce-error {
    background: #fdecea;
    border-color: #f6d4d0;
    border-left-color: #c0392b;
    color: #7a2c22;
}
.woocommerce-account .woocommerce-message::before,
.woocommerce-account .woocommerce-info::before,
.woocommerce-account .woocommerce-error::before,
.woocommerce-cart .woocommerce-message::before,
.woocommerce-cart .woocommerce-info::before,
.woocommerce-cart .woocommerce-error::before {
    content: none !important;
    display: none !important;
}
.woocommerce-account .woocommerce-message a,
.woocommerce-account .woocommerce-info a,
.woocommerce-cart .woocommerce-message a,
.woocommerce-cart .woocommerce-info a {
    color: #1a2e44;
    font-weight: 700;
    text-decoration: underline;
}
/* Botón dentro del aviso (ej. "Ver pedido") */
.woocommerce-account .woocommerce-message .button,
.woocommerce-account .woocommerce-info .button {
    background: #1a2e44 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap;
    margin-left: auto;
}

/* ================================================
   MI CUENTA
================================================ */
.woocommerce-account .woocommerce {
    padding: 0 16px 70px !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    margin: 12px auto 16px;
    max-width: 1200px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 9px 16px;
    border-radius: 20px;
    border: 1.5px solid #e0e0e0;
    background: #f8f8f8;
    color: #444;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
    background: #eef2f7;
    border-color: #1a2e44;
    color: #1a2e44;
}
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    background: #1a2e44;
    border-color: #1a2e44;
    color: #fff;
    font-weight: 600;
}

.woocommerce-account .woocommerce-MyAccount-content {
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 0 20px;
    box-shadow: none;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

.woocommerce-account .woocommerce-MyAccount-content p:first-child {
    margin-top: 0;
}

.woocommerce-account .woocommerce-MyAccount-content a {
    color: #1a2e44;
    font-weight: 600;
    text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-content a:hover {
    text-decoration: underline;
}

/* Formularios de login / registro */
.woocommerce-account form.woocommerce-form-login,
.woocommerce-account form.woocommerce-form-register,
.woocommerce-account form.edit-account,
.woocommerce-account form.woocommerce-EditAccountForm,
.woocommerce-account form.woocommerce-address-fields {
    max-width: 420px;
}

.woocommerce-account .form-row label,
.woocommerce-account .woocommerce-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #1a2e44;
    margin-bottom: 4px;
    display: block;
}

.woocommerce-account .input-text,
.woocommerce-account input[type="text"],
.woocommerce-account input[type="email"],
.woocommerce-account input[type="password"],
.woocommerce-account input[type="tel"],
.woocommerce-account select,
.woocommerce-account textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
}
.woocommerce-account .input-text:focus,
.woocommerce-account input:focus,
.woocommerce-account select:focus,
.woocommerce-account textarea:focus {
    border-color: #1a2e44;
    background: #fff;
    outline: none;
}

.woocommerce-account button.woocommerce-button,
.woocommerce-account input.woocommerce-button,
.woocommerce-account .button {
    background: #1a2e44 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 11px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.15s;
}
.woocommerce-account button.woocommerce-button:hover,
.woocommerce-account input.woocommerce-button:hover,
.woocommerce-account .button:hover {
    background: #2d4f74 !important;
    color: #fff !important;
}

/* Tabla de pedidos */
.woocommerce-account table.shop_table,
.woocommerce-cart table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    font-size: 13px;
}
.woocommerce-account table.shop_table th,
.woocommerce-cart table.shop_table th {
    background: #f5f6f8;
    color: #1a2e44;
    font-weight: 700;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #ebebeb;
}
.woocommerce-account table.shop_table td,
.woocommerce-cart table.shop_table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.woocommerce-account table.shop_table tr:last-child td {
    border-bottom: none;
}

/* ================================================
   CARRITO
================================================ */
.woocommerce-cart .woocommerce {
    padding: 0 16px 90px !important;
}

.woocommerce-cart table.shop_table img {
    border-radius: 8px;
    width: 56px;
    height: 56px;
    object-fit: cover;
}

.woocommerce-cart table.shop_table td.product-name a {
    color: #1a2e44;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}
.woocommerce-cart table.shop_table td.product-name a:hover { text-decoration: underline; }

.woocommerce-cart table.shop_table td.product-quantity input.qty {
    width: 56px;
    padding: 6px 8px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

.woocommerce-cart table.shop_table td.product-remove a.remove {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fdecea;
    text-decoration: none;
    transition: background 0.15s;
    position: relative;
    /* Ocultar cualquier glifo/ícono por defecto (×, fuente de iconos de Astra, etc.)
       y dibujar nuestra propia X con dos líneas — evita el efecto "X atravesada" */
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    overflow: hidden;
}
.woocommerce-cart table.shop_table td.product-remove a.remove::before,
.woocommerce-cart table.shop_table td.product-remove a.remove::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #c0392b;
    border-radius: 1px;
}
.woocommerce-cart table.shop_table td.product-remove a.remove::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.woocommerce-cart table.shop_table td.product-remove a.remove::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.woocommerce-cart table.shop_table td.product-remove a.remove:hover {
    background: #f7d3cf;
}

/* Subtotales y precios */
.woocommerce-cart table.shop_table .woocommerce-Price-amount {
    color: #1a2e44;
    font-weight: 700;
}

/* Cupón */
.woocommerce-cart .coupon {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 16px;
}
.woocommerce-cart .coupon .input-text {
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    max-width: 220px;
}
.woocommerce-cart .coupon button,
.woocommerce-cart button[name="update_cart"] {
    background: #f5f6f8 !important;
    color: #1a2e44 !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.woocommerce-cart .coupon button:hover,
.woocommerce-cart button[name="update_cart"]:hover {
    background: #eef2f7 !important;
    border-color: #1a2e44 !important;
}

.woocommerce-cart .cart-collaterals {
    max-width: 460px;
    margin: 28px 0 0 auto;
    width: 100%;
}

@media (max-width: 859px) {
    .woocommerce-cart .cart-collaterals {
        max-width: 100%;
        margin: 24px 0 0;
    }
}

.woocommerce-cart .cart_totals {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 4px 0 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    width: 100%;
    box-sizing: border-box;
}
.woocommerce-cart .cart_totals h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a2e44;
    padding: 16px 18px 8px;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}
.woocommerce-cart .cart_totals table.shop_table,
.woocommerce-cart .cart_totals table.shop_table tbody {
    display: block;
    margin: 0;
    width: 100%;
    border: none;
}
/* Cada fila = etiqueta a la izquierda, valor a la derecha (flex, legible) */
.woocommerce-cart .cart_totals table.shop_table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 18px;
    border-bottom: 1px solid #f0f0f0;
}
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
    display: block;
    background: transparent;
    border: none !important;
    padding: 0;
    font-size: 14px;
}
.woocommerce-cart .cart_totals table.shop_table th {
    font-weight: 600;
    color: #1a2e44;
    white-space: nowrap;
    flex: 0 0 auto;
}
.woocommerce-cart .cart_totals table.shop_table td {
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
}
/* La fila de envío puede traer texto largo / calculadora: que ocupe todo
   el ancho debajo de la etiqueta en lugar de aplastarse a la derecha */
.woocommerce-cart .cart_totals tr.shipping td {
    flex: 1 1 100%;
    text-align: right;
}
.woocommerce-cart .cart_totals tr.shipping .woocommerce-shipping-destination,
.woocommerce-cart .cart_totals tr.shipping .shipping-calculator-form,
.woocommerce-cart .cart_totals tr.shipping ul#shipping_method {
    text-align: left;
    margin-top: 6px;
}
.woocommerce-cart .cart_totals tr.shipping ul#shipping_method {
    list-style: none;
    padding: 0;
}
.woocommerce-cart .cart_totals tr.shipping ul#shipping_method li {
    margin: 4px 0;
    font-size: 13px;
}
.woocommerce-cart .cart_totals .order-total {
    border-bottom: none !important;
    padding-top: 15px;
    padding-bottom: 6px;
}
.woocommerce-cart .cart_totals .order-total th {
    font-size: 16px;
    font-weight: 700;
}
.woocommerce-cart .cart_totals .order-total td {
    font-size: 16px;
    font-weight: 700;
}
.woocommerce-cart .cart_totals .order-total .woocommerce-Price-amount {
    font-size: 19px;
}
/* Totales secundarios en Bs. y COP (los añade perijapp-precios-unificado.php)
   — un poco más pequeños/discretos que el total principal en USD */
.woocommerce-cart .cart_totals tr.perijapp-total-bs,
.woocommerce-cart .cart_totals tr.perijapp-total-cop {
    padding-top: 4px;
    padding-bottom: 4px;
}
.woocommerce-cart .cart_totals tr.perijapp-total-bs th,
.woocommerce-cart .cart_totals tr.perijapp-total-cop th,
.woocommerce-cart .cart_totals tr.perijapp-total-bs td,
.woocommerce-cart .cart_totals tr.perijapp-total-cop td {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #5a6a7a !important;
}
.woocommerce-cart .cart_totals tr.perijapp-total-bs td strong,
.woocommerce-cart .cart_totals tr.perijapp-total-cop td strong {
    font-weight: 600 !important;
}
.woocommerce-cart .cart_totals .shipping-calculator-button {
    display: inline-block;
    margin-top: 4px;
    color: #1a2e44;
    font-weight: 600;
    text-decoration: underline;
}
.woocommerce-cart .cart_totals .woocommerce-shipping-calculator {
    font-size: 13px;
    line-height: 1.6;
}

.woocommerce-cart .wc-proceed-to-checkout {
    padding: 14px 16px 16px;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    display: block;
    text-align: center;
    background: #1a2e44 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 13px 18px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: background 0.15s;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background: #2d4f74 !important;
}

/* Carrito vacío */
.woocommerce-cart .cart-empty {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 24px 18px;
    text-align: center;
    color: #555;
    font-size: 14px;
}
.woocommerce-cart .return-to-shop {
    text-align: center;
    margin: 14px 0 0;
}
.woocommerce-cart .return-to-shop a.button {
    display: inline-block;
    background: #1a2e44 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 11px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Responsive: tabla del carrito en pantallas pequeñas */
@media (max-width: 640px) {
    .woocommerce-cart table.shop_table thead { display: none; }
    .woocommerce-cart table.shop_table,
    .woocommerce-cart table.shop_table tbody,
    .woocommerce-cart table.shop_table tr,
    .woocommerce-cart table.shop_table td {
        display: block;
        width: 100%;
    }
    .woocommerce-cart table.shop_table tr {
        position: relative;
        padding: 12px 40px 12px 78px;
        border-bottom: 1px solid #ebebeb;
        min-height: 70px;
        box-sizing: border-box;
    }
    .woocommerce-cart table.shop_table td {
        border: none !important;
        padding: 2px 0 !important;
        text-align: left !important;
    }
    .woocommerce-cart table.shop_table td.product-remove {
        position: absolute;
        top: 12px;
        right: 12px;
        width: auto;
        padding: 0 !important;
    }
    .woocommerce-cart table.shop_table td.product-thumbnail {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 56px;
    }
    .woocommerce-cart table.shop_table td.product-thumbnail a {
        display: block;
    }
    .woocommerce-cart table.shop_table td.product-thumbnail img {
        display: block;
        margin: 0;
    }
    .woocommerce-cart table.shop_table td.product-name {
        font-size: 13px;
        margin-bottom: 4px;
    }
    .woocommerce-cart table.shop_table td.product-price::before,
    .woocommerce-cart table.shop_table td.product-quantity::before,
    .woocommerce-cart table.shop_table td.product-subtotal::before {
        content: attr(data-title) ": ";
        font-weight: 600;
        color: #888;
        font-size: 11px;
    }
    .woocommerce-cart table.shop_table td.product-price,
    .woocommerce-cart table.shop_table td.product-quantity,
    .woocommerce-cart table.shop_table td.product-subtotal {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
    }
    .woocommerce-cart table.shop_table td.product-quantity .quantity {
        display: inline-flex;
    }
    .woocommerce-cart table.shop_table td.product-quantity input.qty {
        width: 48px;
        padding: 4px 6px;
    }
}

/* ================================================
   CARRITO — WooCommerce Cart Block (bloques de Gutenberg)
   Algunas instalaciones usan el bloque "Carrito" en lugar de
   la tabla clásica [woocommerce_cart]; estas reglas cubren ambos casos.
================================================ */
.wp-block-woocommerce-cart .wc-block-cart-items {
    width: 100%;
}
.wp-block-woocommerce-cart .wc-block-cart-item__image img {
    border-radius: 8px;
    width: 56px;
    height: 56px;
    object-fit: cover;
}
.wp-block-woocommerce-cart .wc-block-cart-item__remove-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fdecea;
    text-decoration: none;
    position: relative;
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
}
.wp-block-woocommerce-cart .wc-block-cart-item__remove-link::before,
.wp-block-woocommerce-cart .wc-block-cart-item__remove-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #c0392b;
    border-radius: 1px;
}
.wp-block-woocommerce-cart .wc-block-cart-item__remove-link::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.wp-block-woocommerce-cart .wc-block-cart-item__remove-link::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.wp-block-woocommerce-cart .wc-block-components-totals-wrapper,
.wp-block-woocommerce-cart .wc-block-cart__totals-title {
    width: 100%;
}
@media (max-width: 640px) {
    .wp-block-woocommerce-cart .wp-block-woocommerce-cart-order-summary-block,
    .wp-block-woocommerce-cart .wc-block-cart__totals-title {
        max-width: 100% !important;
    }
    .wp-block-woocommerce-cart .wc-block-cart-items__header {
        display: none;
    }
    .wp-block-woocommerce-cart .wc-block-cart-item__image {
        grid-row: span 2;
    }
}

/* ================================================
   FINALIZAR COMPRA (CHECKOUT)
   Mismo lenguaje visual que carrito y mi cuenta:
   azul marino #1a2e44, tarjetas limpias, bordes 8-12px.
================================================ */
.woocommerce-checkout .woocommerce {
    padding: 0 16px 90px !important;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Encabezado propio (lo añade pj_render_checkout_header) */
.woocommerce-checkout .pj-page-heading {
    margin: 14px auto 4px;
    max-width: 1200px;
}

/* Aviso de cupón / mensajes */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message {
    position: relative;
    background: #f5f8fc;
    border: 1px solid #dce6f2;
    border-left: 3px solid #1a2e44;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #344;
    margin: 0 0 16px;
    list-style: none;
}
/* WooCommerce/Astra ponen un icono (ℹ) absoluto vía ::before que se
   encimaba con el texto "¿Tienes un cupón?". Lo ocultamos. */
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before,
.woocommerce-checkout .woocommerce-info::before,
.woocommerce-checkout .woocommerce-message::before {
    display: none !important;
    content: none !important;
}
.woocommerce-checkout .woocommerce-info a,
.woocommerce-checkout .woocommerce-form-coupon-toggle a {
    color: #1a2e44;
    font-weight: 600;
}

/* Formulario de cupón desplegable */
.woocommerce-checkout form.checkout_coupon {
    border: 1px solid #ebebeb;
    border-radius: 10px;
    padding: 16px;
    margin: 0 0 20px;
    background: #fff;
}

/* Layout en 2 columnas en PC: datos (izq) + resumen (der).
   Nota: el layout real se fuerza en functions.php (inline, con !important)
   para ganarle a woocommerce-grid.min.css; esto es solo respaldo. */
@media (min-width: 980px) {
    .woocommerce-checkout form.checkout.woocommerce-checkout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 400px;
        gap: 30px;
        align-items: start;
    }
    .woocommerce-checkout #customer_details {
        grid-column: 1;
        grid-row: 1 / span 2;
    }
    .woocommerce-checkout #order_review_heading {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
    }
    .woocommerce-checkout #order_review {
        grid-column: 2;
        grid-row: 2;
    }
}

/* Títulos de sección (Detalles de facturación, Tu pedido) */
.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading {
    font-size: 17px;
    font-weight: 700;
    color: #1a2e44;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ebebeb;
}

/* Campos del formulario */
.woocommerce-checkout .form-row {
    margin: 0 0 14px;
    padding: 0;
}
.woocommerce-checkout .form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #1a2e44;
    margin-bottom: 5px;
    display: block;
}
.woocommerce-checkout .form-row .required {
    color: #c0392b;
    text-decoration: none;
}
.woocommerce-checkout .input-text,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-container .select2-selection {
    width: 100%;
    padding: 11px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
    line-height: 1.4;
}
/* Select2 (país/estado) alto correcto */
.woocommerce-checkout .select2-container .select2-selection--single {
    height: 44px;
    display: flex;
    align-items: center;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.4;
    padding: 0;
    color: #333;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}
.woocommerce-checkout .input-text:focus,
.woocommerce-checkout input:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
    border-color: #1a2e44;
    background: #fff;
    outline: none;
}
.woocommerce-checkout textarea {
    min-height: 90px;
    resize: vertical;
}

/* Casilla "crear cuenta" / notas */
.woocommerce-checkout .woocommerce-account-fields,
.woocommerce-checkout .woocommerce-additional-fields {
    margin-top: 8px;
}

/* Resumen del pedido (#order_review) como tarjeta */
.woocommerce-checkout #order_review {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 4px 0 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    box-sizing: border-box;
}
.woocommerce-checkout #order_review_heading {
    border-bottom: none;
}

/* Tabla del pedido */
.woocommerce-checkout table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
}
.woocommerce-checkout table.shop_table thead th {
    background: #f5f6f8;
    color: #1a2e44;
    font-weight: 700;
    text-align: left;
    padding: 12px 18px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.woocommerce-checkout table.shop_table td,
.woocommerce-checkout table.shop_table th {
    padding: 12px 18px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.woocommerce-checkout table.shop_table .product-name {
    color: #2c3e50;
    font-weight: 500;
}
.woocommerce-checkout table.shop_table .product-total,
.woocommerce-checkout table.shop_table td.product-total {
    text-align: right;
    white-space: nowrap;
}
.woocommerce-checkout table.shop_table .woocommerce-Price-amount {
    color: #1a2e44;
    font-weight: 700;
}
/* Filas de totales (subtotal, envío, total) */
.woocommerce-checkout table.shop_table tfoot th {
    text-align: left;
    font-weight: 600;
    color: #1a2e44;
    background: transparent;
}
.woocommerce-checkout table.shop_table tfoot td {
    text-align: right;
}
.woocommerce-checkout table.shop_table tfoot .order-total th,
.woocommerce-checkout table.shop_table tfoot .order-total td {
    border-bottom: none;
    font-size: 15px;
    font-weight: 700;
    padding-top: 14px;
}
.woocommerce-checkout table.shop_table tfoot .order-total .woocommerce-Price-amount {
    font-size: 18px;
}
/* Totales Bs./COP secundarios (los añade perijapp-precios-unificado.php) */
.woocommerce-checkout table.shop_table tfoot tr.perijapp-total-bs th,
.woocommerce-checkout table.shop_table tfoot tr.perijapp-total-cop th,
.woocommerce-checkout table.shop_table tfoot tr.perijapp-total-bs td,
.woocommerce-checkout table.shop_table tfoot tr.perijapp-total-cop td {
    font-size: 12.5px;
    font-weight: 600;
    color: #5a6a7a;
}

/* Métodos de envío en el resumen */
.woocommerce-checkout #order_review ul#shipping_method {
    list-style: none;
    margin: 0;
    padding: 0;
}
.woocommerce-checkout #order_review ul#shipping_method li {
    margin: 4px 0;
}

/* Sección de pago (#payment) */
.woocommerce-checkout #payment {
    background: #f8f9fb;
    border-radius: 0 0 12px 12px;
    padding: 0;
}
.woocommerce-checkout #payment ul.payment_methods {
    list-style: none;
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid #ebebeb;
}
.woocommerce-checkout #payment ul.payment_methods li {
    margin: 0 0 10px;
    font-size: 14px;
}
.woocommerce-checkout #payment ul.payment_methods li:last-child {
    margin-bottom: 0;
}
.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 600;
    color: #1a2e44;
    display: inline;
    margin-left: 4px;
    cursor: pointer;
}
.woocommerce-checkout #payment .payment_box {
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 8px 0 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}
.woocommerce-checkout #payment .payment_box::before {
    display: none;
}

/* Términos y condiciones */
.woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper {
    padding: 14px 18px 0;
    font-size: 13px;
}

/* Botón "Realizar el pedido" */
.woocommerce-checkout #payment #place_order,
.woocommerce-checkout button#place_order {
    display: block;
    background: #1a2e44 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 15px 18px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.15s;
    margin: 14px 18px 18px;
    width: calc(100% - 36px);
    box-sizing: border-box;
}
.woocommerce-checkout #payment #place_order:hover,
.woocommerce-checkout button#place_order:hover {
    background: #2d4f74 !important;
}

/* Mensajes de error de validación */
.woocommerce-checkout .woocommerce-error {
    background: #fdecea;
    border: 1px solid #f5c6c0;
    border-left: 3px solid #c0392b;
    border-radius: 8px;
    list-style: none;
    padding: 12px 14px;
    margin: 0 0 16px;
    font-size: 13px;
    color: #8a2a20;
}

/* En móvil, el resumen va debajo de los datos (orden natural ya es ese) */
@media (max-width: 979px) {
    .woocommerce-checkout #order_review_heading {
        margin-top: 24px;
    }
    .woocommerce-checkout #payment #place_order,
    .woocommerce-checkout button#place_order {
        margin: 14px 16px 16px;
        width: calc(100% - 32px);
    }
}

/* ================================================
   BÚSQUEDA EN VIVO (Live Search Dropdown)
   Dropdown estilo Amazon debajo del buscador del header.
================================================ */
.pj-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    z-index: 1000;
}

/* Contenedor de resultados */
.pj-live-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 420px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.pj-live-results.pj-lr-open {
    display: block;
}

/* Cada resultado */
.pj-lr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.1s;
}
.pj-lr-item:last-child { border-bottom: none; }
.pj-lr-item:hover,
.pj-lr-item.pj-lr-active {
    background: #f0f4fa;
}
.pj-lr-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.pj-lr-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 20px;
    flex-shrink: 0;
}
.pj-lr-info {
    min-width: 0;
    flex: 1;
}
.pj-lr-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a2e44;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pj-lr-price {
    font-size: 13px;
    color: #e84040;
    font-weight: 700;
    margin-top: 2px;
}

/* "Ver los X resultados" */
.pj-lr-viewall {
    display: block;
    text-align: center;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1a2e44;
    text-decoration: none;
    border-top: 1px solid #eee;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
    transition: background 0.1s;
}
.pj-lr-viewall:hover,
.pj-lr-viewall.pj-lr-active {
    background: #eef2f7;
}

/* Sin resultados */
.pj-lr-empty {
    padding: 20px 14px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* Móvil: dropdown ocupa todo el ancho */
@media (max-width: 768px) {
    .pj-live-results {
        left: -12px;
        right: -12px;
        max-height: 65vh;
        border-radius: 0 0 10px 10px;
    }
    .pj-lr-item { padding: 10px 12px; gap: 10px; }
}
