/*
Theme Name: Tema general
Theme URI: https://elevaweb.cl/
Author: ElevaWeb
Author URI: https://elevaweb.cl/
Description: Tema personalizado ultrarrápido sin dependencias para catálogo WooCommerce.
Version: 2.0.10
Text Domain: tema-personalizado
*/

/* Reset & Base */
:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --color-page: #f8f9fa;
    --color-surface: #fff;
    --color-surface-transparent: rgba(255, 255, 255, 0);
    --color-surface-soft: #f1f3f5;
    --color-surface-hover: #f7f8fa;
    --color-text: #333;
    --color-text-strong: #111;
    --color-text-medium: #444;
    --color-text-muted: #555;
    --color-text-subtle: #777;
    --color-text-soft: #888;
    --color-text-faint: #999;
    --color-border: #eee;
    --color-border-strong: #ddd;
    --color-border-soft: #f4f4f4;
    --color-border-muted: #f0f0f0;
    --color-border-ui: #e5e7eb;
    --color-border-hover: #ccc;
    --color-primary: #111;
    --color-primary-hover: #333;
    --color-link: #0066cc;
    --color-active: #1a56db;
    --color-active-bg: #eff6ff;
    --color-whatsapp: #25D366;
    --color-whatsapp-hover: #128C7E;
    --color-whatsapp-hover-desktop: #1ebe5d;
    --color-success-bg: #e8f8ef;
    --color-success-text: #137333;
    --color-danger: #e74c3c;

    /* Nuevas variables de Plan de Colores (EstÃ©tica Premium) */
    --color-bg-pastel: #f8f9fa;
    --color-espresso-dark: #333333;
    --color-accent-orange: #111111;
    --color-accent-gold: #1a56db;
    --color-active-gold-soft: rgba(26, 86, 219, 0.12);
    --color-border-espresso-soft: rgba(0, 0, 0, 0.15);

    --overlay: rgba(0, 0, 0, 0.5);
    --overlay-soft: rgba(0, 0, 0, 0.35);
    --overlay-hero: rgba(0, 0, 0, 0.4);
    --shadow-xs: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-control: 0 2px 7px rgba(0, 0, 0, 0.06);
    --shadow-panel: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-card-hover: 0 8px 20px rgba(0, 0, 0, 0.1);
    --shadow-drawer: 2px 0 8px rgba(0, 0, 0, 0.1);
    --shadow-drawer-right: -2px 0 8px rgba(0, 0, 0, 0.1);
    --shadow-dropdown: 0 8px 32px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-whatsapp: 0 4px 6px rgba(37, 211, 102, 0.2);

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 18px;
    --radius-pill: 999px;
    --radius-circle: 50%;

    /* Advanced Colors (Defaults/Fallbacks) */
    --color-header-bg: var(--color-surface);
    --color-header-icons: var(--color-text);
    --color-header-logo: var(--color-text-strong);

    --color-search-bg: var(--color-surface-soft);
    --color-search-text: var(--color-text);
    --color-search-border: var(--color-border-strong);

    --color-hero-text: var(--color-surface);
    --color-hero-overlay: var(--overlay-hero);

    --color-cat-bar-bg: var(--color-surface);
    --color-cat-link: var(--color-link);

    --color-card-bg: var(--color-surface);
    --color-card-title: var(--color-text-muted);
    --color-card-price: var(--color-text-strong);

    --color-footer-bg: #EDEDED;
    --color-footer-text: #000000;
    --color-footer-border: #ADADAD;

    --color-cart-badge-bg: var(--color-danger);
    --color-cart-badge-text: var(--color-surface);

    --color-wa-bg: #25D366;
    --color-wa-text: #ffffff;

    --z-header: 100;
    --z-categories: 99;
    --z-desktop-overlay: 900;
    --z-desktop-modal: 901;
    --z-overlay: 1000;
    --z-drawer: 1001;
    --z-search: 9999;

    --page-side: 4%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-page);
    color: var(--color-text);
    padding-bottom: 2rem;
    line-height: 1.5;
}

/* Ocultar barra de scroll globalmente para todos los elementos */
html,
body {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--color-active);
    outline-offset: 3px;
}

:target,
:focus {
    scroll-margin-top: 96px;
    scroll-margin-bottom: 32px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    transform: translateY(-150%);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-surface);
    font-weight: 700;
    box-shadow: var(--shadow-panel);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}

.icon {
    display: inline-block;
    flex-shrink: 0;
    fill: currentColor;
    color: inherit;
    vertical-align: middle;
}

.content-paragraph {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.section-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

.map-container {
    margin-top: 0.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 150px;
}

.map-container iframe {
    border: 0;
}

/* Announcement Bar (Barra de Anuncios) */
.announcement-bar {
    display: block;
    width: 100%;
    background-color: var(--announcement-bg, #111111);
    color: var(--announcement-color, #ffffff);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.announcement-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    word-break: break-word;
}

@media (max-width: 767px) {
    .announcement-bar {
        font-size: 0.82rem;
        padding: 7px 12px;
    }
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 1rem;
    background-color: var(--color-header-bg);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2;
}

/* MÃ³vil: lupa pegada al hamburger para dar mÃ¡s espacio al tÃ­tulo */
@media (max-width: 767px) {
    .header-left {
        gap: 0;
    }
    #btn-back .icon {
        width: 25px;
        height: 25px;
    }
}

.menu-icon,
.search-icon,
.cart-icon,
.close-menu,
.clear-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border: 0;
    border-radius: var(--radius-circle);
    background: transparent;
    cursor: pointer;
    color: var(--color-header-icons);
}

.menu-icon:hover,
.search-icon:hover,
.cart-icon:hover,
.close-menu:hover,
.clear-search:hover {
    background: var(--color-surface-soft);
}

.cart-icon {
    position: relative;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s ease;
    z-index: 1;
    cursor: pointer;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo .site-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-header-logo);
}

/* Logo imagen (cuando se configura en site.json) */
.logo-img {
    height: 44px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Cuando hay imagen + texto juntos */
.logo:has(.logo-img):has(.site-title) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-bar {
    position: absolute;
    left: 86px;
    right: 50px;
    width: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
}

.search-bar.active {
    opacity: 1;
    pointer-events: all;
}

.header.search-active .search-bar {
    left: 64px;
    right: 64px;
}

.header.search-active .search-icon {
    display: none;
}

#search-input {
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    background: var(--color-search-bg);
    color: var(--color-search-text);
}

/* Ocultar el botÃ³n nativo de "limpiar" de los buscadores en navegadores WebKit/Blink */
#search-input::-webkit-search-cancel-button,
#search-input::-webkit-search-decoration,
#search-input::-webkit-search-results-button,
#search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.clear-search {
    position: absolute;
    right: 2px;
    display: flex;
    align-items: center;
    color: var(--color-text-soft);
    min-width: 36px;
    min-height: 36px;
}

#clear-search {
    display: none;
}

/* Opciones del buscador en la cabecera */
.header.search-disabled .search-icon,
.header.search-disabled .search-bar {
    display: none !important;
}

/* Hero */
.hero {
    width: 100%;
    height: 250px;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#hero-image {
    background-image: var(--hero-bg, var(--default-hero-mobile));
}
@media (min-width: 768px) {
    #hero-image {
        background-image: var(--hero-bg, var(--default-hero-pc));
    }
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none; /* Quitar superposiciÃ³n del Hero */
}

.hero-text {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-hero-text);
}

.hero-text h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px var(--overlay);
    color: var(--color-hero-title, inherit);
}

.hero-text p {
    font-size: 1rem;
    text-shadow: 1px 1px 3px var(--overlay);
    color: var(--color-hero-subtitle, inherit);
}

/* BotÃ³n Flotante de WhatsApp */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 58px;
    height: 58px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
    text-decoration: none;
}

.floating-whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
    color: #ffffff;
}

.floating-whatsapp-btn .whatsapp-tooltip {
    position: absolute;
    right: 68px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: #111827;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.floating-whatsapp-btn:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Ocultar cuando el modal de Checkout estÃ¡ abierto */
body.checkout-open .floating-whatsapp-btn,
.checkout-active .floating-whatsapp-btn,
.checkout-modal.active ~ .floating-whatsapp-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .floating-whatsapp-btn {
        bottom: 18px;
        right: 18px;
        width: 52px;
        height: 52px;
    }
    .floating-whatsapp-btn .whatsapp-tooltip {
        display: none;
    }
}


/* =====================================================
   DESKTOP NAV â€” MODAL POPUPS
   ===================================================== */

/* Hidden on mobile by default */
.desktop-nav {
    display: none;
}

/* Dropdown source elements: always hidden (JS reads their innerHTML into the modal) */
.dn-dropdown {
    display: none;
}


/* Overlay backdrop */
.dn-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-soft);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: var(--z-desktop-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dn-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.dn-modal {
    position: fixed;
    z-index: var(--z-desktop-modal);
    width: 420px;
    max-width: 92vw;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-modal);
    /* Centered */
    top: 50%;
    left: 50%;
    /* Hidden state â€” starts from button origin via JS custom properties */
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    visibility: hidden;
}

.dn-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
    visibility: visible;
}

/* Closing animation (no bounce) */
.dn-modal.closing {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    visibility: hidden;
}

/* Modal header */
.dn-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--color-border-muted);
}

.dn-modal-header .dn-modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-strong);
    margin: 0;
}

.dn-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-surface-soft);
    border-radius: var(--radius-circle);
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.dn-modal-close:hover {
    background: var(--color-border-ui);
    color: var(--color-text-strong);
}

/* Modal body */
.dn-modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.dn-modal-body p {
    margin-bottom: 0.5rem;
}

.dn-modal-body p:last-child {
    margin-bottom: 0;
}

.dn-modal-body h4 {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.5rem;
}

.dn-modal-body ul {
    list-style: none;
    margin-bottom: 0.75rem;
}

.dn-modal-body ul li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--color-border-soft);
    color: var(--color-text-medium);
}

.dn-modal-body ul li:last-child {
    border-bottom: none;
}

.dn-modal-body hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0.7rem 0;
}

/* Contact rows */
.dn-contact-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0;
    color: var(--color-text-medium);
    border-bottom: 1px solid var(--color-border-soft);
}

.dn-contact-row:last-child {
    border-bottom: none;
}

.dn-contact-row svg {
    flex-shrink: 0;
    color: var(--color-text-subtle);
}
/* Mobile Menu Styles */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--overlay);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    max-width: 80vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-mobile-menu-bg, var(--color-surface));
    z-index: var(--z-drawer);
    box-shadow: var(--shadow-drawer);
    transform: translateX(-100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-header h2,
.mobile-menu-header .menu-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-menu-content {
    padding: 1rem;
    overflow-y: auto;
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-mobile-menu-text, var(--color-text-strong));
    cursor: pointer;
    text-align: left;
}

.accordion-header .chevron {
    transition: transform 0.3s ease;
}

.accordion-header.active .chevron {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.accordion-body p {
    margin-bottom: 0.75rem;
}

.accordion-body p:last-child {
    margin-bottom: 0;
}

.accordion-body h4 {
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.accordion-body ul {
    list-style: none;
    margin-bottom: 0.5rem;
}

.accordion-body li {
    margin-bottom: 0.25rem;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-row svg {
    color: var(--color-text-strong);
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .mobile-menu-content {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }
}
/* Categories */
.categories {
    background: var(--color-cat-bar-bg);
    padding: 1rem 0;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 70px;
    z-index: var(--z-categories);
}

.categories-list {
    display: flex;
    overflow-x: auto;
    list-style: none;
    padding: 0 1rem;
    gap: 0.75rem;
    scrollbar-width: none;
    /* Firefox */
}

.categories-title {
    display: none;
}

.categories-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.categories-list li {
    flex: 0 0 auto;
}

.categories-list a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    background-color: var(--color-cat-tab-bg, var(--color-surface-soft));
    color: var(--color-cat-tab-text, var(--color-text-medium));
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.categories-list li.active a {
    background-color: var(--color-cat-tab-active-bg, var(--color-primary));
    color: var(--color-cat-tab-active-text, var(--color-surface));
}

.categories::before,
.categories::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.categories::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-cat-bar-bg) 35%, var(--color-surface-transparent));
}

.categories::after {
    right: 0;
    background: linear-gradient(270deg, var(--color-cat-bar-bg) 35%, var(--color-surface-transparent));
}

.categories.can-scroll-left::before,
.categories.can-scroll-right::after {
    opacity: 1;
}

.categories.is-scroll-hinting .categories-list {
    animation: category-scroll-hint 0.85s ease-out;
}

@keyframes category-scroll-hint {
    0%,
    100% {
        transform: translateX(0);
    }

    45% {
        transform: translateX(-14px);
    }
}

.catalog-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 1rem;
}

.catalog-sort {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.45rem;
    min-width: 0;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-control);
}

.catalog-sort-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--color-text-strong);
}

.catalog-sort select {
    width: auto;
    min-width: max-content;
    max-width: 9.5rem;
    border: none;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.catalog-view-toggle {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.15rem;
    padding: 0.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-control);
}

.catalog-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-medium);
    cursor: pointer;
}

.catalog-view-btn.active {
    background: var(--color-primary);
    color: var(--color-surface);
}

.view-icon {
    width: 18px;
    height: 18px;
    color: inherit;
}

/* Categories Sections */
.category-section {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 1rem 0.75rem;
}

.category-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text-strong);
}

.category-link {
    flex: 0 0 auto;
    padding-top: 0.18rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-cat-link);
    text-decoration: underline;
    white-space: nowrap;
    cursor: pointer;
}

.products-container {
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.products-carousel {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    scroll-snap-type: x mandatory;
}

.products-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.products-carousel .product-card {
    flex: 0 0 42%;
    min-width: 140px;
    scroll-snap-align: start;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.products-large {
    display: grid;
    grid-template-columns: 1fr;
}

.products-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
.product-card {
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-tag-badge {
    position: absolute;
    bottom: 0.85rem;
    right: 0.75rem;
    background-color: var(--color-active);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

.product-card-img-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    display: block;
    background: transparent;
}

.product-card-img {
    width: 100%;
    height: auto;
    display: block;
}

.product-badge.sale-badge {
    position: absolute;
    background-color: var(--sale-badge-bg, #e53e3e);
    color: var(--sale-badge-text-color, #ffffff);
    font-size: var(--sale-badge-font-size, 0.75rem);
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: var(--sale-badge-radius, 4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 5;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.product-badge.sale-badge.pos-price {
    position: static;
    display: inline-block;
    padding: 2px 6px;
    font-size: calc(var(--sale-badge-font-size, 0.75rem) * 0.9);
    box-shadow: none;
    letter-spacing: normal;
    margin-left: 6px;
    vertical-align: middle;
}

.product-card-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}

.products-list .product-card {
    min-height: 132px;
    flex-direction: row;
}

.products-list .product-card-img-wrapper {
    width: 38%;
    max-width: 140px;
    flex: 0 0 38%;
    aspect-ratio: auto;
    height: 100%;
}

.product-card-info {
    padding: 0.75rem 0.75rem 0.85rem;
}

.products-list .product-card-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.product-card-title {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
    color: var(--color-card-title);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    height: 2.7em;
    /* aprox 2 lines */
}

.product-card-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-card-price);
}

.products-list .product-card-price {
    font-size: 1.1rem;
}

/* Out of stock product card styling */
.product-badge.out-of-stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #52525b; /* Neutral dark gray */
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 5;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.product-card.out-of-stock-card .product-card-img-wrapper img {
    filter: grayscale(80%) opacity(70%);
}

.product-card.out-of-stock-card .product-card-title {
    color: var(--color-text-muted, #71717a);
}
/* Product Page Specific */
.product-page {
    padding: 1rem;
    background: var(--color-product-page-bg, var(--color-page));
    min-height: calc(100vh - 70px);
}

.product-detail-columns {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--color-breadcrumb-text, var(--color-text-soft));
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--color-breadcrumb-text, var(--color-text-soft));
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--color-active);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--color-breadcrumb-text, var(--color-text-soft));
}

.product-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111111;
}

.product-image-container {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.product-image {
    width: 100%;
    height: auto;
    display: block;
}

.product-thumbnails {
    display: flex;
    gap: 0.75rem;
    margin: -0.25rem 0 1rem;
    overflow-x: auto;
}

.product-thumbnail {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-page);
    cursor: pointer;
}

.product-thumbnail.active {
    border-color: #111111;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}

.product-price .original-price {
    text-decoration: line-through;
    color: #777777;
    font-weight: 500;
    margin-right: 0.25rem;
    font-size: 1.15rem;
}

.product-price .sale-price {
    color: #111111;
    font-weight: 700;
}

.product-price .price-neto-suffix {
    font-size: 1rem;
    font-weight: 600;
    color: #777777;
    margin-left: 0.25rem;
}

.product-short-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 1.25rem;
}

.product-short-description strong,
.product-short-description b {
    font-weight: 700;
    color: #333333;
}

.product-short-description p {
    margin-bottom: 0.5rem;
}

.product-description {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
}

.product-description ul,
.product-description ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.product-description ul {
    list-style-type: disc;
}

.product-description ol {
    list-style-type: decimal;
}

.product-description li {
    margin-bottom: 0.3rem;
}

.product-description strong,
.product-description b {
    font-weight: 700;
    color: #333333;
}

.product-description p {
    margin-bottom: 0.5rem;
}

.product-variants {
    margin-bottom: 1.5rem;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.variant-group {
    margin-bottom: 1rem;
}

.variant-group:last-child {
    margin-bottom: 0;
}

.variant-group>span {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #333333;
    font-weight: 500;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-option {
    position: relative;
    min-width: 52px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--color-variant-inactive-border, rgba(0, 0, 0, 0.15));
    border-radius: var(--radius-md);
    background: var(--color-variant-inactive-bg, #ffffff);
    color: var(--color-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.variant-option.has-badge {
    padding-right: 2rem;
}

.variant-option:hover:not(.disabled) {
    border-color: var(--color-variant-selected-border, #111111);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);
}

.variant-option.active {
    border-color: var(--color-variant-selected-border, #111111);
    background: var(--color-variant-selected-bg, rgba(26, 86, 219, 0.12));
    color: var(--color-text-strong);
    box-shadow: 0 4px 12px rgba(255, 85, 0, 0.06);
}

.format-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 95px;
    padding: 0.75rem;
    text-align: left;
}

.format-option strong {
    font-size: 0.95rem;
}

.format-option span {
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.85;
}

.format-option em {
    display: inline-flex;
    margin-top: 0.15rem;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-pill);
    background: var(--color-success-bg);
    color: var(--color-success-text);
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 700;
}

.format-option.active em {
    background: #111111;
    color: var(--color-surface);
}

.variant-price.sale-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.variant-price .original-price {
    text-decoration: line-through;
    opacity: 0.6;
    font-size: 0.85em;
}

.variant-price .sale-price {
    font-weight: 600;
    color: var(--color-active, #1a56db);
}

.variant-sale-tag {
    position: absolute;
    top: -10px;
    right: -6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    background: #e53e3e;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: var(--radius-pill, 999px);
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(229, 62, 62, 0.35);
}

.variant-sale-tag .tag-icon {
    flex-shrink: 0;
    display: inline-block;
    width: 8px;
    height: 8px;
}

.variant-top-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    left: auto;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary, #111111);
    color: #ffffff;
    padding: 3px;
    border-radius: 0 var(--radius-md, 8px) 0 var(--radius-md, 8px);
    box-shadow: 0 2px 4px rgba(255, 85, 0, 0.2);
    line-height: 1;
    cursor: pointer;
}

.variant-top-badge svg {
    flex-shrink: 0;
    display: inline-block;
    width: 22px;
    height: 22px;
}

.variant-top-badge svg path {
    stroke: #000000;
}

.variant-option strong {
    font-weight: inherit;
}

/* Tooltip container */
.variant-top-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    right: 0;
    background: var(--color-text-strong, #111111);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Tooltip arrow */
.variant-top-badge::before {
    content: "";
    position: absolute;
    bottom: 110%;
    right: 8px;
    border: 5px solid transparent;
    border-top-color: var(--color-text-strong, #111111);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

/* Show tooltip on hover or active class */
.variant-top-badge:hover::after,
.variant-top-badge:hover::before,
.variant-top-badge.show-tooltip::after,
.variant-top-badge.show-tooltip::before {
    opacity: 1;
    visibility: visible;
}

.product-qty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0.75rem 0;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.quantity-label {
    font-size: 0.95rem;
    color: #333333;
    font-weight: 500;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-controls button {
    background: var(--color-quantity-selector-bg, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.15);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all 0.2s ease;
}

.qty-controls button:hover:not(.disabled) {
    background-color: rgba(0, 0, 0, 0.05);
}

.qty-controls span,
.qty-controls input {
    font-weight: 600;
    font-size: 1rem;
    min-width: 24px;
    text-align: center;
}

.qty-controls input {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #333333;
    font-family: inherit;
    box-sizing: border-box;
    padding: 0;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    box-shadow: none;
}

.qty-controls input:focus {
    outline: none;
    box-shadow: none;
}

.qty-controls input::-webkit-outer-spin-button,
.qty-controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-controls input[type=number] {
    -moz-appearance: textfield;
}

.qty-controls input:focus {
    outline: none;
    border-color: var(--color-active);
    box-shadow: 0 0 0 2px var(--color-active-bg);
}

.product-buttons {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
}

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: var(--color-product-cart-btn-bg, #333333);
    color: #ffffff;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.add-to-cart-btn:hover {
    background-color: color-mix(in srgb, var(--color-surface) 15%, var(--color-product-cart-btn-bg, #333333));
}

.add-to-cart-btn:active {
    background-color: color-mix(in srgb, #000 15%, var(--color-product-cart-btn-bg, #333333));
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: var(--color-product-wa-btn-bg, #25D366);
    color: #ffffff;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.15);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

@media (hover: hover) {
    .whatsapp-btn:hover {
        background-color: color-mix(in srgb, var(--color-surface) 15%, var(--color-product-wa-btn-bg, #25D366));
    }
}

.whatsapp-btn:active {
    background-color: color-mix(in srgb, #000 15%, var(--color-product-wa-btn-bg, #25D366));
}

.variant-option.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    border-style: dashed;
    background: var(--color-surface-soft);
}

/* Color Variants */
.color-option {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--radius-circle);
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-option:hover {
    transform: scale(1.08);
}

.color-option.active {
    border-color: transparent;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary);
}

.color-option.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
    border: 1px dashed rgba(0, 0, 0, 0.4);
    box-shadow: none;
}

.color-option.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.5);
    transform: rotate(-45deg);
}

/* Image Variants */
.image-option {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--radius-sm);
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.image-option:hover {
    transform: scale(1.08);
}

.image-option.active {
    border-color: transparent;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary);
}

.image-option img.swatch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-option.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
    border: 1px dashed rgba(0, 0, 0, 0.4);
    box-shadow: none;
}

.image-option.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.5);
    transform: rotate(-45deg);
}

/* Size Guide Modal & Button */
.variant-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.variant-group-header > span {
    display: block;
    font-size: 0.95rem;
    color: #333333;
    font-weight: 500;
    margin-bottom: 0;
}

.size-guide-btn {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #111111;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease;
}

.size-guide-btn:hover {
    color: #d44700;
    text-decoration: underline;
}

.size-guide-icon {
    flex-shrink: 0;
    color: currentColor;
}

/* Modal and Overlay for Size Guide */
.sg-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-soft);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sg-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.sg-modal {
    position: fixed;
    z-index: 1001;
    width: 420px;
    max-width: 92vw;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-2xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    top: 50%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sg-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.sg-modal.closing {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.sg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--color-border-muted);
}

.sg-modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.sg-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-surface-soft);
    border-radius: var(--radius-circle);
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.sg-modal-close:hover {
    background: var(--color-border-ui);
    color: #333333;
}

.sg-modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.sg-modal-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sg-modal-body ul li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border-soft);
    color: var(--color-text-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.sg-modal-body ul li:last-child {
    border-bottom: none;
}

.sg-modal-body ul li strong {
    font-weight: 600;
    color: #333333;
}

/* Out of stock/disabled action buttons */
.product-buttons button[disabled],
.product-buttons button.disabled-btn {
    background-color: var(--color-surface-soft, #f4f4f5) !important;
    color: var(--color-text-subtle, #a1a1aa) !important;
    border: 1px solid var(--color-border, #e4e4e7) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none !important;
}

/* Bloque de confianza y pasarela de pago */
.product-trust-badges {
    margin-top: 1.5rem;
    padding: 1.25rem 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
    border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
}

.product-trust-badges .mp-logo-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 150px;
    margin: 0 auto;
    align-self: center;
    opacity: 0.95;
}

.product-trust-badges .mp-logo-badge svg {
    width: 100%;
    height: auto;
}

.product-trust-badges .trust-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

.product-trust-badges .trust-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.product-trust-badges .trust-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.product-trust-badges .trust-badge-item svg {
    color: var(--color-active, #1a56db);
    width: 100%;
    height: 100%;
    display: block;
}

.product-trust-badges .trust-badge-item .badge-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-medium, #333333);
    line-height: 1.3;
}

@media (max-width: 480px) {
    .product-trust-badges .trust-badges-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .product-trust-badges .trust-badge-item {
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
        justify-content: center;
        padding-left: 0;
    }
}

/* Enlace de salto a informaciÃ³n detallada */
.jump-to-details-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-active, #1a56db);
    text-decoration: none;
    margin-top: 0.75rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.jump-to-details-link:hover {
    opacity: 0.85;
}

.jump-to-details-link:hover span {
    text-decoration: underline;
}

.jump-to-details-link svg {
    width: 15px;
    height: 15px;
    color: inherit;
    animation: bounceSlow 2s infinite ease-in-out;
}

@keyframes bounceSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

/* Estilos para el bloque de variantes sin stock */
.alp-out-of-stock-details {
    margin-top: 12px;
    width: 100%;
}
.alp-out-of-stock-details summary {
    list-style: none;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-crema-700);
    margin: 8px 0;
    text-decoration: underline;
    user-select: none;
}
.alp-out-of-stock-details summary::-webkit-details-marker {
    display: none;
}
.alp-out-of-stock-details summary::after {
    content: " (+)";
}
.alp-out-of-stock-details[open] summary::after {
    content: " (-)";
}
.alp-out-of-stock-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 6px;
    padding: 4px 0;
}
/* Hacer que los botones sin stock en la lista desplegable respondan al clic */
.alp-out-of-stock-list .variant-option.disabled {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* BotÃ³n de compra inferior (sube el scroll) */
.product-scroll-up-wrapper {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    width: 100%;
}

.scroll-up-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 350px;
    background-color: var(--color-product-wa-btn-bg, #25D366);
    color: #ffffff;
    border: none;
    padding: 0.9rem 1.7rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 5px 17px rgba(255, 85, 0, 0.18);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.scroll-up-buy-btn:hover {
    background-color: color-mix(in srgb, #000 10%, var(--color-product-wa-btn-bg, #25D366));
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(255, 85, 0, 0.25);
}

.scroll-up-buy-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.18);
}
/* Cart Styles */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--color-cart-badge-bg);
    color: var(--color-cart-badge-text);
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: var(--radius-circle);
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#cart-badge {
    display: none;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--overlay);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-cart-drawer-bg, var(--color-surface));
    z-index: var(--z-drawer);
    box-shadow: var(--shadow-drawer-right);
    transform: translateX(100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.cart-drawer.active {
    transform: translateX(0);
    visibility: visible;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-header h2,
.cart-header .cart-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.cart-item-price {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.cart-item-options {
    color: var(--color-text-subtle);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.cart-qty-btn {
    background: var(--color-surface-soft);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
}

.cart-qty-input {
    width: 28px;
    height: 24px;
    border: none;
    text-align: center;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: bold;
    -moz-appearance: textfield;
    box-sizing: border-box;
    padding: 0;
    box-shadow: none;
}

.cart-qty-input:focus {
    outline: none;
    box-shadow: none;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-footer {
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-border);
}

@media (max-width: 767px) {
    .cart-footer {
        padding: 1rem 1rem calc(3.5rem + env(safe-area-inset-bottom));
    }
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cart-empty-msg {
    text-align: center;
    color: var(--color-text-soft);
    margin-top: 2rem;
}

.search-no-results {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--color-text-soft);
    font-size: 1rem;
}

.search-no-results strong {
    color: var(--color-text);
}

/* Acciones del header del carrito (Vaciar + Cerrar) */
.cart-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BotÃ³n Vaciar Carrito (Estilo pÃ­ldora discreto) */
.cart-clear-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-subtle);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
}

.cart-clear-btn .icon {
    fill: currentColor;
    stroke: none;
    transition: transform 0.2s ease;
}

.cart-clear-btn:hover {
    color: var(--color-danger);
    border-color: var(--color-danger);
    background-color: color-mix(in srgb, var(--color-danger) 8%, transparent);
}

.cart-clear-btn:hover .icon {
    transform: rotate(-10deg) scale(1.05);
}

/* BotÃ³n Eliminar Ãtem Individual (Basurero) */
.cart-remove-item-btn {
    background: transparent;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-xs);
    margin-left: 2px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.cart-remove-item-btn:hover {
    background-color: color-mix(in srgb, var(--color-danger) 10%, transparent);
    transform: scale(1.1);
}

.cart-remove-item-btn .icon-trash {
    fill: currentColor;
    stroke: none;
}

/* Color del botÃ³n de enviar pedido personalizado en el carrito */
.cart-drawer .whatsapp-btn {
    background-color: var(--color-cart-checkout-btn-bg, var(--color-active));
}
@media (hover: hover) {
    .cart-drawer .whatsapp-btn:hover {
        background-color: color-mix(in srgb, var(--color-surface) 15%, var(--color-cart-checkout-btn-bg, var(--color-active)));
    }
}
.cart-drawer .whatsapp-btn:active {
    background-color: color-mix(in srgb, #000 15%, var(--color-cart-checkout-btn-bg, var(--color-active)));
}

.checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-modal[hidden] {
    display: none;
}

.checkout-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.checkout-content {
    position: relative;
    background: var(--card-bg, #fff);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: checkoutSlideIn 0.25s ease-out;
}

@keyframes checkoutSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.checkout-header .checkout-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.checkout-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted, #666);
    padding: 4px;
}

.checkout-body {
    padding: 20px 24px;
}

.checkout-section {
    margin-bottom: 20px;
}

.checkout-section .checkout-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #666);
    margin-bottom: 12px;
}

.checkout-label {
    display: block;
    margin-bottom: 12px;
}

.checkout-label span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.checkout-label .required {
    color: #ef4444;
}

.checkout-label input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-color-alt, #f8f9fa);
    color: var(--text-main, #111);
    box-sizing: border-box;
}

.checkout-label input:focus {
    outline: none;
    border-color: var(--primary-color, #ff2e93);
    box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.15);
}

.checkout-providers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    background: var(--card-bg, #fff);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-main, #111);
}

.checkout-provider-btn:hover {
    border-color: var(--primary-color, #ff2e93);
}

.checkout-provider-btn.active {
    border-color: var(--primary-color, #ff2e93);
    background: rgba(255, 46, 147, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.15);
}

.checkout-provider-name {
    pointer-events: none;
}

.checkout-error {
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
    margin-bottom: 8px;
}

.checkout-footer {
    padding: 0 24px 24px;
}

.checkout-btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color, #ff2e93);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.checkout-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkout-btn-submit:not(:disabled):hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.checkout-empty {
    text-align: center;
    color: var(--text-muted, #666);
    font-style: italic;
    padding: 16px;
}

/* BotÃ³n de Finalizar Compra en el carrito */
.checkout-finalizar-btn {
    background: var(--primary-color, #ff2e93);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.checkout-finalizar-btn:hover {
    filter: brightness(1.1);
}

.checkout-label select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-color-alt, #f8f9fa);
    color: var(--text-main, #111);
    box-sizing: border-box;
    cursor: pointer;
}

.checkout-label select:focus {
    outline: none;
    border-color: var(--primary-color, #ff2e93);
    box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.15);
}

.checkout-label select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout-summary {
    background: var(--bg-color-alt, #f8f9fa);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-muted, #666);
}

.checkout-summary-row:last-child {
    margin-bottom: 0;
}

.checkout-summary-row.total {
    font-size: 16px;
    font-weight: 700;
    border-top: 1px dashed var(--border-color, #e5e7eb);
    padding-top: 8px;
    margin-top: 8px;
    color: var(--text-main, #111);
}

/* Custom additions for delivery and pickup options */
.checkout-shipping-method-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.checkout-shipping-method-btn {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--card-bg, #fff);
    color: var(--text-muted, #666);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.checkout-shipping-method-btn:hover {
    border-color: var(--primary-color, #ff2e93);
    color: var(--text-main, #111);
}

.checkout-shipping-method-btn.active {
    border-color: var(--primary-color, #ff2e93);
    background: rgba(255, 46, 147, 0.05);
    color: var(--primary-color, #ff2e93);
}

.checkout-pickup-fields {
    background: var(--bg-color-alt, #f8f9fa);
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.checkout-pickup-instruction {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #374151);
    margin: 0 0 10px 0;
}

.checkout-pickup-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-pickup-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.checkout-pickup-card:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

.checkout-pickup-card.active {
    border-color: var(--primary-color, #ff2e93);
    background: rgba(255, 46, 147, 0.04);
}

.checkout-pickup-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    margin-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkout-pickup-card.active .checkout-pickup-radio-dot {
    border-color: var(--primary-color, #ff2e93);
}

.checkout-pickup-card.active .checkout-pickup-radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color, #ff2e93);
}

.checkout-pickup-card-body {
    flex: 1;
    min-width: 0;
}

.checkout-pickup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.checkout-pickup-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main, #111);
}

.checkout-pickup-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.checkout-pickup-badge.free {
    background: #dcfce7;
    color: #166534;
}

.checkout-pickup-badge.price {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.checkout-pickup-address {
    font-size: 13px;
    color: var(--text-muted, #666);
    line-height: 1.35;
}

.checkout-pickup-single-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    padding: 12px 14px;
}

.checkout-estimated-delivery-note {
    margin-top: 12px;
    font-size: 13px;
    color: #0d9488;
    background: #f0fdfa;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #14b8a6;
    line-height: 1.4;
}

/* Autocomplete combo boxes */
.checkout-combo-container {
    position: relative;
    width: 100%;
}

.checkout-combo-container input {
    padding-right: 36px !important;
}

.checkout-combo-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted, #9ca3af);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, opacity 0.2s;
    opacity: 0.7;
    z-index: 10;
}

.checkout-combo-clear:hover {
    color: #ef4444;
    opacity: 1;
}

.checkout-combo-clear svg {
    width: 16px;
    height: 16px;
}

.checkout-combo-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.checkout-combo-item {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text-main, #111);
}

.checkout-combo-item:hover {
    background: var(--bg-color-alt, #f3f4f6);
}

.checkout-combo-item.no-results {
    color: var(--text-muted, #666);
    font-style: italic;
    cursor: default;
    background: none !important;
}

/* Quitar borde izquierdo rojo/naranja y ajustar padding de los detalles bancarios (BACS) */
.woocommerce-order-received ul.bacs_details,
.woocommerce-order-received .woocommerce-bacs-bank-details ul.wc-bacs-bank-details {
    border-left: none !important;
    padding-left: 0 !important;
}

/* Selector de tipo de documento (Boleta / Factura SII Chile) */
.checkout-doc-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.checkout-doc-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1.5px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-color-alt, #f8f9fa);
    color: var(--text-muted, #666);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-doc-btn:hover {
    border-color: var(--primary-color, #ff2e93);
    color: var(--text-main, #111);
}

.checkout-doc-btn.active {
    border-color: var(--primary-color, #ff2e93);
    background: rgba(255, 46, 147, 0.08);
    color: var(--primary-color, #ff2e93);
    font-weight: 700;
}

/* Seccion Desplegable de Factura */
.checkout-factura-container {
    background: var(--bg-color-alt, #f8f9fa);
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    animation: fadeInSlide 0.25s ease-out;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.checkout-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main, #374151);
    margin-top: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.checkout-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #ff2e93);
    cursor: pointer;
}

.checkout-label input.input-invalid {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.checkout-rut-hint {
    font-size: 11px;
    color: #ef4444;
    margin-top: 3px;
    display: none;
    font-weight: 500;
}

/* Grupo de Radio Buttons para Â¿Necesitas Factura? */
.checkout-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 6px;
    margin-bottom: 14px;
}

.checkout-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main, #111);
    cursor: pointer;
    user-select: none;
}

.checkout-radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color, #ff2e93);
    cursor: pointer;
    margin: 0;
}

/* Mensajes de error individuales bajo cada input */
.checkout-field-error {
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
    margin-top: 4px;
    display: block;
    animation: fadeInSlide 0.2s ease-out;
}

/* Ocultar botÃ³n flotante de WhatsApp en pÃ¡ginas transaccionales */
body.woocommerce-order-received #floating-whatsapp-btn,
body.woocommerce-order-pay #floating-whatsapp-btn {
    display: none !important;
}

/* BLOQUE DE DATOS BANCARIOS (ELEVAWEB BANCOS DE CHILE) */
.thankyou-bank-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px 0 24px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.thankyou-bank-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.thankyou-bank-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

table.bank-details-grid,
.bank-details-grid {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

table.bank-details-grid tbody {
    display: table-row-group !important;
    width: 100% !important;
}

table.bank-details-grid tr {
    display: table-row !important;
    width: 100% !important;
}

table.bank-details-grid td {
    display: table-cell !important;
    width: 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
    padding: 14px 18px !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
}

@media (max-width: 600px) {
    table.bank-details-grid td {
        padding: 10px 12px !important;
    }
}

.bank-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bank-detail-item strong {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    display: block !important;
}

.bank-detail-item span {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    word-break: break-word !important;
    display: block !important;
}

/* Tarjeta Destacada de AcciÃ³n de WhatsApp (In-Page) para Pago Exitoso y Pago Fallido */
.thankyou-whatsapp-action-card {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.thankyou-whatsapp-action-card.error-card {
    background: #fff5f5;
    border-color: #fecaca;
}

.thankyou-wa-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.thankyou-wa-icon-box.error {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.thankyou-wa-text {
    flex: 1;
    min-width: 220px;
}

.thankyou-wa-text strong {
    display: block;
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 2px;
}

.thankyou-wa-text span {
    font-size: 13px;
    color: #475569;
}

.btn-whatsapp-action-inpage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25D366;
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
    white-space: nowrap;
}

.btn-whatsapp-action-inpage:hover {
    background-color: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp-action-inpage.error {
    background-color: #16a34a;
}

.btn-whatsapp-action-inpage.error:hover {
    background-color: #15803d;
}

@media (max-width: 640px) {
    .thankyou-whatsapp-action-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 16px;
    }
    .thankyou-wa-icon-box {
        margin: 0 auto 8px auto;
    }
    .thankyou-wa-text {
        min-width: 0;
        margin-bottom: 10px;
    }
    .btn-whatsapp-action-inpage {
        width: 100%;
        white-space: normal;
        text-align: center;
        box-sizing: border-box;
    }
}

/* SUMUP PAYMENT FORM & ORDER PAY STYLING */
body.woocommerce-order-pay #wc-sumup-payment-modal,
body.woocommerce-order-pay #sumup-card,
.wc-sumup-modal,
#wc-sumup-payment-modal,
#sumup-card,
.woocommerce-pay {
    display: block !important;
    max-width: 560px;
    margin: 20px auto;
    padding: 24px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

#order_review #payment #place_order,
button#sumup-card-submit-button {
    background-color: var(--color-primary, #111111) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
    margin-top: 16px !important;
}

#sumup-payment-status {
    display: none !important;
}

/* B2B Portal Styles */
.b2b-portal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 16px;
    min-height: calc(100vh - 240px);
    background-color: var(--color-page);
    box-sizing: border-box;
}

.b2b-portal-card {
    width: 100%;
    max-width: 460px;
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.b2b-portal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.b2b-tabs {
    display: flex;
    background-color: var(--color-surface-soft);
    border-bottom: 1px solid var(--color-border);
}

.b2b-tab-btn {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    outline: none;
}

.b2b-tab-btn.active {
    color: var(--color-text-strong);
    background-color: var(--color-surface);
    border-bottom: 2px solid var(--color-primary);
}

.b2b-tab-btn:hover:not(.active) {
    color: var(--color-text-strong);
    background-color: var(--color-surface-hover);
}

.b2b-pane {
    display: none;
    padding: 32px 28px;
    box-sizing: border-box;
}

.b2b-pane.active {
    display: block;
    animation: fadeInB2B 0.3s ease-in-out;
}

@keyframes fadeInB2B {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.b2b-pane h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-strong);
    margin: 0 0 8px 0;
    text-align: center;
}

.b2b-form-description {
    font-size: 13.5px;
    color: var(--color-text-muted);
    text-align: center;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-text-strong);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text-strong);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-active);
    box-shadow: 0 0 0 3px var(--color-active-bg);
}

.b2b-submit-btn {
    width: 100%;
    padding: 13px;
    border: none;
    background-color: var(--color-primary);
    color: var(--color-surface);
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 10px;
}

.b2b-submit-btn:hover {
    background-color: var(--color-primary-hover);
}

.b2b-submit-btn:active {
    transform: scale(0.98);
}

.b2b-submit-btn:disabled {
    background-color: var(--color-text-faint);
    color: var(--color-text-muted);
    cursor: not-allowed;
    transform: none;
}

.b2b-error-message {
    background-color: #fdf2f2;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: left;
}

.b2b-success-message {
    background-color: var(--color-success-bg);
    color: var(--color-success-text);
    border: 1px solid color-mix(in srgb, var(--color-success-text) 30%, var(--color-success-bg));
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: center;
    font-weight: 500;
}

/* B2B Volume Pricing Table */
.b2b-volume-table-container {
    margin: 24px 0;
    padding: 16px;
    background-color: var(--color-surface-soft, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-lg, 8px);
}

.b2b-volume-table-container .b2b-table-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-strong, #111827);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2b-volume-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.b2b-volume-table th {
    font-weight: 600;
    color: var(--color-text-muted, #4b5563);
    padding: 10px 12px;
    border-bottom: 2px solid var(--color-border-strong, #e5e7eb);
}

.b2b-volume-table td {
    padding: 10px 12px;
    color: var(--color-text-strong, #1f2937);
    border-bottom: 1px solid var(--color-border, #f3f4f6);
}

.b2b-volume-table tr:last-child td {
    border-bottom: none;
}
/* Estilos personalizados para el CatÃ¡logo VibeBeauty */
/* Agrega aquÃ­ tus propias reglas de CSS para personalizar el diseÃ±o visual (colores, fuentes, mÃ¡rgenes, etc.) */

/* Estilos para el Footer mini gris claro */
body {
    padding-bottom: 0 !important;
}

.site-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.825rem;
    border-top: 1px solid var(--color-footer-border);
    width: 100%;
    margin-top: 2rem;
}

.site-footer p {
    margin: 0;
    line-height: 1.6;
}

.site-footer .designer-highlight {
    font-weight: 700;
    color: #F97316;
    text-decoration: none;
    display: inline-block;
}

.site-footer .designer-highlight:hover {
    text-decoration: underline;
}

/* Enlaces de contacto configurables en cabecera y pie de pÃ¡gina */
.contact-row a,
.dn-contact-row a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.contact-row a:hover,
.dn-contact-row a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* =========================================================================
   Banner de Privacidad y Consentimiento de Cookies (v1.5.2)
   ========================================================================= */
.cookie-banner-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    width: calc(100% - 2rem);
    max-width: 680px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border-strong, #cbd5e1);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 1.25rem 1.5rem;
    z-index: 99999;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    opacity: 0;
    font-family: var(--font-sans);
}

.cookie-banner-container.cookie-banner-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-banner-container.hidden {
    display: none !important;
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .cookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-banner-text-group {
    flex: 1;
}

.cookie-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-strong, #111827);
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

.cookie-banner-desc {
    font-size: 0.825rem;
    color: var(--color-text-medium, #4b5563);
    margin: 0 0 0.5rem 0;
    line-height: 1.45;
}

.cookie-option-row {
    margin-top: 0.4rem;
}

.cookie-option-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-strong, #1f2937);
    cursor: pointer;
    user-select: none;
}

.cookie-option-label input[type="checkbox"] {
    accent-color: var(--color-primary, #111827);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-banner-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-primary, #111827);
    color: #ffffff;
    white-space: nowrap;
}

.cookie-banner-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* =========================================================================
   Responsividad Universal & Vista Previa Compacta Lightbox (v1.5.7)
   ========================================================================= */

/* Limitar ancho y alto de contenedores WP */
.dn-modal-body figure,
.accordion-body figure,
.dn-dropdown figure,
.dn-modal-body .wp-block-image,
.accordion-body .wp-block-image,
.dn-modal-body .wp-caption,
.accordion-body .wp-caption {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

.dn-modal {
    width: 520px;
    max-width: 92vw;
    max-height: 85vh;
}

/* Wrapper de vista previa compacta adaptable a todas las proporciones (1:1, 16:9, 9:16, 4:5, 5:4) */
.img-expand-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    height: 240px;
    max-height: 240px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border-soft, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    margin: 0.75rem 0;
    cursor: pointer;
    box-sizing: border-box;
}

.dn-modal-body .img-expand-wrapper img,
.accordion-body .img-expand-wrapper img,
.dn-dropdown .img-expand-wrapper img,
.img-expand-wrapper img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: auto !important;
    border-radius: 8px;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.img-expand-wrapper:hover img {
    transform: scale(1.02);
    filter: brightness(0.96);
}

/* Insignia / BotÃ³n circular de Zoom-In en la esquina superior izquierda SOBRE la imagen (v1.6.4) */
.img-expand-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(17, 24, 39, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
    opacity: 0.92 !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

.img-expand-wrapper:hover .img-expand-badge,
.img-expand-badge:hover {
    opacity: 1 !important;
    background: rgba(17, 24, 39, 0.96) !important;
    transform: scale(1.12) !important;
}

.img-expand-badge svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    flex-shrink: 0 !important;
    display: block !important;
}

/* Visor Pantalla Completa Modal (v1.6.7 - Fondo Negro Puro Sin Doble Marco) */
.img-lightbox-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(8, 8, 10, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 99999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.25rem !important;
    box-sizing: border-box !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
}

.img-lightbox-overlay.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

.img-lightbox-content {
    position: relative !important;
    max-width: 92vw !important;
    max-height: 88vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: auto !important;
    box-shadow: none !important;
    transform: scale(0.92) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.img-lightbox-overlay.active .img-lightbox-content {
    transform: scale(1) !important;
}

.img-lightbox-close {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-bottom: 10px !important;
    margin-left: auto !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 50 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.img-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.38) !important;
    transform: scale(1.1) !important;
}

.img-lightbox-close svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
}

.img-lightbox-img {
    max-width: 92vw !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75) !important;
    background: transparent !important;
    display: block !important;
}

/* Desactivar lupa y cursor de expansiÃ³n en pantallas tÃ¡ctiles (MÃ³vil y Tablet < 1024px) */
@media (max-width: 1023px) {
    .img-expand-badge {
        display: none !important;
    }
    .img-expand-wrapper {
        cursor: default !important;
    }
}

@media (max-width: 640px) {
    .img-expand-wrapper,
    .dn-modal-body .img-expand-wrapper,
    .accordion-body .img-expand-wrapper {
        height: 190px !important;
        max-height: 190px !important;
    }

    .img-lightbox-content {
        max-width: 95vw !important;
        max-height: 90vh !important;
    }

    .img-lightbox-img {
        max-width: 94vw !important;
        max-height: 82vh !important;
    }

    .img-lightbox-close {
        margin-bottom: 8px !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
    }
}


/* =====================================================
   SEARCH DROPDOWN AUTOCOMPLETE
   ===================================================== */

.search-dropdown {
    position: absolute;
    z-index: var(--z-search);
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-dropdown);
    border: 1px solid var(--color-border);
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
    display: none;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--color-border-soft);
    transition: background 0.12s;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: var(--color-surface-hover);
}

.search-dropdown-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-border-muted);
    flex-shrink: 0;
}

.search-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.search-dropdown-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.search-dropdown-price {
    font-size: 0.8rem;
    color: var(--color-text-subtle);
}

.search-dropdown-empty {
    padding: 1rem 1.25rem;
    color: var(--color-text-soft);
    font-size: 0.9rem;
}

.search-dropdown-empty strong {
    color: var(--color-text);
}
/* =========================================================================
   Sistema de Valoraciones y ReseÃ±as de Clientes (WooCommerce Integrado)
   ========================================================================= */

:root {
    --star-filled-color: #fbbf24;
    --star-empty-color: #e2e8f0;
    --verified-green: #059669;
    --verified-bg: #ecfdf5;
    --verified-border: #d1fae5;
}

/* 1. Resumen de ValoraciÃ³n Superior (Ficha de Producto) */
.product-rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}

.product-rating-summary:hover {
    opacity: 0.85;
}

.product-rating-summary .reviews-count-link {
    color: var(--color-text-muted, #706a65);
    text-decoration: none;
    font-weight: 500;
}

.product-rating-summary:hover .reviews-count-link {
    text-decoration: underline;
    color: var(--color-text-strong, #2c160f);
}

/* 2. Estrellas de ValoraciÃ³n Exacta (OpciÃ³n B: Overlapping + Ancho Porcentual) */
.rating-stars-outer {
    --star-size: 1.1rem;
    position: relative;
    display: inline-block;
    width: calc(var(--star-size) * 5);
    height: var(--star-size);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/></svg>");
    background-repeat: repeat-x;
    background-size: var(--star-size) var(--star-size);
    user-select: none;
}

.rating-stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0; /* JS controlarÃ¡ esto dinÃ¡micamente: (rating / 5) * 100% */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fbbf24' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/></svg>");
    background-repeat: repeat-x;
    background-size: var(--star-size) var(--star-size);
}

/* 3. SecciÃ³n Inferior de Opiniones */
.product-reviews-section {
    width: 100%;
    margin-top: 3.5rem;
    grid-column: 1 / -1; /* Ocupa todo el ancho en grids de la pÃ¡gina de producto */
}

.product-reviews-section .section-divider {
    border: 0;
    border-top: 1px solid var(--color-border-soft, #e5e7eb);
    margin: 2.5rem 0;
}

.product-reviews-section .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-strong, #2c160f);
    margin-bottom: 2rem;
}

/* Contenedor Principal de la SecciÃ³n */
.reviews-summary-card {
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-soft, #e5e7eb);
    border-radius: 18px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
    margin-bottom: 3rem;
    position: relative;
}

@media (max-width: 768px) {
    .reviews-summary-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

.summary-main-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .summary-main-info {
        align-items: center;
        text-align: center;
    }
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.rating-display .average-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-text-strong, #2c160f);
    line-height: 1;
}

.stars-display-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .stars-display-wrapper {
        align-items: center;
    }
}

.stars-display-wrapper .total-reviews-count {
    font-size: 0.85rem;
    color: var(--color-text-muted, #706a65);
    font-weight: 500;
}

.toggle-bars-btn {
    background: none;
    border: none;
    color: var(--color-accent, #e5a85a);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
    outline: none;
}

.toggle-bars-btn:hover {
    color: var(--color-primary, #111111);
}

/* Contenedor colapsable de barras de progreso */
.rating-bars-container {
    grid-column: 1 / -1;
    width: 100%;
    border-top: 1px dashed var(--color-border-soft, #e5e7eb);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    animation: slideDownFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.summary-actions-cta {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-end;
    width: 100%;
}

@media (max-width: 768px) {
    .summary-actions-cta {
        align-items: center;
    }
}

.summary-actions-cta .write-review-btn {
    max-width: 260px;
    align-self: flex-end;
}

@media (max-width: 768px) {
    .summary-actions-cta .write-review-btn {
        max-width: 100%;
        align-self: center;
    }
}

/* BotÃ³n Escribir ValoraciÃ³n */
.write-review-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background-color: var(--color-primary, #2c160f);
    color: var(--color-surface, #ffffff);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.5rem;
}

.write-review-btn:hover {
    background-color: var(--color-accent, #e5a85a);
    color: var(--color-text-strong, #2c160f);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(229, 168, 90, 0.15);
}

.write-review-btn:active {
    transform: translateY(0);
}

.write-review-btn.active {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
    box-shadow: none !important;
    transform: none !important;
}

.write-review-btn.active:hover {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
}

/* Bloque de Incentivo al Voto (CTA) */
.reviews-cta-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
}

.reviews-cta-box .cta-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-medium, #4e463f);
}

@media (max-width: 768px) {
    .reviews-cta-box {
        align-items: center;
    }
}

.cta-stars-selector {
    display: flex;
    gap: 6px;
}

.cta-stars-selector button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.cta-stars-selector button:hover {
    transform: scale(1.2);
}

.cta-stars-selector button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--star-empty-color, #cbd5e1);
    stroke-width: 2px;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

.cta-stars-selector button.hovered svg {
    fill: var(--star-filled-color, #fbbf24);
    stroke: var(--star-filled-color, #fbbf24);
}



/* Desglose de Barras de CalificaciÃ³n */
.rating-bars-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    width: 100%;
    color: var(--color-text-medium, #4e463f);
}

.rating-bar-row .bar-label {
    width: 70px;
    text-align: right;
    white-space: nowrap;
    font-weight: 500;
}

.rating-bar-row .bar-outer {
    flex-grow: 1;
    height: 8px;
    background: var(--color-surface-soft, #f4f1eb);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rating-bar-row .bar-inner {
    height: 100%;
    background: var(--star-filled-color);
    border-radius: 4px;
    width: 0; /* Controlado dinÃ¡micamente por JS */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rating-bar-row .bar-count {
    width: 25px;
    text-align: left;
    color: var(--color-text-muted, #706a65);
    font-weight: 500;
}

/* Grilla de ReseÃ±as Destacadas */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

/* Ocultar la cuarta reseÃ±a por defecto (mÃ³viles y desktop) */
.reviews-grid .review-card:nth-child(4) {
    display: none !important;
}

@media (max-width: 992px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mostrar la cuarta reseÃ±a Ãºnicamente en pantallas medianas / tablets (2 columnas) */
@media (min-width: 769px) and (max-width: 992px) {
    .reviews-grid .review-card:nth-child(4) {
        display: flex !important;
    }
    /* Ocultar el botÃ³n "Leer mÃ¡s" si hay exactamente 4 reseÃ±as en total */
    .reviews-grid:has(.review-card:nth-child(4):last-child) + .all-reviews-btn-wrapper {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.all-reviews-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 3.5rem;
    width: 100%;
}

.view-all-reviews-btn {
    padding: 0.85rem 2rem;
    background-color: var(--color-text-strong, #2c160f);
    color: var(--color-surface, #ffffff);
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.view-all-reviews-btn:hover {
    background-color: var(--color-accent, #e5a85a);
    color: var(--color-text-strong, #2c160f);
    transform: translateY(-2px);
}

.reviews-empty-state {
    padding: 3rem 1.5rem;
    background: var(--color-surface-soft, #f4f1eb);
    border: 1px dashed var(--color-border-soft, #e5e7eb);
    border-radius: 12px;
    text-align: center;
    color: var(--color-text-muted, #706a65);
    font-size: 0.95rem;
}

/* Tarjeta de ReseÃ±a Individual */
.review-card {
    background: var(--color-surface, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.04);
}

.review-card .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.review-card .review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.review-card .review-author {
    font-weight: 600;
    color: var(--color-text-strong, #2c160f);
    font-size: 0.95rem;
}

.review-card .verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--verified-green);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.review-card .verified-badge svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    flex-shrink: 0;
}

.review-card .review-date {
    font-size: 0.8rem;
    color: var(--color-text-subtle, #a39b94);
    font-weight: 500;
}

.review-card .review-comment {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text, #2c160f);
    white-space: pre-line;
}

/* Respuestas a las valoraciones (Identadas) */
.review-replies-list {
    margin-top: 1rem;
    padding-left: 0;
    border-left: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-reply-card {
    padding: 0.75rem 1rem;
    background: var(--color-surface-soft, #f4f1eb);
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.review-reply-card.store-reply {
    background: #fbf8f3 !important; /* Crema cÃ¡lido para destacar la tienda */
    border: 1px solid color-mix(in srgb, var(--color-accent, #e5a85a) 25%, transparent) !important;
}

.review-reply-card .reply-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--color-text-strong, #2c160f);
}

.review-reply-card .reply-store-icon {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    flex-shrink: 0;
}

.review-reply-card .reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.review-reply-card .reply-date {
    font-weight: normal;
    font-size: 0.75rem;
    color: var(--color-text-subtle, #a39b94);
}

.review-reply-card .reply-content {
    line-height: 1.5;
    color: var(--color-text, #2c160f);
}

.review-reply-card .reply-content p {
    margin: 0;
}

/* Expandable Text (Read More / Less) */
.expandable-text-wrapper .text-truncated {
    display: none;
}
.expandable-text-wrapper .text-full {
    display: inline;
}
.expandable-text-wrapper .read-more-btn,
.expandable-text-wrapper .read-less-btn {
    display: none;
}

/* PC Mode Only */
@media (min-width: 769px) {
    .expandable-text-wrapper .text-truncated {
        display: inline;
    }
    .expandable-text-wrapper .text-full {
        display: none;
    }
    .expandable-text-wrapper .read-more-btn {
        display: inline-flex;
        align-items: center;
        background: none;
        border: none;
        color: var(--color-accent, #e5a85a);
        font-weight: 600;
        font-size: 0.85rem;
        cursor: pointer;
        padding: 0;
        margin-left: 6px;
        text-decoration: underline;
        transition: color 0.2s ease;
        outline: none;
    }
    .expandable-text-wrapper .read-more-btn:hover {
        color: var(--color-primary, #111111);
    }
    .expandable-text-wrapper .read-less-btn {
        display: none;
        align-items: center;
        background: none;
        border: none;
        color: var(--color-accent, #e5a85a);
        font-weight: 600;
        font-size: 0.85rem;
        cursor: pointer;
        padding: 0;
        margin-left: 6px;
        text-decoration: underline;
        transition: color 0.2s ease;
        outline: none;
    }
    .expandable-text-wrapper .read-less-btn:hover {
        color: var(--color-primary, #111111);
    }
    
    /* Expanded State */
    .expandable-text-wrapper.is-expanded .text-truncated {
        display: none;
    }
    .expandable-text-wrapper.is-expanded .text-full {
        display: inline;
    }
    .expandable-text-wrapper.is-expanded .read-more-btn {
        display: none;
    }
    .expandable-text-wrapper.is-expanded .read-less-btn {
        display: inline-flex;
    }
}

/* 4. Formulario de CalificaciÃ³n */
.review-form-container {
    background: #fdfbf7; /* Fondo crema cÃ¡lido muy suave */
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 2.5rem;
    margin-top: 3.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    animation: slideDownFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .review-form-container {
        padding: 1.5rem;
    }
}

.review-form-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-strong, #2c160f);
    margin-bottom: 1.5rem;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-form .form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .review-form .form-row-2col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.review-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-strong, #2c160f);
}

.review-form .form-help-text {
    font-size: 0.75rem;
    color: var(--color-text-subtle, #a39b94);
    margin-top: -2px;
}

/* Inputs y Controles */
.review-form input[type="text"],
.review-form input[type="email"],
.review-form textarea {
    padding: 0.8rem 1.1rem;
    border: 1.5px solid var(--color-border-soft, #e5e7eb);
    border-radius: 10px;
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #2c160f);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-form input[type="text"]:focus,
.review-form input[type="email"]:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--color-accent, #e5a85a);
    box-shadow: 0 0 0 4px rgba(229, 168, 90, 0.15);
}

.review-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Wrapper del Selector de Estrellas en Formulario */
.rating-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.star-rating-hint {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted, #706a65);
    background: var(--color-surface-soft, #f4f1eb);
    padding: 4px 10px;
    border-radius: 6px;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    user-select: none;
    border: 1px solid transparent;
}

.star-rating-hint.active {
    opacity: 1;
    transform: translateX(0);
    color: var(--color-accent, #e5a85a);
    background: rgba(229, 168, 90, 0.08);
    border: 1px solid rgba(229, 168, 90, 0.15);
}

/* Selector Interactivo de Estrellas */
.star-rating-selector {
    display: flex;
    gap: 6px;
}

.star-rating-selector button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-rating-selector button:hover {
    transform: scale(1.2);
}

.star-rating-selector button svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--star-empty-color);
    stroke-width: 2px;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

/* IluminaciÃ³n de estrellas */
.star-rating-selector button.hovered svg,
.star-rating-selector button.selected svg {
    fill: var(--star-filled-color);
    stroke: var(--star-filled-color);
}

/* Mensajes de Feedback */
.form-status-msg {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    animation: fadeInStatus 0.3s ease;
}

@keyframes fadeInStatus {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-status-msg.success {
    background: var(--verified-bg);
    color: var(--verified-green);
    border: 1px solid var(--verified-border);
}

.form-status-msg.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.form-status-msg.loading {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-status-msg.loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid #94a3b8;
    border-top-color: #475569;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* BotÃ³n de Enviar */
.submit-review-btn {
    padding: 0.85rem 2rem;
    background: var(--color-text-strong, #2c160f);
    color: var(--color-surface, #ffffff);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    align-self: flex-start;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.submit-review-btn:hover {
    background-color: var(--color-accent, #e5a85a);
    color: var(--color-text-strong, #2c160f);
}

.submit-review-btn:active {
    transform: scale(0.98);
}

.submit-review-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal de Todas las ReseÃ±as */
.reviews-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.reviews-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.reviews-modal-content {
    position: relative;
    background: var(--color-surface, #ffffff);
    border-radius: 20px;
    width: 100%;
    max-width: 750px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    animation: modalAppear 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.reviews-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-border-soft, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface, #ffffff);
}

.header-sort-filter {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.reviews-modal-header .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-strong, #2c160f);
    margin: 0;
}

.sort-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-selector-wrapper .sort-label {
    font-size: 0.85rem;
    color: var(--color-text-muted, #706a65);
    font-weight: 500;
}

.modal-sort-select {
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    border: 1px solid var(--color-border-soft, #e5e7eb);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--color-text-strong, #2c160f);
    background: var(--color-surface, #ffffff) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23706a65' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 8px center;
    background-size: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.modal-sort-select:focus {
    border-color: var(--color-accent, #e5a85a);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--color-text-muted, #706a65);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.close-modal-btn:hover {
    color: var(--color-danger, #e74c3c);
}

.reviews-modal-body {
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #faf8f5;
}

/* Evitar scroll del body */
body.modal-open {
    overflow: hidden !important;
}
/* =====================================================
/* =====================================================
   RESPONSIVE â€” PC (768px and up)
   ===================================================== */

/* --- Base PC styles (768px+) --- */
@media (min-width: 768px) {

    /* Scrollbar visible on desktop */
    html,
    body {
        -ms-overflow-style: auto;
        scrollbar-width: thin;
    }

    ::-webkit-scrollbar {
        display: block;
        width: 6px;
        height: 6px;
        background: var(--color-surface-soft);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--color-border-hover);
        border-radius: var(--radius-pill);
    }

    /* Header PC */
    .header {
        height: 70px;
        padding: 0 2rem;
    }

    .header-left {
        display: none;
    }

    .logo {
        position: static;
        transform: none;
    }

    .logo h1 {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    /* Permanent search bar in center */
    .search-bar {
        position: relative;
        left: auto;
        right: auto;
        flex: 1;
        margin: 0 2rem;
        opacity: 1;
        pointer-events: all;
        transition: none;
        max-width: 500px;
    }

    #search-input {
        background: var(--color-search-bg, var(--color-surface-soft));
        border: none;
        border-radius: var(--radius-md);
    }

    .search-icon {
        display: none;
    }

    /* Desktop nav visible */
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 0.125rem;
        margin-right: 1.25rem;
    }

    .dn-item {
        position: relative;
    }

    .dn-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        background: none;
        border: none;
        font-size: 0.88rem;
        font-weight: 500;
        color: var(--color-text-medium);
        cursor: pointer;
        padding: 0.45rem 0.8rem;
        border-radius: var(--radius-md);
        transition: background-color 0.18s, color 0.18s;
        white-space: nowrap;
        font-family: inherit;
    }

    .dn-btn:hover {
        background-color: var(--color-surface-soft);
        color: var(--color-text-strong);
    }

    .dn-item.active .dn-btn {
        background-color: var(--color-surface-soft);
        color: var(--color-text-strong);
    }

    .dn-plus {
        flex-shrink: 0;
        opacity: 0.45;
        transition: opacity 0.2s, transform 0.2s;
    }

    .dn-btn:hover .dn-plus {
        opacity: 0.9;
    }

    .dn-item.active .dn-plus {
        opacity: 1;
        transform: rotate(45deg);
    }

    /* Hero PC */
    .hero {
        height: 360px;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1.15rem;
    }

    /* Categories nav */
    .categories {
        top: 70px;
        padding: 0.75rem 0;
    }

    .categories-list {
        justify-content: center;
        overflow-x: visible;
        padding: 0 2rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Category section headers */
    .category-header {
        padding: 0 2rem 0.75rem;
    }

    .catalog-controls {
        padding: 1rem 2rem 1rem;
    }

    .catalog-view-toggle {
        display: inline-flex;
    }

    .catalog-view-btn[data-view-mode="large"] {
        display: none;
    }

    /* Products grid â€” 3 columns on PC base */
    .products-carousel,
    .products-grid,
    .products-large,
    .products-list,
    .products-horizontal {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
        padding: 0 2rem 1rem;
        gap: 1rem;
        scroll-snap-type: none;
    }

    .products-carousel .product-card,
    .products-grid .product-card,
    .products-large .product-card,
    .products-list .product-card,
    .products-horizontal .product-card {
        flex: none;
        min-width: unset;
        scroll-snap-align: none;
    }

    .products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-list .product-card {
        flex-direction: row;
        min-height: 132px;
    }

    .products-list .product-card-img-wrapper {
        width: 38%;
        max-width: 140px;
        flex: 0 0 38%;
        aspect-ratio: auto;
        height: 100%;
    }

    .products-list .product-card-info {
        display: flex;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 2rem 1rem;
        gap: 1rem;
    }

    /* Product cards hover */
    .product-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-card-hover);
    }

    .add-to-cart-btn:hover {
        background-color: #777777;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }

    .whatsapp-btn:hover {
        background-color: var(--color-whatsapp-hover-desktop);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 85, 0, 0.25);
    }

    .whatsapp-btn.checkout-btn:hover {
        background-color: #FF742E;
    }

    /* Cart drawer wider */
    .cart-drawer {
        width: 380px;
    }

    /* Mobile menu wider */
    .mobile-menu {
        width: 80vw;
    }

    /* â”€â”€ Page layout: sidebar + content â”€â”€ */
    .page-body {
        display: flex;
        align-items: flex-start;
        padding: 0 2rem;
        margin-top: 1.5rem;
    }

    /* Sidebar: categories */
    .categories {
        position: sticky;
        top: 70px;
        width: 220px;
        flex-shrink: 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
        padding: 0 0;
        margin-bottom: 0;
        box-shadow: none;
        border-right: 1px solid var(--color-border);
        background: var(--color-cat-bar-bg, var(--color-surface));
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .categories-title {
        display: block;
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--color-text);
        padding: 1.25rem 1rem 0.75rem;
        border-bottom: 1px solid var(--color-border-muted);
        margin-bottom: 0.5rem;
    }

    .categories-list {
        flex-direction: column;
        overflow-x: visible;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0;
        gap: 0;
        max-width: none;
        margin: 0;
    }

    .categories::before,
    .categories::after {
        content: none;
    }

    .categories-list li {
        width: 100%;
    }

    .categories-list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.65rem 1rem 0.65rem 1.1rem;
        white-space: normal;
    }

    .categories-list a span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.35;
        max-height: 2.7em;
        word-break: break-word;
        flex: 1;
        margin-right: 0.5rem;
        text-align: left;
        white-space: normal;
    }

    .categories-list a {
        border-radius: 0;
        border-left: 3px solid transparent;
        font-size: 0.9rem;
        font-weight: 400;
        color: var(--color-cat-tab-text, var(--color-text-muted));
        background: var(--color-cat-tab-bg, transparent);
        transition: background 0.15s, color 0.15s, border-color 0.15s;
    }

    .categories-list a::after {
        content: '\203a';
        font-size: 1.15rem;
        line-height: 1;
        color: var(--color-border-strong);
        transition: color 0.15s, transform 0.15s;
    }

    .categories-list a:hover {
        background: var(--color-surface-hover);
        color: var(--color-text-strong);
        border-left-color: var(--color-border-hover);
    }

    .categories-list a:hover::after {
        color: var(--color-text-faint);
        transform: translateX(3px);
    }

    .categories-list li.active a {
        background: var(--color-cat-tab-active-bg, var(--color-active-bg));
        color: var(--color-cat-tab-active-text, var(--color-active));
        border-left-color: var(--color-cat-tab-active-bg, var(--color-active));
        font-weight: 600;
    }

    .categories-list li.active a::after {
        color: var(--color-cat-tab-active-text, var(--color-active));
    }

    /* Main content beside sidebar */
    #main-content {
        flex: 1;
        min-width: 0;
        padding-top: 1rem;
    }

    .catalog-controls {
        max-width: none;
        margin: 0;
        padding: 1rem 1.5rem 1rem;
    }

    .products-carousel,
    .products-large,
    .products-list,
    .products-horizontal,
    .products-grid {
        max-width: none;
        margin: 0;
        padding: 0 1.5rem 1rem;
    }

    .category-header {
        max-width: none;
        margin: 0;
        padding: 0 1.5rem 0.75rem;
    }

    /* â”€â”€ Product detail page â€” 2-column flex layout â”€â”€ */
    .product-page {
        padding: 2rem 9%;
        display: block;
    }

    .product-detail-columns {
        display: flex;
        flex-direction: row;
        gap: 0 3rem;
        align-items: flex-start;
        width: 100%;
        margin-bottom: 2.5rem;
    }

    .breadcrumb {
        margin-bottom: 1rem;
    }

    .product-col-left {
        flex: 0 0 53%;
        max-width: 53%;
        display: flex;
        flex-direction: row-reverse;
        gap: 1.25rem;
        align-items: flex-start;
        position: sticky;
        top: 80px;
        align-self: flex-start;
    }

    .product-col-left.no-thumbnails {
        flex: 0 0 calc(52% - 92px);
        max-width: calc(52% - 92px);
        display: block;
    }

    .product-image-container {
        flex: 1;
        width: auto;
        margin-bottom: 0;
        max-height: calc(100vh - 180px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .product-thumbnails {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: visible;
        margin: 0;
        flex: 0 0 72px;
        width: 72px;
        max-height: 480px;
    }

    .product-col-left.no-thumbnails .product-thumbnails {
        display: none !important;
    }

    .product-col-right {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .product-col-right .product-title {
        font-size: 1.65rem;
        margin-bottom: 0.5rem;
    }

    .product-col-right .product-price {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }

    .product-col-right .product-description {
        margin-bottom: 1rem;
    }

    .product-col-right .product-variants {
        margin-bottom: 0.75rem;
    }

    .product-col-right .product-qty-selector {
        margin-bottom: 0.75rem;
    }

    .product-col-right .product-buttons {
        flex-direction: row;
        gap: 0.75rem;
    }

    .product-col-right .product-buttons .add-to-cart-btn,
    .product-col-right .product-buttons .whatsapp-btn {
        flex: 1;
    }

    .product-title,
    .product-price,
    .product-description,
    .product-variants,
    .product-qty-selector,
    .product-buttons,
    .product-image-container,
    .product-thumbnails {
        grid-column: unset;
        grid-row: unset;
    }
}

/* --- Medium desktop / tablet landscape product gallery tweak (768px to 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-col-left {
        flex: 0 0 calc(53% - 92px);
        max-width: calc(53% - 92px);
        flex-direction: column;
        gap: 0.75rem;
    }

    .product-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        margin: 0;
        flex: 0 0 auto;
        width: 100%;
        max-height: none;
    }
}

/* --- Wide desktop tweaks (1024px+) --- */
@media (min-width: 1024px) {

    .header {
        padding: 0 var(--page-side);
    }

    .hero {
        height: 440px;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }

    /* Products â€” 4 columns on wide screens */
    .products-carousel,
    .products-large,
    .products-horizontal {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-body {
        padding: 0 var(--page-side);
    }

    /* DiseÃ±o de Ficha Expandida (Fuera del Margen) */
    .product-page.gallery-layout-outside {
        padding: 2rem 4% 2rem 100px;
    }

    .gallery-layout-outside .product-col-left {
        flex: 0 0 calc(53% + 92px);
        max-width: calc(53% + 92px);
        margin-left: -92px;
    }

    .gallery-layout-outside .product-col-left.no-thumbnails {
        flex: 0 0 53%;
        max-width: 53%;
        margin-left: 0;
    }

    /* DiseÃ±o de Ficha con Miniaturas Abajo */
    .product-page.gallery-layout-bottom {
        padding: 2rem 9%;
    }

    .gallery-layout-bottom .product-col-left {
        flex: 0 0 53%;
        max-width: 53%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .gallery-layout-bottom .product-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        margin: 0;
        flex: 0 0 auto;
        width: 100%;
        max-height: none;
    }
}

/* ==========================================================================
   Tabla de Precios por Mayor y Escalas (Volume Pricing)
   ========================================================================== */
.volume-pricing-table-container {
    background: #ffffff;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 16px 18px;
    margin: 16px 0 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.volume-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border, #f1f5f9);
    flex-wrap: wrap;
    gap: 6px;
}

.volume-table-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-strong, #0f172a);
}

.volume-table-title-box h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.volume-table-tip {
    font-size: 0.75rem;
    color: var(--color-text-muted, #64748b);
}

.volume-table-wrapper {
    overflow-x: auto;
}

.volume-pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.volume-pricing-table th {
    padding: 8px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted, #64748b);
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.volume-tier-row {
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--color-border, #f1f5f9);
}

.volume-tier-row:hover {
    background-color: var(--color-surface-soft, #f8fafc);
}

.volume-tier-row.active {
    background-color: #ecfdf5 !important;
    border-left: 4px solid #10b981;
}

.volume-pricing-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.volume-pricing-table .col-qty {
    font-weight: 500;
    color: var(--color-text-strong, #0f172a);
}

.volume-tier-row.active .col-qty {
    font-weight: 700;
    color: #047857;
}

.col-price .price-val {
    color: var(--color-text-strong, #0f172a);
    font-size: 0.95rem;
}

.volume-tier-row.active .col-price .price-val {
    color: #047857;
    font-weight: 700;
}

.tier-saving-text {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
}

.tier-saving-text.save {
    color: #059669;
}

.tier-saving-text.wholesale {
    color: #2563eb;
}

.tier-saving-text.base {
    color: #64748b;
}

.volume-tier-row.active .tier-saving-text.save,
.volume-tier-row.active .tier-saving-text.wholesale,
.volume-tier-row.active .tier-saving-text.base {
    color: #047857;
    font-weight: 700;
}

.product-badge.b2b-badge {
    display: inline-flex !important;
    align-items: center;
    background-color: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    font-size: 0.72rem;
    border-radius: 6px;
    padding: 2px 7px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: -0.1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

