/* -------------------------------------------------------------
   Elena's Haus - Tema Premium WooCommerce (Storefront Child)
   Diseño Moderno, Limpio y de Altas Prestaciones
   ------------------------------------------------------------- */

/* VARIABLES DE DISEÑO (SISTEMA DE COLOR ELENA'S HAUS - IDENTIDAD CORPORATIVA REAL) */
:root {
    --bg-primary: #133250;        /* Azul Corporativo Elena's Haus (#133250) */
    --bg-secondary: #0d233a;      /* Azul Profundo complementario */
    --bg-light: #f8fafc;          /* Fondo general claro de la tienda */
    --text-dark: #0f172a;         /* Texto principal */
    --text-muted: #64748b;        /* Texto secundario/desactivado */
    --color-accent: #f05a28;      /* Naranja Fachada Elena's Haus (del frontón/techo del rótulo) */
    --color-accent-hover: #d84818;
    --color-blue-brand: #133250;  /* Azul de marca */
    --color-cyan: #0284c7;        /* Acento cyan/azul secundario */
    --border-color: #e2e8f0;      /* Bordes suaves */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 18px rgba(19, 50, 80, 0.08);
    --shadow-lg: 0 10px 30px rgba(19, 50, 80, 0.12);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* GENERAL & RESET CON PAPEL TAPIZ DE CATEGORÍAS */
html,
body {
    background-color: #f8fafc !important;
    background-image: url('../images/pattern-categories.svg') !important;
    background-repeat: repeat !important;
    background-size: 420px 420px !important;
    background-attachment: fixed !important;
    font-family: var(--font-sans) !important;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

#page,
.site,
#content,
.site-content,
.content-area,
.site-main {
    background: transparent !important;
    background-color: transparent !important;
}

/* AMPLIAR ANCHO GENERAL DE LA WEB */
.col-full,
.ct-container {
    max-width: 1720px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--text-dark);
    font-weight: 700;
}

/* TOPBAR */
.clictienda-topbar {
    background-color: var(--bg-primary);
    color: #ffffff;
    font-size: 0.85rem;
    padding: 0.6rem 0;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clictienda-topbar a {
    color: var(--color-accent) !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
}

.clictienda-topbar a:hover {
    color: #ffffff !important;
    transform: scale(1.05);
}

.clictienda-topbar a svg {
    transition: transform 0.3s ease;
}

.clictienda-topbar a:hover svg {
    transform: rotate(15deg) scale(1.15);
}

/* HEADER PRINCIPAL */
.clictienda-header {
    background: #ffffff;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.ct-container {
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ct-header-flex {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
}

@media (max-width: 991px) {
    .ct-header-flex {
        grid-template-columns: auto 1fr auto;
        row-gap: 0.85rem;
        column-gap: 0.75rem;
    }
    .ct-header-logo {
        order: 1;
    }
    .ct-header-cats {
        order: 2;
        display: flex;
        justify-content: flex-end;
    }
    .ct-header-cart {
        order: 3;
    }
    .ct-header-search {
        grid-column: span 3;
        order: 4;
        max-width: 100%;
    }
    .clictienda-topbar .ct-container {
        flex-direction: column;
        gap: 0.35rem;
        text-align: center;
        font-size: 0.78rem;
    }
}

.ct-header-logo img {
    height: 68px;
    width: auto;
    max-height: 75px;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

@media (max-width: 991px) {
    .ct-header-logo img {
        height: 52px;
    }
}

.ct-header-logo img:hover {
    transform: scale(1.03);
}

/* BOTÓN CATEGORÍAS */
.ct-btn-primary {
    background-color: var(--bg-primary);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-btn-primary:hover {
    background-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transform: translateY(-1px);
}

.ct-menu-icon {
    font-size: 1.1rem;
}

/* BUSCADOR DE PRODUCTOS (FiboSearch o fallback clásico estilizado) */
.ct-header-search {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.ct-search-form {
    width: 100%;
}

.ct-search-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    background-color: #f1f5f9;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 100%;
}

.ct-search-icon-svg {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    color: var(--color-accent) !important; /* Lupa naranja por defecto */
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-search-input-wrapper:hover .ct-search-icon-svg {
    transform: scale(1.15) rotate(-8deg); /* Giro sutil al pasar el mouse por la barra */
}

.ct-search-field {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0.75rem 5.5rem 0.75rem 2.75rem !important; /* Margen para ícono y botón */
    font-size: 0.92rem !important;
    color: var(--text-dark) !important;
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
}

.ct-search-submit-btn {
    position: absolute;
    right: 4px;
    background-color: var(--bg-primary);
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: calc(var(--radius-md) - 2px);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ct-search-submit-btn:hover {
    background-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

/* Foco de búsqueda */
.ct-search-input-wrapper:focus-within {
    background-color: #ffffff;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.ct-search-input-wrapper:focus-within .ct-search-icon-svg {
    animation: ctSearchPulse 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animación de pulso y rotación para la lupa al hacer click */
@keyframes ctSearchPulse {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(15deg); }
    100% { transform: scale(1.1) rotate(0deg); }
}

/* Estilos específicos para FiboSearch si está activo */
.dgwt-wcas-search-wrapp {
    max-width: 100% !important;
}
.dgwt-wcas-sf-wrapp {
    border-radius: var(--radius-md) !important;
    border: 2px solid transparent !important;
    background-color: #f1f5f9 !important;
    transition: all 0.3s ease !important;
}
.dgwt-wcas-sf-wrapp:focus-within {
    background-color: #ffffff !important;
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12) !important;
}

/* Colorear la lupa de FiboSearch en Naranja */
.dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier path,
.dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier-handler path {
    fill: var(--color-accent) !important;
}

/* Transición para la lupa de FiboSearch */
.dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier,
.dgwt-wcas-search-wrapp .dgwt-wcas-ico-magnifier-handler {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Efecto hover sobre el buscador */
.dgwt-wcas-search-wrapp:hover .dgwt-wcas-ico-magnifier,
.dgwt-wcas-search-wrapp:hover .dgwt-wcas-ico-magnifier-handler {
    transform: scale(1.15) rotate(-8deg) !important;
}

/* Animación de pulso al hacer click en el buscador */
.dgwt-wcas-search-wrapp:focus-within .dgwt-wcas-ico-magnifier,
.dgwt-wcas-search-wrapp:focus-within .dgwt-wcas-ico-magnifier-handler {
    animation: ctSearchPulse 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}


/* CARRITO */
.ct-header-cart {
    display: flex;
    justify-content: flex-end;
}

.ct-header-cart .site-header-cart {
    margin: 0;
    list-style: none;
}

/* DRAWER / SIDEBAR CATEGORÍAS (Responsivo y Elegante) */
.clictienda-sidebar {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Comportamiento Off-Canvas en móvil por defecto */
@media (max-width: 991px) {
    .clictienda-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        height: 100%;
        z-index: 10000;
        border-radius: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .clictienda-sidebar.open {
        transform: translateX(0);
    }
}

/* En Desktop (>= 992px) dentro del layout de tienda: Siempre visible, fijo/sticky en columna izquierda */
@media (min-width: 992px) {
    .clictienda-shop-layout .clictienda-sidebar {
        display: block !important;
        position: sticky !important;
        top: 24px !important;
        left: auto !important;
        width: 100% !important;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        transform: none !important;
        box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
        background: #ffffff;
        border-radius: 16px;
        border: 1px solid #e2e8f0;
        padding: 1.5rem;
        z-index: 10;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }
    .clictienda-shop-layout .clictienda-sidebar::-webkit-scrollbar {
        width: 5px;
    }
    .clictienda-shop-layout .clictienda-sidebar::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        border-radius: 4px;
    }
    .clictienda-shop-layout .clictienda-drawer-overlay {
        display: none !important;
    }
    .clictienda-shop-layout .clictienda-drawer-close {
        display: none !important;
    }
}

/* Forzar que el Drawer Global funcione como Off-Canvas también en PC (Páginas sin sidebar como Home o Carrito) */
.clictienda-global-drawer {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    z-index: 10000;
    border-radius: 0 !important;
    overflow-y: auto;
    transform: translateX(-100%) !important;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.clictienda-global-drawer.open {
    transform: translateX(0) !important;
}
.clictienda-global-drawer .clictienda-drawer-close {
    display: flex !important;
}

/* Ocultar el botón de categorías del header en PC cuando ya se tiene el sidebar visible en la tienda */
@media (min-width: 992px) {
    body.archive.woocommerce-page #ct-cat-btn,
    body.search.woocommerce-page #ct-cat-btn {
        display: none !important;
    }
}

/* Para pantallas grandes, si está en el layout de tienda */
.clictienda-shop-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    max-width: 1720px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
    align-items: start;
}

@media (max-width: 991px) {
    .clictienda-shop-layout {
        grid-template-columns: 1fr;
    }
}

/* Botón cerrar del Drawer */
.clictienda-drawer-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    cursor: pointer;
    margin-bottom: 1.5rem;
    align-items: center;
}

@media (max-width: 991px) {
    .clictienda-drawer-close {
        display: flex;
    }
}

/* Capa oscura de overlay */
.clictienda-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
}

.clictienda-drawer-overlay.open {
    display: block;
}

/* Bloqueo del scroll del body */
body.no-scroll {
    overflow: hidden;
}

/* ELEMENTOS DEL SIDEBAR AMAZON */
.clictienda-sidebar-amazon {
    background: transparent;
    border: none;
    padding: 0;
}

.sidebar-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark, #0f172a);
    letter-spacing: -0.02em;
    border-left: none;
    padding-left: 0;
}

/* BUSCADOR DE CATEGORÍAS */
.clic-cat-search-container {
    margin-bottom: 1.25rem;
}

.clic-cat-search-input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f1f5f9;
    font-size: 0.88rem;
    color: #334155;
    outline: none;
    transition: all 0.2s ease;
}

.clic-cat-search-input:focus {
    border-color: var(--color-accent);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* LISTADO DE CATEGORÍAS */
.clic-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-item-wrapper {
    margin-bottom: 0.25rem;
    border-bottom: none;
    padding-bottom: 0;
}

.cat-parent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    transition: background-color 0.15s ease;
}

.cat-parent-row:hover {
    background-color: #f8fafc;
}

.cat-parent-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    padding: 0.3rem 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.15s ease;
}

.cat-parent-link:hover {
    color: var(--color-accent, #2563eb);
}

/* Botón toggle de acordeón (Flecha chevron sutil como la imagen) */
.cat-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    flex-shrink: 0;
}

.cat-toggle::after {
    content: "›";
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

.cat-toggle:hover::after {
    color: #1e293b;
}

.cat-toggle.open::after {
    transform: rotate(90deg);
    color: var(--color-accent, #2563eb);
}

/* Subcategorías */
.cat-children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
    display: none;
    border-left: 2px solid var(--border-color);
    margin-top: 0.25rem;
}

.cat-children.open {
    display: block;
}

.cat-child-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    display: block;
    transition: all 0.2s ease;
}

.cat-child-item a:hover {
    color: var(--color-accent);
    padding-left: 4px;
}

/* Contenedor de la grilla de productos (Solo en catálogo/archivo de la tienda) */
.clictienda-shop-content ul.products,
body.archive ul.products,
body.search ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* Revertido a 4 columnas por petición del usuario */
    gap: 1.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
}

.clictienda-shop-content ul.products::before,
.clictienda-shop-content ul.products::after,
body.archive ul.products::before,
body.archive ul.products::after {
    display: none !important; /* Desactivar clear floats heredados */
}

/* TARJETAS DE PRODUCTOS DE LA TIENDA (Solo en listados estándar) */
.clictienda-shop-content ul.products li.product,
body.archive ul.products li.product,
body.search ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: var(--shadow-sm) !important;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Responsividad para la grilla de productos */
@media (max-width: 1440px) {
    .clictienda-shop-content ul.products,
    body.archive ul.products,
    body.search ul.products {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 columnas en laptops estándar */
    }
}
@media (max-width: 1024px) {
    .clictienda-shop-content ul.products,
    body.archive ul.products,
    body.search ul.products {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columnas en laptops pequeñas / tablets */
        gap: 1.25rem !important;
    }
}
@media (max-width: 480px) {
    .clictienda-shop-content ul.products,
    body.archive ul.products,
    body.search ul.products {
        grid-template-columns: 1fr !important; /* 1 columna en móviles pequeños */
    }
}

ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
    border-color: rgba(249, 115, 22, 0.3) !important;
}

ul.products li.product img {
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: transform 0.5s ease;
}

ul.products li.product:hover img {
    transform: scale(1.04);
}

/* Títulos de productos */
ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem !important;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Precios */
ul.products li.product .price {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--color-accent) !important;
    margin-bottom: 1rem !important;
}

/* Botón Añadir al carrito del loop */
ul.products li.product a.button {
    background-color: var(--bg-primary) !important;
    color: #ffffff !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
    text-align: center;
    display: block;
    border: none !important;
    margin-top: 1rem;
}

ul.products li.product a.button:hover {
    background-color: var(--color-accent) !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

/* FOOTER (Elena's Haus Corporativo con Papel Tapiz) */
.clictienda-footer {
    background-color: var(--bg-primary, #133250) !important;
    background-image: url('../images/pattern-categories-white.svg') !important;
    background-repeat: repeat !important;
    background-size: 380px 380px !important;
    color: #e2e8f0 !important;
    padding: 4.5rem 0 2rem;
    margin-top: 5rem;
    border-top: 4px solid var(--color-accent);
    box-shadow: 0 -4px 20px rgba(19, 50, 80, 0.12);
    position: relative;
}

.ct-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .ct-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-logo {
    height: 60px;
    width: auto;
    max-height: 65px;
    object-fit: contain;
    margin-bottom: 1.25rem;
    display: block;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-copy {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* -------------------------------------------------------------
   MEJORAS ESTILO UNIMART (Pills, Drawer Blanco, Tarjetas Modernas)
   ------------------------------------------------------------- */

/* SUB-HEADER DE PILLS */
.clictienda-sub-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    overflow: hidden;
    position: relative; /* Necesario para el gradiente móvil */
}

/* Gradiente para indicar que hay más categorías deslizables a la derecha en móvil */
@media (max-width: 991px) {
    .clictienda-sub-header::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: 60px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 100%);
        pointer-events: none;
        z-index: 2;
    }
}

.ct-sub-flex {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.ct-sub-pills {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    scrollbar-width: none; /* Firefox */
}

@media (max-width: 991px) {
    .ct-sub-pills {
        padding-right: 60px !important; /* Espacio para que la última píldora se desvanezca bajo el gradiente */
    }
}

.ct-sub-pills::-webkit-scrollbar {
    display: none; /* Safari / Chrome */
}

.ct-cat-pill {
    background-color: #ffffff;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem; /* Un poco más espacioso */
    border-radius: 50px; /* Estilo píldora */
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.ct-cat-pill:hover {
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
    background-color: rgba(249, 115, 22, 0.05) !important; /* Fondo naranja muy suave */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15); /* Sombra con tono naranja sutil */
}

/* MEJORAS AL DRAWER (Estilo Unimart Blanco y Limpio) */
.clictienda-sidebar {
    background: #ffffff !important;
}

.clictienda-sidebar-amazon .sidebar-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-dark);
    border-left: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cambiar toggle (+) por Chevron (>) tipo Unimart con CSS puro */
.cat-toggle {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background-color 0.2s ease !important;
}

.cat-toggle:hover {
    background-color: #f1f5f9 !important;
}

.cat-toggle::after {
    content: "\203A" !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    color: var(--text-muted, #64748b) !important;
    transition: transform 0.3s ease, color 0.3s ease !important;
    display: inline-block !important;
}

.cat-toggle.open::after {
    transform: rotate(90deg) !important;
    color: var(--color-accent, #f26522) !important;
}

.cat-parent-link {
    font-size: 0.92rem !important;
    font-weight: 550 !important;
    color: var(--text-dark) !important;
    letter-spacing: -0.01em;
    transition: color 0.2s ease !important;
}

.cat-item-wrapper {
    padding: 0.6rem 0.75rem !important; /* Añadimos padding para el área de hover */
    border-bottom: 1px solid #f1f5f9 !important;
    border-left: 3px solid transparent !important; /* Borde izquierdo transparente por defecto */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 6px !important;
    margin-bottom: 0.25rem !important;
}

.cat-item-wrapper:hover {
    background-color: rgba(249, 115, 22, 0.04) !important; /* Fondo naranja muy sutil */
    border-left-color: var(--color-accent) !important; /* Barra naranja de selección activa */
    padding-left: 1.2rem !important; /* Efecto de desplazamiento a la derecha */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
}

.cat-item-wrapper:hover .cat-parent-link {
    color: var(--color-accent) !important; /* Texto naranja al hacer hover */
}

/* MEJORAS DE TARJETAS DE PRODUCTOS */
ul.products li.product {
    border-color: #f1f5f9 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
}

/* Badges de venta/descuentos */
ul.products li.product .onsale {
    background-color: #ef4444 !important; /* Rojo Unimart */
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    margin: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1 !important;
    text-transform: uppercase;
}

/* Valoraciones/Estrellas */
ul.products li.product .star-rating {
    margin: 0.5rem 0 !important;
    font-size: 0.85rem !important;
    color: #f59e0b !important; /* Dorado */
}

/* Precio tachado en oferta */
ul.products li.product .price del {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin-right: 0.5rem !important;
    font-weight: 400 !important;
}

ul.products li.product .price ins {
    background: transparent !important;
    text-decoration: none !important;
    color: var(--text-dark) !important; /* Negro/Pizarra elegante para el precio final */
}

/* Marca del producto (WooCommerce Brands fallback o tax) */
.ct-product-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

/* Botón Añadir al Carrito Simplificado */
ul.products li.product a.button {
    background-color: #f1f5f9 !important;
    color: var(--text-dark) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    padding: 0.6rem 1rem !important;
}

ul.products li.product a.button:hover {
    background-color: var(--bg-primary) !important;
    color: #ffffff !important;
    border-color: var(--bg-primary) !important;
}

/* Ocultar selector de categorías desplegable redundante */
.widget_product_categories {
    display: none !important;
}

/* ESTILIZAR EL DESPLEGABLE DE ORDENAMIENTO (Ordenar por...) */
.woocommerce-ordering {
    margin-bottom: 2rem !important;
    float: none !important; /* Desactivar flotado antiguo */
    display: inline-block;
}

.woocommerce-ordering select.orderby {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    font-family: var(--font-sans) !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: var(--text-dark) !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    -webkit-border-radius: var(--radius-md) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.55rem 2.5rem 0.55rem 1rem !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.25s ease !important;
    
    /* Flecha Chevron SVG minimalista y sobria */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 14px !important;
}

.woocommerce-ordering select.orderby:hover {
    border-color: var(--color-accent) !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.05) !important;
}

.woocommerce-ordering select.orderby:focus {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
}

/* ESTILIZAR EL TÍTULO DE LA CATEGORÍA / TIENDA (Estilo botón premium con animaciones) */
.woocommerce-products-header__title.page-title {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #ffffff !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.5rem 1.75rem !important;
    border-radius: 50px !important; /* Estilo píldora/botón */
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-bottom: 2rem !important;
    position: relative;
    cursor: default;
    
    /* Animación de entrada al cargar la página */
    animation: ctTitleSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Icono temático dinámico de la categoría dentro del título */
.woocommerce-products-header__title.page-title .title-svg-icon {
    display: inline-block !important;
    vertical-align: middle !important;
    width: 22px !important;
    height: 22px !important;
    color: var(--color-accent) !important; /* Icono naranja */
    margin-right: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Efecto hover interactivo sobre el título */
.woocommerce-products-header__title.page-title:hover {
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
    background-color: rgba(249, 115, 22, 0.02) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.1) !important;
}

.woocommerce-products-header__title.page-title:hover .title-svg-icon {
    transform: scale(1.25) rotate(8deg) !important;
    color: var(--color-accent-hover) !important;
}

/* Definición de la animación de deslizamiento de entrada */
@keyframes ctTitleSlideIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ESTILOS PARA LOS ICONOS DE LAS CATEGORÍAS */
.cat-svg-icon {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 10px !important;
    width: 18px !important;
    height: 18px !important;
    color: var(--text-muted) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Cambiar el color del icono a naranja cuando se hace hover sobre el wrapper de la categoría */
.cat-item-wrapper:hover .cat-svg-icon,
.cat-child-item:hover .cat-svg-icon {
    color: var(--color-accent) !important;
    transform: scale(1.1) rotate(5deg);
}

.cat-parent-link {
    display: inline-flex !important;
    align-items: center !important;
}

.cat-child-item a {
    display: inline-flex !important;
    align-items: center !important;
}

.cat-text-label {
    vertical-align: middle !important;
}

/* Quitar el borde/recuadro de foco del navegador (azul/morado) al hacer click */
.clictienda-sidebar-amazon a,
.clictienda-sidebar-amazon a:focus,
.clictienda-sidebar-amazon a:active,
.clictienda-sidebar-amazon button:focus,
.clictienda-sidebar-amazon button:active {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* Alinear iconos en las píldoras superiores */
.ct-cat-pill {
    display: inline-flex !important;
    align-items: center !important;
}

.ct-cat-pill .cat-svg-icon {
    width: 15px !important;
    height: 15px !important;
    margin-right: 6px !important;
}

.ct-cat-pill:hover .cat-svg-icon {
    color: var(--color-accent) !important;
    transform: scale(1.1) rotate(5deg);
}

.pill-text-label {
    vertical-align: middle !important;
}

/* =========================================================================
   DISEÑO PREMIUM Y OPTIMIZADO PARA EL CHECKOUT (WOOCOMMERCE)
   ========================================================================= */

/* Estructura general de 2 columnas en PC */
@media (min-width: 992px) {
    /* Ampliar el contenedor de la página de Checkout */
    .woocommerce-checkout .col-full,
    .woocommerce-checkout #content .col-full {
        max-width: 1720px !important;
    }

    form.woocommerce-checkout {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 2.5rem !important;
        align-items: flex-start !important;
    }
    
    /* Forzar que las alertas/notificaciones ocupen el 100% del ancho superior */
    .woocommerce-checkout .woocommerce-NoticeGroup,
    .woocommerce-checkout .woocommerce-NoticeGroup-checkout,
    .woocommerce-checkout .woocommerce-error,
    .woocommerce-checkout .woocommerce-message,
    .woocommerce-checkout .woocommerce-info {
        width: 100% !important;
        flex-basis: 100% !important;
        margin-bottom: 2rem !important;
    }

    .woocommerce-checkout #customer_details {
        flex: 1.2 !important;
        max-width: calc(60% - 1.25rem) !important;
    }
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        flex: 0.8 !important;
        max-width: calc(40% - 1.25rem) !important;
        width: 40% !important;
    }
    .woocommerce-checkout #order_review_heading {
        display: none !important; /* Lo ocultamos y metemos un título interno en el box de revisión */
    }
}

/* Tarjetas independientes (Card-based Layout) */
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2,
.woocommerce-checkout #order_review {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    padding: 2.5rem !important;
    box-shadow: var(--shadow-md) !important;
    margin-bottom: 2rem !important;
}

#order_review {
    position: sticky !important;
    top: 100px !important;
}

/* Títulos de sección */
.woocommerce-checkout h3 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1.5rem !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
}

/* Campos de formulario Premium */
.woocommerce-checkout .form-row {
    margin-bottom: 1.25rem !important;
}

.woocommerce-checkout .form-row label {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin-bottom: 0.4rem !important;
    display: inline-block !important;
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    width: 100% !important;
    height: 48px !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background-color: #f8fafc !important;
    font-size: 0.92rem !important;
    font-family: var(--font-sans) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    box-shadow: none !important;
}

.woocommerce-checkout textarea {
    height: 100px !important;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    background-color: #ffffff !important;
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12) !important;
}

/* Estilos de Select2 en el Checkout */
.woocommerce-checkout .select2-container--default .select2-selection--single {
    height: 48px !important;
    background-color: #f8fafc !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    align-items: center !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-dark) !important;
    padding-left: 1rem !important;
    font-size: 0.92rem !important;
}

.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 10px !important;
}

/* Ocultar campos ocultos */
.ct-hidden-field {
    display: none !important;
}

/* =========================================================================
   CHECKBOXES PREMIUM (MÁS GRANDES Y MODERNOS)
   ========================================================================= */

/* Alinear checkboxes y etiquetas */
.woocommerce-checkout .form-row.checkbox-row,
.woocommerce-checkout .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    cursor: pointer !important;
}

/* Ocultar checkbox nativo pero mantener accesibilidad */
.woocommerce-checkout input[type="checkbox"] {
    position: relative !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* Checkbox Hover */
.woocommerce-checkout input[type="checkbox"]:hover {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08) !important;
}

/* Checkbox Seleccionado */
.woocommerce-checkout input[type="checkbox"]:checked {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
}

/* Crear el check (V) personalizado */
.woocommerce-checkout input[type="checkbox"]:checked::after {
    content: "" !important;
    position: absolute !important;
    left: 7px !important;
    top: 3px !important;
    width: 5px !important;
    height: 10px !important;
    border: solid #ffffff !important;
    border-width: 0 2.5px 2.5px 0 !important;
    transform: rotate(45deg) !important;
}

/* Estilo para las etiquetas de los checkboxes */
.woocommerce-checkout .woocommerce-form__label-for-checkbox span {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--text-dark) !important;
    user-select: none !important;
}

/* =========================================================================
   DISEÑO PREMIUM TABLA DE PEDIDO Y MÉTODOS DE PAGO
   ========================================================================= */

/* Tabla de Orden */
.woocommerce-checkout-review-order-table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-bottom: 2rem !important;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 1rem 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: transparent !important;
    font-size: 0.9rem !important;
}

.woocommerce-checkout-review-order-table th {
    font-weight: 700 !important;
    color: var(--text-dark) !important;
}

.woocommerce-checkout-review-order-table td {
    color: var(--text-muted) !important;
}

.woocommerce-checkout-review-order-table .product-name {
    color: var(--text-dark) !important;
    font-weight: 500 !important;
}

.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table .order-total td {
    text-align: right !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
}

.woocommerce-checkout-review-order-table .order-total th {
    font-size: 1.05rem !important;
}

.woocommerce-checkout-review-order-table .order-total td span {
    color: var(--color-accent) !important;
    font-size: 1.15rem !important;
}

/* Métodos de Pago */
#payment {
    background: #f8fafc !important;
    border-radius: var(--radius-md) !important;
    padding: 1.5rem !important;
    border: 1px solid var(--border-color) !important;
}

#payment ul.payment_methods {
    border: none !important;
    padding: 0 !important;
    margin: 0 0 1.5rem 0 !important;
}

#payment ul.payment_methods li {
    line-height: 2 !important;
    margin-bottom: 1rem !important;
}

#payment ul.payment_methods li input[type="radio"] {
    margin-right: 10px !important;
    width: 18px !important;
    height: 18px !important;
    accent-color: var(--color-accent) !important;
}

#payment div.payment_box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-sm) !important;
    padding: 1rem !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    margin: 10px 0 0 0 !important;
}

#payment div.payment_box::before {
    border-bottom-color: #e2e8f0 !important;
}

/* Botón de Realizar Pedido */
#payment #place_order {
    width: 100% !important;
    background-color: var(--color-accent) !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 1rem !important;
    border-radius: var(--radius-md) !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

#payment #place_order:hover {
    background-color: var(--color-accent-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4) !important;
}

/* Aviso de Hacienda e Info adicional */
#ct-hacienda-status {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 6px;
}

/* =========================================================================
   OPTIMIZACIONES MÓVILES (CHECKOUT)
   ========================================================================= */
@media (max-width: 991px) {
    form.woocommerce-checkout {
        display: block !important;
    }
    
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .woocommerce-checkout #customer_details .col-1,
    .woocommerce-checkout #customer_details .col-2,
    .woocommerce-checkout #order_review {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Asegurar que las columnas del formulario fluyan bien */
    .woocommerce-billing-fields__field-wrapper,
    .woocommerce-shipping-fields__field-wrapper {
        display: block !important;
    }
    
    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    
    .woocommerce-checkout-review-order-table th, 
    .woocommerce-checkout-review-order-table td {
        font-size: 0.85rem !important;
    }
}

/* =========================================================================
   SELECTOR UNIFICADO DE CONTACTO (Botón Principal + WhatsApp + IA)
   ========================================================================= */

/* Ocultar el botón toggle de la IA (ahora lo maneja el launcher) */
#clictienda-ai-chat-toggle {
    display: none !important;
}

#ct-contact-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 999999;
}

/* Opción individual (fila etiqueta + botón) */
.ct-launcher-option {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: ct-slide-up 0.2s ease;
}

@keyframes ct-slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Etiqueta de texto */
.ct-launcher-label {
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Botón circular genérico */
.ct-launcher-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* WhatsApp */
.ct-launcher-btn-wa {
    background-color: #25d366;
    color: #fff;
}
.ct-launcher-btn-wa svg {
    width: 28px;
    height: 28px;
}
.ct-launcher-btn-wa:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,211,102,0.45);
}

/* IA */
.ct-launcher-btn-ai {
    background: linear-gradient(135deg, var(--color-accent, #f97316) 0%, var(--color-accent-hover, #ea580c) 100%);
    color: #fff;
}
.ct-launcher-text-icon {
    font-family: var(--font-sans, 'Inter', sans-serif) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    user-select: none !important;
}
.ct-launcher-btn-ai:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5); /* Naranja tech */
}

/* Botón principal */
.ct-launcher-main {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent, #f97316) 0%, var(--bg-primary, #0f172a) 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(249, 115, 22, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    z-index: 1;
}
.ct-launcher-main:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 26px rgba(249, 115, 22, 0.4);
}
.ct-launcher-main--open {
    background: linear-gradient(135deg, var(--bg-primary, #0f172a) 0%, var(--bg-secondary, #1e293b) 100%);
    transform: rotate(15deg);
}
.ct-launcher-icon svg {
    width: 28px; /* Aumentado de 26px a 28px */
    height: 28px; /* Aumentado de 26px a 28px */
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    #ct-contact-launcher {
        bottom: 16px;
        right: 16px;
    }
    .ct-launcher-btn {
        width: 46px;
        height: 46px;
    }
    .ct-launcher-main {
        width: 52px;
        height: 52px;
    }
}

/* =========================================================================
   DISEÑO PREMIUM PARA LA PÁGINA DE PEDIDO RECIBIDO (THANK YOU PAGE)
   ========================================================================= */

.woocommerce-order-received .col-full {
    max-width: 1200px !important;
}

/* Tarjeta del Mensaje Superior de Éxito */
.woocommerce-thankyou-order-received {
    background-color: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
    padding: 1.5rem 2rem !important;
    border-radius: var(--radius-md) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-bottom: 2.5rem !important;
    box-shadow: var(--shadow-sm) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
}

.woocommerce-thankyou-order-received::before {
    content: "✓" !important;
    background-color: #16a34a !important;
    color: #ffffff !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
}

/* Cuadrícula de Datos del Pedido (Order Meta List) */
ul.woocommerce-order-overview {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 3rem 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 1.5rem !important;
}

ul.woocommerce-order-overview li {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    padding: 1.25rem 1.5rem !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 600 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem !important;
}

ul.woocommerce-order-overview li strong {
    font-size: 1.15rem !important;
    color: var(--text-dark) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 700 !important;
}

ul.woocommerce-order-overview li.woocommerce-order-overview--total strong {
    color: var(--color-accent) !important;
}

/* Detalles del Pedido - Tabla */
.woocommerce-order-details,
.woocommerce-customer-details {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    padding: 2.5rem !important;
    box-shadow: var(--shadow-md) !important;
    margin-bottom: 2.5rem !important;
}

.woocommerce-order-details__title,
.woocommerce-column__title {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1.5rem !important;
}

/* Tabla de artículos */
table.woocommerce-table--order-details {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

table.woocommerce-table--order-details th,
table.woocommerce-table--order-details td {
    padding: 1rem 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 0.92rem !important;
    background: transparent !important;
}

table.woocommerce-table--order-details th {
    font-weight: 700 !important;
    color: var(--text-dark) !important;
}

table.woocommerce-table--order-details td {
    color: var(--text-muted) !important;
}

table.woocommerce-table--order-details td a {
    color: var(--text-dark) !important;
    font-weight: 600 !important;
}

table.woocommerce-table--order-details td a:hover {
    color: var(--color-accent) !important;
}

table.woocommerce-table--order-details tfoot th {
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}

table.woocommerce-table--order-details tfoot td {
    text-align: right !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
}

table.woocommerce-table--order-details tfoot tr:last-child th,
table.woocommerce-table--order-details tfoot tr:last-child td {
    font-size: 1.15rem !important;
    border-bottom: none !important;
}

table.woocommerce-table--order-details tfoot tr:last-child td span {
    color: var(--color-accent) !important;
}

/* Direcciones del cliente (Facturación y Envío) */
.woocommerce-columns--addresses {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
}

.woocommerce-column--billing-address,
.woocommerce-column--shipping-address {
    flex: 1 !important;
    min-width: 280px !important;
    background: #f8fafc !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 1.5rem !important;
}

.woocommerce-column--billing-address address,
.woocommerce-column--shipping-address address {
    font-style: normal !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    color: var(--text-muted) !important;
}

@media (max-width: 768px) {
    .woocommerce-order-details,
    .woocommerce-customer-details {
        padding: 1.5rem !important;
    }
}

/* Títulos de Página Premium (Card Header para Checkout y Confirmación) */
.woocommerce-checkout .entry-header,
.woocommerce-order-received .entry-header {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 2.2rem 2.5rem !important;
    margin-bottom: 2.5rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
    position: relative !important;
}

.woocommerce-checkout .entry-title,
.woocommerce-order-received .entry-title {
    font-size: 2.1rem !important;
    font-weight: 800 !important;
    color: var(--text-dark, #0f172a) !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 0.25rem !important;
    padding-bottom: 0 !important;
    border: none !important;
    display: block !important;
}

/* Subtítulos dinámicos de las tarjetas */
.woocommerce-checkout .entry-header::after {
    content: "Por favor, completa los detalles de facturación para procesar tu orden." !important;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--text-muted, #64748b) !important;
}

.woocommerce-order-received .entry-header::after {
    content: "Tu orden ha sido registrada con éxito en nuestro sistema." !important;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--text-muted, #64748b) !important;
}

/* =========================================================================
   DISEÑO PREMIUM PARA LA PÁGINA DE PRODUCTO INDIVIDUAL (SINGLE PRODUCT)
   ========================================================================= */

/* 1. Galería de Imágenes del Producto */
.single-product div.product div.images .woocommerce-product-gallery__wrapper {
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
    background-color: #ffffff !important;
    transition: box-shadow 0.3s ease !important;
}

.single-product div.product div.images .woocommerce-product-gallery__wrapper:hover {
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1)) !important;
}

/* Miniaturas de la Galería */
.single-product div.product div.images .flex-control-thumbs {
    margin-top: 1rem !important;
    display: flex !important;
    gap: 0.75rem !important;
}

.single-product div.product div.images .flex-control-thumbs li {
    flex: 1 !important;
    max-width: 80px !important;
}

.single-product div.product div.images .flex-control-thumbs img {
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-sm, 6px) !important;
    padding: 2px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    opacity: 0.7 !important;
}

.single-product div.product div.images .flex-control-thumbs img.flex-active,
.single-product div.product div.images .flex-control-thumbs img:hover {
    border-color: var(--color-accent, #2563eb) !important;
    opacity: 1 !important;
}

/* 2. Información del Producto (Resumen) */
.single-product div.product .summary.entry-summary {
    padding-left: 1.5rem !important;
}

.single-product div.product .product_title.entry-title {
    font-size: 2.1rem !important;
    font-weight: 800 !important;
    color: var(--text-dark, #0f172a) !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.25 !important;
}

/* Valoración por estrellas */
.single-product div.product .woocommerce-product-rating {
    margin-bottom: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.9rem !important;
}

.single-product div.product .woocommerce-product-rating .star-rating {
    color: #f59e0b !important; /* Dorado */
}

/* Precio */
.single-product div.product p.price,
.single-product div.product span.price {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: var(--color-accent, #2563eb) !important;
    margin-bottom: 1.5rem !important;
}

.single-product div.product p.price del,
.single-product div.product span.price del {
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    color: var(--text-muted, #94a3b8) !important;
    margin-right: 0.5rem !important;
}

.single-product div.product p.price ins,
.single-product div.product span.price ins {
    text-decoration: none !important;
}

/* Descripción Corta */
.single-product div.product .woocommerce-product-details__short-description {
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
    color: var(--text-muted, #475569) !important;
    margin-bottom: 2rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 1.5rem !important;
}

/* 3. Formulario del Carrito y Botón Compra */
.single-product div.product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 2rem !important;
    flex-wrap: wrap !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 1.5rem !important;
}

/* Selector de Cantidad */
.single-product div.product form.cart .quantity {
    margin: 0 !important;
}

.single-product div.product form.cart .quantity input.qty {
    width: 75px !important;
    height: 48px !important;
    padding: 0 0.5rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--text-dark, #0f172a) !important;
    border: 1.5px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-md, 8px) !important;
    text-align: center !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.single-product div.product form.cart .quantity input.qty:focus {
    border-color: var(--color-accent, #2563eb) !important;
    background-color: #ffffff !important;
    outline: none !important;
}

/* Botón Añadir al Carrito */
.single-product div.product form.cart .single_add_to_cart_button {
    height: 48px !important;
    padding: 0 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: var(--radius-md, 8px) !important;
    background-color: var(--color-accent, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.15) !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.single-product div.product form.cart .single_add_to_cart_button:hover {
    background-color: #1d4ed8 !important; /* Azul más oscuro */
    box-shadow: 0 6px 10px -1px rgba(29, 78, 216, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* 4. Metadatos (SKU, Categorías) */
.single-product div.product .product_meta {
    font-size: 0.85rem !important;
    color: var(--text-muted, #64748b) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.25rem !important;
    margin-bottom: 2rem !important;
}

.single-product div.product .product_meta > span {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #f1f5f9 !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.single-product div.product .product_meta > span a {
    color: var(--color-accent, #2563eb) !important;
    margin-left: 0.25rem !important;
}

.single-product div.product .product_meta .sku_wrapper .sku {
    color: var(--text-dark, #0f172a) !important;
    font-weight: 700 !important;
    margin-left: 0.25rem !important;
}

/* 5. Pestañas de Información Inferiores (Tabs) */
.single-product .woocommerce-tabs.wc-tabs-wrapper {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

.single-product .woocommerce-tabs ul.tabs {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 2rem 0 !important;
    display: flex !important;
    border-bottom: 2px solid #f1f5f9 !important;
    gap: 2rem !important;
    background: transparent !important;
}

.single-product .woocommerce-tabs ul.tabs::before,
.single-product .woocommerce-tabs ul.tabs::after {
    display: none !important;
}

.single-product .woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 0 0.75rem 0 !important;
    position: relative !important;
}

.single-product .woocommerce-tabs ul.tabs li a {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--text-muted, #64748b) !important;
    padding: 0 !important;
    transition: color 0.2s ease !important;
}

.single-product .woocommerce-tabs ul.tabs li.active a,
.single-product .woocommerce-tabs ul.tabs li:hover a {
    color: var(--text-dark, #0f172a) !important;
}

.single-product .woocommerce-tabs ul.tabs li.active::after {
    content: "" !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: var(--color-accent, #2563eb) !important;
    border-radius: 2px !important;
}

/* Panel de Contenido de la Pestaña */
.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 2.5rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
}

.single-product .woocommerce-tabs .woocommerce-Tabs-panel h2 {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--text-dark, #0f172a) !important;
    margin-bottom: 1.25rem !important;
}

/* 6. Responsividad */
@media (max-width: 768px) {
    .single-product div.product .summary.entry-summary {
        padding-left: 0 !important;
        margin-top: 2rem !important;
    }
    .single-product div.product .product_title.entry-title {
        font-size: 1.75rem !important;
    }
    .single-product .woocommerce-tabs .woocommerce-Tabs-panel {
        padding: 1.5rem !important;
    }
}

/* =========================================================================
   DISEÑO PARA EL AUTOCOMPLETADO DE BÚSQUEDA NATIVO Y LIGERO
   ========================================================================= */

.clictienda-search-suggestions {
    position: absolute !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-md, 8px) !important;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1)) !important;
    z-index: 99999 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    display: none;
    box-sizing: border-box !important;
}

.ct-search-loading,
.ct-search-no-results {
    padding: 1rem !important;
    font-size: 0.9rem !important;
    color: var(--text-muted, #64748b) !important;
    text-align: center !important;
}

ul.ct-suggestions-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.ct-suggestions-list li {
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background-color 0.2s ease !important;
}

ul.ct-suggestions-list li:last-child {
    border-bottom: none !important;
}

ul.ct-suggestions-list li:hover {
    background-color: #f8fafc !important;
}

ul.ct-suggestions-list li a {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    text-decoration: none !important;
    gap: 1rem !important;
}

ul.ct-suggestions-list li img {
    width: 48px !important;
    height: 48px !important;
    object-fit: cover !important;
    border-radius: var(--radius-sm, 6px) !important;
    border: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
}

.ct-suggestions-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.2rem !important;
    overflow: hidden !important;
}

.ct-suggestions-title {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--text-dark, #0f172a) !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

.ct-suggestions-price {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--color-accent, #2563eb) !important;
}

.ct-suggestions-price del {
    font-size: 0.75rem !important;
    color: var(--text-muted, #94a3b8) !important;
    margin-right: 0.25rem !important;
}

.ct-suggestions-price ins {
    text-decoration: none !important;
}

/* =========================================================================
   DISEÑO PREMIUM PARA LAS PÁGINAS DE MI CUENTA Y CARRITO DE COMPRAS
   ========================================================================= */

/* 1. Cabeceras Unificadas (Mi Cuenta y Carrito) */
.woocommerce-account .entry-header,
.woocommerce-cart .entry-header {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 2.2rem 2.5rem !important;
    margin-bottom: 2.5rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
    position: relative !important;
}

.woocommerce-account .entry-title,
.woocommerce-cart .entry-title {
    font-size: 2.1rem !important;
    font-weight: 800 !important;
    color: var(--text-dark, #0f172a) !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 0.25rem !important;
    padding-bottom: 0 !important;
    border: none !important;
    display: block !important;
}

.woocommerce-account .entry-header::after {
    content: "Gestiona tus pedidos, direcciones de envío y detalles de perfil." !important;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--text-muted, #64748b) !important;
}

.woocommerce-cart .entry-header::after {
    content: "Revisa los productos seleccionados antes de proceder al pago." !important;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--text-muted, #64748b) !important;
}

/* 2. Rediseño de Mi Cuenta (/mi-cuenta/) */
.woocommerce-account .woocommerce {
    display: flex !important;
    flex-direction: row !important;
    gap: 2rem !important;
    align-items: flex-start !important;
}

/* Menú Lateral */
.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 280px !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 1.5rem 1.25rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
    margin: 0 !important;
    float: none !important;
    width: auto !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: block !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--text-muted, #475569) !important;
    border-radius: var(--radius-sm, 6px) !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
    background-color: #f8fafc !important;
    color: var(--text-dark, #0f172a) !important;
    padding-left: 1.25rem !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    background-color: #eff6ff !important; /* Azul suave */
    color: var(--color-accent, #2563eb) !important;
    padding-left: 1.25rem !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 15% !important;
    width: 4px !important;
    height: 70% !important;
    background-color: var(--color-accent, #2563eb) !important;
    border-radius: 0 4px 4px 0 !important;
}

/* Panel de Contenido */
.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1 !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 2.5rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
    float: none !important;
    width: auto !important;
}

/* Tablas en Mi Cuenta */
.woocommerce-account table.my_account_orders {
    border-collapse: collapse !important;
    width: 100% !important;
    font-size: 0.9rem !important;
}

.woocommerce-account table.my_account_orders th,
.woocommerce-account table.my_account_orders td {
    padding: 1rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    text-align: left !important;
}

.woocommerce-account table.my_account_orders th {
    font-weight: 700 !important;
    color: var(--text-dark, #0f172a) !important;
    background-color: #f8fafc !important;
}

.woocommerce-account table.my_account_orders td {
    color: var(--text-muted, #475569) !important;
}

.woocommerce-account table.my_account_orders td a.button {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    background-color: var(--color-accent, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-account table.my_account_orders td a.button:hover {
    background-color: #1d4ed8 !important;
}

/* 3. Rediseño del Carrito de Compras (/carrito/) */
.woocommerce-cart .woocommerce {
    display: flex !important;
    flex-direction: row !important;
    gap: 2rem !important;
    align-items: flex-start !important;
}

/* Formulario de la tabla del carrito */
.woocommerce-cart form.woocommerce-cart-form {
    flex: 1 !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 2rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
}

/* Tabla del Carrito */
.woocommerce-cart table.shop_table {
    border-collapse: collapse !important;
    width: 100% !important;
}

.woocommerce-cart table.shop_table th {
    background-color: #f8fafc !important;
    color: var(--text-dark, #0f172a) !important;
    font-weight: 700 !important;
    padding: 1rem !important;
    text-align: left !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.woocommerce-cart table.shop_table td {
    padding: 1.25rem 1rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

.woocommerce-cart table.shop_table td.product-thumbnail img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: var(--radius-sm, 6px) !important;
    border: 1px solid #e2e8f0 !important;
}

.woocommerce-cart table.shop_table td.product-name a {
    font-weight: 600 !important;
    color: var(--text-dark, #0f172a) !important;
    font-size: 0.95rem !important;
}

.woocommerce-cart table.shop_table td.product-name a:hover {
    color: var(--color-accent, #2563eb) !important;
}

.woocommerce-cart table.shop_table td.product-remove a.remove {
    color: #ef4444 !important;
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

.woocommerce-cart table.shop_table td.product-remove a.remove:hover {
    color: #b91c1c !important;
    background-color: transparent !important;
}

/* Botones de acción en la tabla (Cupón / Actualizar) */
.woocommerce-cart table.shop_table td.actions {
    padding: 1.5rem 1rem !important;
}

.woocommerce-cart table.shop_table td.actions .coupon {
    display: inline-flex !important;
    gap: 0.5rem !important;
}

.woocommerce-cart table.shop_table td.actions input#coupon_code {
    height: 40px !important;
    padding: 0 1rem !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
}

.woocommerce-cart button[name="update_cart"],
.woocommerce-cart button[name="apply_coupon"] {
    height: 40px !important;
    padding: 0 1.25rem !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.woocommerce-cart button[name="apply_coupon"] {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.woocommerce-cart button[name="apply_coupon"]:hover {
    background-color: #e2e8f0 !important;
}

.woocommerce-cart button[name="update_cart"] {
    background-color: var(--color-accent, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
}

.woocommerce-cart button[name="update_cart"]:hover {
    background-color: #1d4ed8 !important;
}

/* Tarjeta de Totales del Carrito */
.woocommerce-cart .cart-collaterals {
    flex: 0 0 380px !important;
    width: 380px !important;
    margin: 0 !important;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    width: 100% !important;
    float: none !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 2rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--text-dark, #0f172a) !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table.shop_table_totals {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table.shop_table_totals th,
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table_totals td {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    text-align: left !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table.shop_table_totals th {
    font-weight: 600 !important;
    color: var(--text-muted, #64748b) !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table.shop_table_totals td {
    text-align: right !important;
    font-weight: 700 !important;
    color: var(--text-dark, #0f172a) !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table.shop_table_totals tr.order-total th,
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table_totals tr.order-total td {
    font-size: 1.15rem !important;
    color: var(--color-accent, #2563eb) !important;
    border-bottom: none !important;
}

/* Botón Finalizar Compra */
.woocommerce-cart .cart-collaterals .cart_totals .wc-proceed-to-checkout a.checkout-button {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: var(--radius-md, 8px) !important;
    background-color: var(--color-accent, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.15) !important;
    transition: all 0.2s ease !important;
}

.woocommerce-cart .cart-collaterals .cart_totals .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #1d4ed8 !important;
    box-shadow: 0 6px 10px -1px rgba(29, 78, 216, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* 4. Responsividad (Mobile) */
@media (max-width: 992px) {
    .woocommerce-account .woocommerce,
    .woocommerce-cart .woocommerce {
        flex-direction: column !important;
    }
    
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-cart .cart-collaterals {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* =========================================================================
   DISEÑO PREMIUM PARA EL CATÁLOGO Y ARCHIVOS DE PRODUCTOS
   ========================================================================= */

/* 1. Cabecera del Catálogo Estilo Tarjeta */
.archive.post-type-archive-product .woocommerce-products-header,
.archive.tax-product_cat .woocommerce-products-header,
.woocommerce-shop .woocommerce-products-header {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 2.2rem 2.5rem !important;
    margin-bottom: 2.5rem !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
    position: relative !important;
    text-align: center !important;
}

.archive.post-type-archive-product .woocommerce-products-header .woocommerce-products-header__title,
.archive.tax-product_cat .woocommerce-products-header .woocommerce-products-header__title {
    font-size: 2.1rem !important;
    font-weight: 800 !important;
    color: var(--text-dark, #0f172a) !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 0.25rem !important;
    padding-bottom: 0 !important;
    border: none !important;
    display: block !important;
}

.archive.post-type-archive-product .woocommerce-products-header::after,
.archive.tax-product_cat .woocommerce-products-header::after {
    content: "Explora nuestro catálogo de artículos y encuentra las mejores ofertas." !important;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--text-muted, #64748b) !important;
}

/* Controles de ordenamiento y cantidad */
.archive .storefront-sorting {
    margin-bottom: 2.5rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 1rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
}

.archive .woocommerce-result-count {
    margin: 0 !important;
    font-size: 0.9rem !important;
    color: var(--text-muted, #64748b) !important;
    font-weight: 500 !important;
}

.archive select.orderby {
    height: 40px !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 8px !important;
    padding: 0 2.5rem 0 1rem !important;
    background-color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--text-dark, #0f172a) !important;
}

/* 2. Tarjetas de Productos en la Rejilla */
.archive ul.products li.product {
    background-color: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: var(--radius-lg, 12px) !important;
    padding: 0 !important;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.archive ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 20px -3px rgba(0,0,0,0.06), 0 4px 6px -2px rgba(0,0,0,0.05) !important;
    border-color: #f26522 !important;
}

/* Imagen del Producto en la cuadrícula */
.archive ul.products li.product a.woocommerce-LoopProduct-link {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.archive ul.products li.product img {
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0 !important;
    object-fit: cover !important;
    width: 100% !important;
    margin: 0 !important;
    transition: transform 0.5s ease !important;
}

.archive ul.products li.product:hover img {
    transform: scale(1.02) !important;
}

/* Información del producto (Contenedor interno) */
.archive ul.products li.product .woocommerce-loop-product__title,
.archive ul.products li.product .price,
.archive ul.products li.product .star-rating {
    margin-left: 1.25rem !important;
    margin-right: 1.25rem !important;
}

/* Título */
.archive ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--text-dark, #0f172a) !important;
    line-height: 1.4 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
    height: 40px !important; /* Altura fija para alinear cuadrícula */
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    transition: color 0.2s ease !important;
}

.archive ul.products li.product:hover .woocommerce-loop-product__title {
    color: #f26522 !important;
}

/* Estrellas de valoración */
.archive ul.products li.product .star-rating {
    margin-bottom: 0.5rem !important;
    font-size: 0.8rem !important;
    color: #f59e0b !important;
}

/* Precio en la cuadrícula */
.archive ul.products li.product .price {
    font-size: 1.15rem !important;
    font-weight: 850 !important;
    color: var(--color-accent, #2563eb) !important;
    margin-bottom: 1.25rem !important;
    margin-top: auto !important; /* Empuja el precio al fondo para alinear */
}

.archive ul.products li.product .price del {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--text-muted, #94a3b8) !important;
    margin-right: 0.25rem !important;
}

.archive ul.products li.product .price ins {
    text-decoration: none !important;
}

/* Botón Añadir al carrito del catálogo */
.archive ul.products li.product a.button {
    margin: 0 1.25rem 1.25rem 1.25rem !important;
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    border-radius: var(--radius-md, 8px) !important;
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    transition: all 0.2s ease !important;
    display: block !important;
}

.archive ul.products li.product a.button:hover {
    background-color: var(--color-accent, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--color-accent, #2563eb) !important;
    transform: translateY(-1px) !important;
}

/* 3. Paginación Moderna */
.archive nav.woocommerce-pagination {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
    border: none !important;
    padding: 0 !important;
}

.archive nav.woocommerce-pagination ul {
    border: none !important;
    display: inline-flex !important;
    gap: 0.5rem !important;
}

.archive nav.woocommerce-pagination ul li {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.archive nav.woocommerce-pagination ul li a,
.archive nav.woocommerce-pagination ul li span {
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--border-color, #e2e8f0) !important;
    background-color: #ffffff !important;
    color: var(--text-muted, #64748b) !important;
    transition: all 0.2s ease !important;
}

.archive nav.woocommerce-pagination ul li a:hover {
    background-color: #f8fafc !important;
    color: var(--text-dark, #0f172a) !important;
    border-color: #cbd5e1 !important;
}

.archive nav.woocommerce-pagination ul li span.current {
    background-color: var(--color-accent, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--color-accent, #2563eb) !important;
}

/* =========================================================================
   OPTIMIZACIONES Y CORRECCIONES DE DISEÑO RESPONSIVO GLOBAL (MÓVIL)
   ========================================================================= */

/* 1. Reset de Box-Sizing y Contenedores */
*, ::before, ::after {
    box-sizing: border-box !important;
}

.col-full {
    box-sizing: border-box !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* 2. Forzar que todos los productos en cualquier página hereden box-sizing e impidan desbordamientos */
ul.products li.product {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* 3. Media Queries de Ajuste para Móviles (Pantallas pequeñas) */
@media (max-width: 768px) {
    /* Ajustar Cabeceras de Tarjetas en Móviles */
    .woocommerce-checkout .entry-header,
    .woocommerce-order-received .entry-header,
    .woocommerce-account .entry-header,
    .woocommerce-cart .entry-header,
    .woocommerce-products-header {
        padding: 1.25rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 8px !important;
        text-align: center !important;
    }
    
    .woocommerce-checkout .entry-title,
    .woocommerce-order-received .entry-title,
    .woocommerce-account .entry-title,
    .woocommerce-cart .entry-title,
    .archive.post-type-archive-product .woocommerce-products-header .woocommerce-products-header__title,
    .archive.tax-product_cat .woocommerce-products-header .woocommerce-products-header__title {
        font-size: 1.45rem !important;
        letter-spacing: -0.01em !important;
    }

    .woocommerce-checkout .entry-header::after,
    .woocommerce-order-received .entry-header::after,
    .woocommerce-account .entry-header::after,
    .woocommerce-cart .entry-header::after,
    .archive.post-type-archive-product .woocommerce-products-header::after,
    .archive.tax-product_cat .woocommerce-products-header::after {
        font-size: 0.85rem !important;
        margin-top: 0.25rem !important;
    }

    /* Reducir paddings anidados en móviles para ganar espacio útil en pantalla */
    .col-full, .ct-container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Desactivar CSS Grid en móviles para evitar que el sidebar estire la pantalla */
    .clictienda-shop-layout {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-top: 1rem !important;
        overflow: hidden !important;
    }

    /* Ocultar físicamente el sidebar del DOM de renderizado móvil cuando está cerrado */
    .clictienda-sidebar {
        display: none !important;
    }
    .clictienda-sidebar.open {
        display: block !important;
    }

    /* Centrado y Rediseño Píldora del Selector de Ordenamiento */
    .archive .storefront-sorting {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 1.25rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        float: none !important;
    }

    .archive .woocommerce-result-count {
        margin-bottom: 0.25rem !important;
        width: 100% !important;
        text-align: center !important;
    }

    .archive .woocommerce-ordering {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        float: none !important;
        margin: 0 auto !important;
    }

    .woocommerce-ordering select.orderby,
    .archive select.orderby {
        width: 100% !important;
        max-width: 290px !important;
        text-align: center !important;
        text-align-last: center !important;
        padding: 0 2.5rem !important;
        -webkit-border-radius: 20px !important;
        border-radius: 20px !important;
        background-position: right 1.25rem center !important;
    }

    /* Forzar rejilla de 2 columnas con CSS Grid */
    .woocommerce-page .site-main ul.products,
    .woocommerce-page ul.products,
    ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    /* Cada tarjeta ocupará exactamente el 100% de su celda en la rejilla */
    .woocommerce-page .site-main ul.products li.product,
    .woocommerce-page ul.products li.product,
    ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
        clear: none !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Reducir márgenes del botón Añadir al carrito en tarjetas para evitar desbordes */
    .woocommerce-page .site-main ul.products li.product a.button,
    .woocommerce-page ul.products li.product a.button,
    ul.products li.product a.button {
        margin: 0 0.5rem 0.75rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    /* Evitar que la paginación estire la pantalla y centrarla en móviles */
    nav.woocommerce-pagination {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 1rem auto 0 auto !important;
        float: none !important;
        clear: both !important;
    }

    /* La píldora que contiene los números */
    nav.woocommerce-pagination ul {
        display: inline-flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        max-width: 290px !important;
        background-color: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 30px !important;
        padding: 0.35rem 0.75rem !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    /* Ocultar barra de scroll en navegadores basados en Webkit (Chrome, Safari) */
    nav.woocommerce-pagination ul::-webkit-scrollbar {
        display: none !important;
    }

    /* Quitar los bordes internos nativos y adaptar espacio */
    nav.woocommerce-pagination ul li {
        border-right: none !important;
        margin: 0 2px !important;
        display: inline-block !important;
        float: none !important;
    }

    /* Formato de botones individuales tipo círculo */
    nav.woocommerce-pagination ul li a,
    nav.woocommerce-pagination ul li span {
        border: none !important;
        background: none !important;
        padding: 0 !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.85rem !important;
        color: #64748b !important;
        border-radius: 50% !important;
    }

    /* Resaltar la página actual en naranja */
    nav.woocommerce-pagination ul li span.current {
        background-color: #ff6600 !important;
        color: #ffffff !important;
        font-weight: 700 !important;
    }
}

/* =========================================================================
   DISEÑO ADICIONAL PARA DISCLAIMER DE IA Y BOTÓN DE PDF DE COTIZACIÓN
   ========================================================================= */

/* Estilos para el descargo de responsabilidad legal en el chat */
.ct-ai-chat-disclaimer {
    font-size: 10px !important;
    color: #94a3b8 !important; /* Gris suave */
    text-align: center !important;
    background-color: #1e293b !important; /* Mismo color del cuerpo del widget */
    padding: 6px 12px 10px 12px !important;
    border-top: 1px solid #334155 !important;
    line-height: 1.3 !important;
    font-family: 'Inter', sans-serif !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

/* Estilos de la marca ClicTienda para el botón "Descargar Cotización (PDF)" en WooCommerce Cart */
.button.button-quote-pdf {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}
.button.button-quote-pdf:hover {
    background-color: #ff6600 !important; /* Naranja tech ClicTienda en hover */
    border-color: #ff6600 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2);
}







