/* ========================================
   CSS Variables - Definición de colores, fuentes y sombras
   ======================================== */
:root {
    --azul-principal: #243B5A;
    --azul-hover: #2F5D8A;
    --azul-ligero: rgba(47, 93, 138, 0.3);
    --blanco-principal: #FFFFFF;
    --gris-fondo: #F9FAFB;
    --gris-texto: #4B5563;
    --negro-titulo: #111827;
    --fuente-principal: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(156, 156, 156, 0.7), 0 8px 10px -6px rgba(64, 64, 64, 0.47);
}

/* ========================================
   Estilos Globales - HTML, Body y reset básico
   ======================================== */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-color: var(--gris-fondo);
    font-family: var(--fuente-principal);
    scroll-behavior: smooth;
    overflow-x: hidden;
}


/* ========================================
   Estilos del Header - Navegación principal y acciones
   ======================================== */
.main-header {
    background-color: var(--blanco-principal);
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
}

.header-outer {
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 20px;
}

.header-logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.carrito-header {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--azul-principal);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
    text-decoration: none;
}
.carrito-header:hover {
    color: var(--azul-hover);
}
.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 80px;
    overflow: hidden;
    text-decoration: none;
}

.logo-link img {
    height: 180px;
    width: auto;
    display: block;
    object-fit: contain;
    transform: translateY(8px);
}

.logo-link:hover img {
    transform: scale(1.08);
}

.modal-header {
    display: none;
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--gris-texto);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link i {
    font-size: 0.9rem;
    color: #9CA3AF;
    transition: color 0.2s;
}

.nav-link:hover {
    background-color: var(--azul-ligero);
    color: var(--azul-principal);
}

.nav-link:hover i {
    color: var(--azul-principal);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--azul-principal);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    margin-right: 2vh;
}

.mobile-menu-toggle:hover {
    color: var(--azul-hover);
}

/* Mobile Navigation */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background-color: var(--blanco-principal);
    z-index: 2002;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F3F4F6;
    height: 100px;
    overflow: hidden;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.mobile-nav-logo img {
    height: 130px;
    width: auto;
    object-fit: contain;
    transform: translateY(10px);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--gris-texto);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.mobile-menu-close:hover {
    background-color: #F3F4F6;
    color: var(--negro-titulo);
}

.mobile-nav-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15vh;
}

.mobile-nav-link {
    text-decoration: none;
    color: var(--gris-texto);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-nav-link i {
    width: 24px;
    color: var(--azul-principal);
    font-size: 1.2rem;
    opacity: 0.8;
}

.mobile-nav-link:hover {
    background-color: var(--azul-ligero);
    color: var(--azul-principal);
}

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 30px;
    border-top: 1px solid #F3F4F6;
}

.btn-mobile-action {
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    background-color: #F9FAFB;
    color: var(--gris-texto);
    border: 1px solid #E5E7EB;
}

.btn-mobile-register {
    background-color: var(--azul-principal);
    color: white;
    border: none;
}

.btn-mobile-logout {
    color: #EF4444;
    background-color: #FEF2F2;
    border-color: #FEE2E2;
    cursor: pointer;
    width: 100%;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 15px;
    font-weight: 700;
    color: var(--negro-titulo);
}

.mobile-user-info i {
    font-size: 1.5rem;
    color: var(--azul-principal);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-action {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-action.btn-panel {
    background-color: var(--azul-principal);
    color: white;
    padding: 8px 14px;
    border-radius: 14px;
    font-weight: 700;
    margin-right: 0;
}

.btn-action.btn-panel:hover {
    background-color: var(--azul-hover);
}

.btn-login {
    color: var(--gris-texto);
    background-color: transparent;
}

.btn-login:hover {
    color: var(--negro-titulo);
    background-color: #F3F4F6;
}

.btn-register {
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    box-shadow: 0 4px 14px var(--azul-ligero);
}

.btn-register:hover {
    background-color: var(--azul-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--azul-ligero);
}

.btn-register:active {
    transform: translateY(0);
}

.btn-admin-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--blanco-principal);
    color: #374151;
    padding: 6px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
}

.btn-admin-panel:hover {
    background-color: #f9fafb;
    color: var(--azul-principal);
    border-color: var(--azul-principal);
    transform: translateY(-1px);
}

.btn-admin-panel i {
    font-size: 0.9rem;
    color: var(--azul-principal);
}

.admin-panel-card {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    transition: transform 0.2s;
    max-height: 10em;
    min-height: 10em;
}

.user-panel-card {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    transition: transform 0.2s;
    max-height: 10em;
    min-height: 10em;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    height: 40px;
    background-color: #F3F4F6;
    padding: 0 4px 0 6px;
    border-radius: 20px;
    gap: 4px;
    border: 1px solid #E5E7EB;
}

.user-profile-menu form {
    margin: 0;
    display: flex;
    align-items: center;
}

.user-profile-menu .btn-action.btn-panel {
    height: 32px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.user-info {
    color: var(--azul-principal);
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    border-radius: 14px;
    gap: 8px;
    transition: background 0.2s ease;
}


.btn-user-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.user-avatar {
    font-size: 1.25rem;
    color: var(--azul-principal);
    line-height: 1;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--azul-principal);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

.user-name:hover {
    color: var(--azul-hover);
}

.btn-logout-minimal {
    height: 32px;
    padding: 0 12px;
    background-color: var(--blanco-principal);
    color: #EF4444;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-logout-minimal:hover {
    background-color: #EF4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-logout-minimal i {
    font-size: 0.9rem;
}

.logout-text {
    white-space: nowrap;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .main-nav, .header-actions {
        display: none;
    }
    .header-outer{
        padding:0;
    }
    .mobile-menu-toggle {
        display: block;
    }

    .logo-link img {
        height: 140px;
        transform: translateY(4px);
    }

    .logout-text {
        display: none;
    }

    .btn-logout-minimal {
        width: 32px;
        padding: 0;
        border-radius: 50%;
    }

    .user-name {
        max-width: 80px;
    }
}

/* ========================================
   Estilos de la Página de Inicio
   ======================================== */
.home-productos {
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: var(--blanco-principal);
    padding: 40px 0;
    box-shadow: var(--shadow-md);
}

.home-productos h2 {
    text-align: center;
    color: #222;
    margin-top: 0;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.home-productos-footer {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.home-articulos-footer {
    margin-top: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.home-products-carousel {
    position: relative;
    width: 90%;
    margin: 0 auto;
}

.home-products-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 3rem;
}

.home-products-track a {
    display: contents;
}

.home-products-track::-webkit-scrollbar {
    display: none;
}

.home-products-track .product-card--home {
    flex: 0 0 calc(25% - 15px);
    scroll-snap-align: start;
    min-width: 260px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--azul-principal);
    color: var(--blanco-principal);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background: var(--azul-hover);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn-prev {
    left: -10px;
}

.carousel-btn-next {
    right: -10px;
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.dot {
    width: 20px;
    height: 6px;
    border-radius: 3px;
    background-color: #E5E7EB;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot:hover {
    background-color: #D1D5DB;
}

.dot.active {
    background-color: var(--azul-principal);
    width: 40px;
    box-shadow: 0 2px 4px rgba(36, 59, 90, 0.2);
}

@media (max-width: 1100px) {
    .home-products-track .product-card--home {
        flex-basis: calc(50% - 15px);
    }
}

@media (max-width: 720px) {
    .home-products-track {
        padding: 10px 0;
        margin: 0 1rem;
    }

    .home-products-track .product-card--home {
        flex-basis: 85%;
        min-width: 85%;
    }

    .carousel-btn {
        display: none;
    }
}

.home-articulos {
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: var(--blanco-principal);
    padding: 60px 0;
    box-shadow: var(--shadow-md);
}

.home-articulos h2 {
    text-align: center;
    color: #222;
    margin-top: 0;
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.home-articles-carousel {
    position: relative;
    width: 90%;
    margin: 0 auto;
}

.home-articles-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 3rem;
}

.home-articles-track a {
    display: contents;
}

.home-articles-track::-webkit-scrollbar {
    display: none;
}

.home-articles-track .article-card {
    flex: 0 0 calc(33.333% - 14px);
    scroll-snap-align: start;
    min-width: 300px;
    height: 100%;
}

@media (max-width: 1200px) {
    .home-articles-track .article-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .home-articles-track {
        margin: 0 1rem;
    }

    .home-articles-track .article-card {
        flex: 0 0 85%;
        min-width: 85%;
    }
}


.btn-ver-mas-productos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--azul-principal);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 14px var(--azul-ligero);
    transition: all 0.2s ease;
}

.btn-ver-mas-productos:hover {
    background: var(--azul-hover);
    transform: translateY(-2px);
}

.home-productos-texto {
    margin: 0;
    color: var(--gris-texto);
    font-size: 0.95rem;
}

.niveles-dropdown {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    border-top: var(--azul-principal) solid 2px;
}

.niveles-dropdown > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.niveles-dropdown > summary::-webkit-details-marker {
    display: none;
}

.home-niveles-header {
    background: white;
    padding: 28px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    position: relative;
}

.home-niveles-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.home-niveles-header-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

.home-niveles-header h2 {
    margin: 0;
    font-size: 2.2rem;
    color: #222;
}

.home-niveles-header p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--gris-texto);
    max-width: 700px;
    text-align: left;
}

.home-niveles-hint {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--azul-principal);
    font-size: 0.95rem;
}

.home-niveles-hint i {
    transition: transform 0.2s ease;
}

.niveles-dropdown[open] .home-niveles-hint i {
    transform: rotate(180deg);
}

.niveles-dropdown .home-niveles-grid {
    background: var(--azul-ligero);
    display: none;
    gap: 20px;
}

.niveles-dropdown {
    transition: all 0.2s ease;
}

.niveles-dropdown[open] {
    box-shadow: 0px 0px 25px 4px rgba(0, 0, 0, 0.10);
}

.niveles-dropdown[open] .home-niveles-grid {
    display: grid;
    grid-template-columns: 1fr;
    padding-bottom: 50px;
    margin-top: -2px;
}

.niveles-dropdown[open] .home-niveles-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* ========================================
   Tipos de Destructoras
   ======================================== */
.tipos-pagina {
    max-width: 1100px;
    margin: 36px auto;
    padding: 0 20px 40px;
}

.home-articulos {
    background: var(--blanco-principal);
    box-shadow: var(--shadow-md);
}

.tipos-cabecera h2 {
    margin-bottom: 8px;
}

.tipos-intro {
    margin-top: 0;
    color: #333333;
    line-height: 1.6;
}

.tipos-buscador {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
}

.tipos-label {
    font-weight: 600;
}

.tipos-input {
    flex: 1 1 260px;
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid #CCCCCC;
    border-radius: 8px;
}

.tipos-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    cursor: pointer;
}

.tipos-link {
    color: var(--azul-principal);
    text-decoration: none;
    font-weight: 600;
}

.tipos-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.tipos-kpi {
    background-color: #F7F7F7;
    border-radius: 10px;
    border-left: 4px solid var(--azul-principal);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tipos-kpi span {
    font-size: 0.92rem;
    color: #555555;
}

.tipos-kpi strong {
    font-size: 1.3rem;
}

.tipos-vacio {
    border: 1px dashed #BBBBBB;
    border-radius: 10px;
    padding: 20px;
    background-color: #FCFCFC;
}

.tipos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.tipo-card {
    border: 1px solid #E7E7E7;
    border-radius: 12px;
    padding: 18px;
    background-color: var(--blanco-principal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tipo-card h3 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.tipos-paginacion {
    margin-top: 24px;
}

.tipo-destructoras-vacio {
    margin: 10px 0 0;
    color: #666666;
    font-size: 0.92rem;
}

.tipo-productos-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.tipo-producto-item {
    border: 1px solid #ECECEC;
    border-radius: 10px;
    padding: 12px;
    background: #FAFAFA;
}

.tipo-producto-item h4 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.tipo-producto-descripcion {
    margin: 0 0 10px;
    color: #555555;
    font-size: 0.92rem;
    line-height: 1.4;
}

.tipo-producto-datos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.tipo-producto-datos div {
    border: 1px solid #F0F0F0;
    border-radius: 8px;
    background: #FFFFFF;
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tipo-producto-datos span {
    color: #666666;
    font-size: 0.82rem;
}

.tipo-producto-datos strong {
    font-size: 0.92rem;
}

.tipo-producto-link {
    color: #1F4B8E;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.tipo-producto-link:hover {
    text-decoration: underline;
}

/* ========================================
   Detalle de Producto - Estilo Split-Screen Premium
   ======================================== */
.modern-product-view {
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
}

/* Botón flotante para no romper la inmersión visual */
.btn-back-floating {
    position: absolute;
    top: 30px;
    left: 40px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: var(--negro-titulo);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.btn-back-floating:hover {
    background: var(--negro-titulo);
    color: var(--blanco-principal);
    transform: translateX(-5px);
}

/* Layout dividido 50/50 */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 80px); /* Restando el header si existe */
}

/* --- LADO IZQUIERDO: VISUAL --- */
.visual-section {
    background-color: #ffffff;
    position: sticky;
    top: 80px; /* Ajusta según el alto de tu header */
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.hero-image {
    max-width: 80%;
    max-height: 80%;
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-section:hover .hero-image {
    transform: scale(1.03);
}


.hero-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #ffffff;
    font-size: 4rem;
}

.hero-no-image span {
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- LADO DERECHO: DATOS --- */
.data-section {
    padding: 80px 10%;
    background: var(--blanco-principal);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.data-wrapper {
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Tipografía y Encabezado */
.product-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 30px;
}

.category-tag {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--azul-principal);
}

.display-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--negro-titulo);
    margin: 0;
    letter-spacing: -0.03em;
}

.price-display {
    margin-top: 10px;
}

.price-display .amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #10B981;
}

.price-display .currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gris-texto);
    margin-left: 5px;
}

.text-consult {
    font-size: 1.8rem !important;
    color: var(--gris-texto) !important;
}

/* Descripción */
.product-story {
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;/* Alinea todo a la izquierda */
    gap: 20px;               /* Espacio constante entre el párrafo y el botón */
}

/* Quitamos estilos por defecto del enlace */
.enlace-capacidad {
    text-decoration: none;
    color: inherit;
    display: inline-block; /* Permite que el margen y el padding funcionen correctamente */
    margin-top: 15px;
}

/* Estilo del botón (div interno) */
.brn-capacidad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--azul-principal); /* O el color que uses para los botones */
    color: var(--blanco-principal);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px; /* Siguiendo la estética de los 16px de la imagen */
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

/* Efecto Hover */
.enlace-capacidad:hover .brn-capacidad {
    background-color: var(--azul-hover);
    transform: translateY(-2px); /* Pequeña elevación */
    box-shadow: var(--shadow-md);
}

/* Efecto Active (al hacer click) */
.enlace-capacidad:active .brn-capacidad {
    transform: translateY(0);
}

.product-story p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #475569;
    margin: 0;
}

/* Especificaciones estilo lista limpia */
.minimal-specs {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #F1F5F9;
}

.spec-row:last-child {
    border-bottom: none;
}

.s-label {
    color: #64748B;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.s-label i {
    color: var(--azul-principal);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.s-value {
    font-weight: 700;
    color: var(--negro-titulo);
    font-size: 1rem;
}

.text-green { color: #10B981; }
.text-red { color: #EF4444; }

/* Zona de Compra */
.action-zone {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.action-zone:not(:has(button, a, form)) {
    display: none !important;
}

/* Solo se aplica cuando existe la clase .is-guest */
.product-story.is-guest {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 10px !important; /* Ajusta este valor para que no quede pegado a lo de abajo */
}

/* También eliminamos posibles sombras o líneas del enlace de capacidad si las tuviera */
.product-story.is-guest .enlace-capacidad {
    margin-bottom: 0 !important;
}

.modern-buy-form {
    display: flex;
    gap: 15px;
}

.qty-input-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    padding: 0 20px;
    width: 100px;
}

.qty-input-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    color: #94A3B8;
    margin-bottom: -5px;
    margin-top: 5px;
}

.qty-input-group input {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--negro-titulo);
    padding: 8px 0;
    width: 100%;
    outline: none;
}

.btn-primary-huge {
    flex-grow: 1;
    background: var(--negro-titulo); /* Usamos negro para un look más premium */
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.btn-primary-huge:hover {
    background: var(--azul-principal);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(36, 59, 90, 0.2);
}

.btn-primary-huge.outline {
    background: transparent;
    border: 2px solid var(--negro-titulo);
    color: var(--negro-titulo);
}

.btn-primary-huge.outline:hover {
    background: var(--negro-titulo);
    color: white;
}

.btn-secondary-huge {
    background:  var(--azul-principal);
    color: var(--blanco-principal);
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.btn-secondary-huge:hover {
    background: var(--blanco-principal);
    color: var(--azul-principal);
}

.shipping-promise {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748B;
    margin-top: 10px;
}

.shipping-promise i {
    color: #10B981;
    font-size: 1.2rem;
}

/* Alertas */
.modern-alert {
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}
.modern-alert.success { background: #DEF7EC; color: #03543F; }
.modern-alert.error { background: #FDE8E8; color: #9B1C1C; }

/* ========================================
   Responsive - Detalle Producto Mobile
   ======================================== */
.mobile-product-block { display: none; }

@media (max-width: 768px) {

    .split-layout {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }

    .data-section {
        display: none;
    }

    .btn-back-floating {
        position: relative;
        top: auto;
        left: auto;
        margin: 5px 20px 0;
        display: inline-flex;
    }

    .visual-section {
        position: relative;
        top: auto;
        height: auto;
        min-height: 260px;
        padding: 20px;
    }

    .hero-image {
        max-width: 80%;
        max-height: 240px;
    }

    .mobile-product-block {
        display: flex;
        flex-direction: column;
        padding: 0 20px 40px;
    }



    .mobile-price {
        font-size: 1.8rem;
        font-weight: 800;
        color: var(--negro-titulo);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mobile-price .currency {
        font-size: 1rem;
        font-weight: 600;
        color: var(--gris-texto);
        margin-left: 4px;
    }

        .mobile-bottom-row {
            display: flex;
            align-items: center;
            padding-top: 5px;
            padding-bottom: 10px;
            margin-bottom: 10px;
            justify-content: space-between;
        }

        .product-story{
            display: flex;
            align-content: center;
            padding-bottom: 5px;
            margin-bottom: 5px;
        }

        .enlace-capacidad {
            margin-top: 0;
            margin-bottom: 5px;
        }

        .brn-capacidad {
            background-color: #ffffff;
            color: var(--azul-principal);
            box-shadow: 0 15px 15px rgba(0,0,0,0.2);
            margin-top: 0;
        }

    .modern-buy-form {
        display: flex;
        gap: 15px;
        width: 200px;
    }

    .btn-secondary-huge{

    }


}

/* ========================================
   Autenticación - Login y Registro
   ======================================== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    background: linear-gradient(100deg, var(--azul-principal) 0%, var(--azul-hover) 100%);
    padding: 40px 20px;
}

.login-container,
.registro-container {
    background-color: var(--blanco-principal);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #EAEAEA;
}

.tituloH1LoginRegistro {
    text-align: center;
    color: #222222;
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #444444;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"]{
    padding: 12px 16px;
    border: 1px solid #CCCCCC;
    border-radius: 8px;
    font-size: 1rem;
    color: #333333;
    transition: all 0.2s ease-in-out;
    background-color: #FAFAFA;
    width: 100%;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--azul-principal);
    box-shadow: 0 0 0 3px var(--azul-ligero);
    background-color: var(--blanco-principal);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555555;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--azul-principal);
    cursor: pointer;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 14px;
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 10px;
    text-align: center;
    box-sizing: border-box;
}

.btn-primary:hover {
    background-color: var(--azul-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--azul-ligero);
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid #EEEEEE;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-footer a {
    color: #666666;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s;
}

.auth-footer a:hover {
    color: var(--azul-principal);
}

.error {
    color: #D32F2F;
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

/* Home / Index */
.home-container {
    padding-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: #d2eaff;
}
.home-container {
    padding-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: #d2eaff;
}

.home-hero {
    padding-bottom: 20%;
    padding-top: 20%;
    background: url("../img/homePortada.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}


.titulo-portada {
    left: 5%;
    position: relative;
}

.titulo-portada h1 {
    font-size: 3rem;
    font-weight: 800;
    font-style: italic;
    font-family: Roboto, sans-serif;
    letter-spacing: -1px;
    color: var(--blanco-principal);
    margin: 0;
}

.titulo-portada small {
    color: var(--gris-texto);
    font-weight: 600;
    font-size: 1.1rem;
    font-style: italic;
    font-family: Roboto, sans-serif;
}

/* Mobile Hero Styling */
@media (max-width: 768px) {
    .home-hero {
        background-position: 75%;
        position: relative;
    }
    .titulo-portada h1 {
        font-size: 2.2rem;
        margin-bottom: 0;
    }
}


.home-hero p {
    font-size: 1.25rem;
    margin: 0 auto;
    opacity: 0.9;
    font-weight: 300;
    max-width: 650px;
    text-align: left;
}

.home-intro {
    display: flex;
    flex-direction: column;
    margin-top: -2.5rem;
}

.home-intro div {
    background-color: var(--blanco-principal);
    padding: 5rem 8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #EAEAEA;
    align-self: center;
}

.home-intro h2 {
    color: #222;
    margin-top: 0;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.home-intro p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

.home-niveles-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 90%;
    align-self: center;
}

.home-niveles-header {
    text-align: center;
}

.home-niveles-header h2 {
    font-size: 2.2rem;
    color: #222;
    margin: 0 0 12px 0;
}

.home-niveles-header p {
    font-size: 1.1rem;
    color: var(--gris-texto);
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.home-niveles-grid {
    display: flex;
    flex-direction: column;
}

.nivel-card {
    background-color: var(--blanco-principal);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #EAEAEA;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 20px;
}

.nivel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.nivel-badge {
    background-color: #E0E0E0;
    color: #444;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    display: inline-block;
}

.nivel-badge--medium {
    background-color: #FFF3CD;
    color: #856404;
}

.nivel-badge--high {
    background-color: #F8D7DA;
    color: #721C24;
}

.nivel-badge--extreme {
    background-color: #B30000;
    color: var(--blanco-principal);
}

.nivel-card p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.nivel-card b {
    color: #111;
}

/* Footer */
.main-footer {
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    padding: 80px 0 30px;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.logo-footer {
    margin-left: 70px
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-col footer-col-info{
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .logo-footer {
        margin-left: 0;
    }
}

.footer-col-info {
    display: flex;
    flex-direction: column;
    margin-top: -20%;
}

.logo-white {
    height: 250px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.logo-white:hover {
    opacity: 0.8;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 12px;
    padding-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--blanco-principal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-link:hover {
    background-color: var(--blanco-principal);
    color: var(--azul-principal);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.4);
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--blanco-principal);
    padding-left: 6px;
}

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

.footer-contact li {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.4;
}

.footer-contact i {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-brand {
    color: var(--blanco-principal);
    font-weight: 600;
}

.nivel-badge {
    padding: 6px 16px;
    border-radius: 12px;
}

.home-contacto {
    background-color: var(--blanco-principal);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #EAEAEA;
    max-width: 85%;
    align-self: center;
    text-align: center;
}

.home-contacto h2 {
    text-align: center;
    color: #222;
    margin-top: 0;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.home-contacto p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

.home-contacto a {
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.home-contacto a:hover {
    background-color: var(--azul-hover);
    color: var(--blanco-principal);
}

/* Home Responsiveness */
@media (max-width: 1024px) {
    .home-intro div {
        padding: 4rem 3rem;
        margin: 0 2rem;
    }
    .titulo-portada small {
        font-weight: bolder;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 80px 0;
        min-height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .titulo-portada {
        top: 10%;
        left: 0%;
        width: 100%;
        padding: 0 20px;
        position: absolute;
    }

    .titulo-portada h1 {
        font-size: 2.2rem;
    }
    .titulo-portada small {
        font-weight: bolder;
    }

    .home-intro {
        margin-top: -3rem;
    }

    .home-intro div {
        padding: 2.5rem 1.5rem;
        margin: 0 auto;
    }

    .home-intro h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    .home-productos h2{
        font-size: 1.5rem;
    }
    .home-intro p {
        font-size: 1rem;
        text-align: center;
    }

    .home-niveles-wrapper {
        width: 95%;
    }

    .home-niveles-header h2 {
        font-size: 1.8rem;
    }

    .home-niveles-header p {
        text-align: center;
    }

    .home-contacto {
        max-width: 95%;
        padding: 30px 20px;
    }

    .home-contacto h2 {
        font-size: 1.6rem;
    }
    .home-resumen-content{
        max-width: 80%;
        padding: 3vh;
    }
    .resume-tag{
        min-width: 8vh;
    }
}

@media (max-width: 480px) {
    .titulo-portada h1 {
        font-size: 1.8rem;
    }
    .titulo-portada small {
        font-weight: bolder;
    }
    .home-niveles-header h2 {
        font-size: 1.5rem;
    }

    .nivel-card {
        padding: 20px;
    }
    .home-resumen-content{
        max-width: 80%;
        padding: 3vh;
    }
    .resume-tag{
        min-width: 8vh;
    }
}


/* Contact Page */
@media (max-width: 768px) {
    .contact-form-section {
        max-width: 80%;
    }
    .info-card {
        margin-left: 0 !important;
    }
}
.contact-page {
    padding-bottom: 60px;
    background: aliceblue;
}

.contact-header {
    background-color: var(--blanco-principal);
    padding: 60px 24px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 50px;
}

.contact-header h1 {
    font-size: 2.8rem;
    color: var(--negro-titulo);
    margin: 0 0 12px 0;
    font-weight: 800;
}

.contact-header p {
    color: var(--gris-texto);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

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

.form-card,
.info-card {
    background-color: var(--blanco-principal);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-left: 65px;
}

.form-card {
    width: 550px;
}

.form-card h3,
.info-card h3 {
    margin: 0 0 30px 0;
    font-size: 1.5rem;
    color: var(--negro-titulo);
    font-weight: 700;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gris-texto);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-field label i {
    color: var(--azul-principal);
    font-size: 0.85rem;
}

.form-field input,
.form-field textarea {
    padding: 14px 18px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #F9FAFB;
    width: 90%;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--azul-principal);
    background-color: var(--blanco-principal);
    box-shadow: 0 0 0 4px rgba(153, 0, 0, 0.08);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--gris-texto);
}

.checkbox-wrapper a {
    color: var(--azul-principal);
    text-decoration: none;
    font-weight: 600;
}

.btn-submit {
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    border: none;
    padding: 16px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px var(--azul-ligero);
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: var(--azul-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--azul-ligero);
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-icon {
    width: 48px;
    height: 48px;
    background-color: var(--azul-ligero);
    color: var(--azul-principal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text strong {
    display: block;
    font-size: 1rem;
    color: var(--negro-titulo);
    margin-bottom: 4px;
}

.info-text p {
    margin: 0;
    color: var(--gris-texto);
    font-size: 0.95rem;
    line-height: 1.5;
}

.map-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #E5E7EB;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
}

/* Home Summary Section */
.home-resumen {
    margin: 20px 0;
    padding: 0 24px;
}

.home-resumen-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border-left: 8px solid var(--azul-principal);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-resumen-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.home-resumen h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin: 0 0 30px 0;
}

.resumen-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resumen-lista li {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.1rem;
    color: var(--gris-texto);
}

.resumen-tag {
    padding: 6px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.resumen-tag--medium {
    background-color: #FFF3CD;
    color: #856404;
}

.resumen-tag--high {
    background-color: #F8D7DA;
    color: #721C24;
}

.resumen-tag--extreme {
    background-color: #B30000;
    color: var(--blanco-principal);
}

/* Legal Page */
.legal-page {
    padding-bottom: 60px;
}

.legal-header {
    background-color: var(--blanco-principal);
    padding: 60px 24px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 40px;
}

.legal-icon {
    font-size: 3rem;
    color: var(--azul-principal);
    margin-bottom: 20px;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin: 0 0 10px 0;
}

.legal-header p {
    color: var(--gris-texto);
    font-size: 0.95rem;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.legal-card {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    font-size: 1.4rem;
    color: var(--negro-titulo);
    margin-bottom: 15px;
    border-left: 4px solid var(--azul-principal);
    padding-left: 15px;
}

.legal-section p {
    color: var(--gris-texto);
    line-height: 1.8;
    font-size: 1.05rem;
}

.legal-alert {
    background: var(--azul-ligero);
    color: var(--azul-principal);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    font-weight: 500;
    font-size: 0.95rem;
}

.legal-alert i {
    margin-top: 3px;
}

.legal-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #F3F4F6;
    font-size: 0.9rem;
    color: #9CA3AF;
    text-align: center;
    font-style: italic;
}

/* Listing Page */
.listing-page {
    padding-bottom: 80px;
}

.listing-header {
    background-color: var(--blanco-principal);
    padding: 60px 24px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 50px;
}

.listing-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.listing-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin: 0 0 16px 0;
}

.listing-intro {
    font-size: 1.15rem;
    color: var(--gris-texto);
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: left;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.modern-search {
    display: flex;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 15px;
}

.search-input-wrapper i {
    color: #9CA3AF;
    font-size: 1rem;
}

.search-input-wrapper input {
    border: none;
    padding: 10px 15px;
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
    color: var(--negro-titulo);
}

.search-input-wrapper input:focus {
    outline: none;
}

.btn-search {
    background: var(--azul-principal);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search:hover {
    background: var(--azul-hover);
}

.btn-clear {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #9CA3AF;
    text-decoration: none;
    font-size: 1.2rem;
}

.listing-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #F3F4F6;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid #F9FAFB;
    padding-bottom: 15px;
}

.category-icon {
    font-size: 1.5rem;
    color: var(--azul-principal);
}

.category-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--negro-titulo);
    margin: 0;
}

.category-empty-msg {
    color: #9CA3AF;
    font-style: italic;
}

.product-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-mini-card {
    background: #FAFAFB;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.product-mini-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-mini-img {
    height: 200px;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.product-mini-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.product-mini-info h4 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--negro-titulo);
}

.product-mini-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.product-mini-specs span,
.price-base {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gris-texto);
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-price-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-iva {
    font-size: 0.75rem;
    color: var(--gris-texto);
    opacity: 0.8;
    font-weight: 500;
}

.btn-mini-view {
    display: block;
    text-align: center;
    text-decoration: none;
    background: white;
    color: var(--azul-principal);
    border: 1px solid var(--azul-principal);
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-mini-view:hover {
    background: var(--azul-principal);
    color: white;
}

.listing-pagination {
    margin-top: 50px;
}

/* Comparison Table */
.comparison-section {
    margin-top: 80px;
}

.comparison-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 10px;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.modern-table th {
    text-align: left;
    padding: 20px 15px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gris-texto);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #F3F4F6;
}

.modern-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #F3F4F6;
}

.td-name {
    font-weight: 700;
    color: var(--negro-titulo);
}

.status-ok {
    color: #10B981;
    font-size: 1.2rem;
}

.status-no {
    color: #EF4444;
    font-size: 1.2rem;
}

.badge-rec {
    background: #DCFCE7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.modern-table tr:hover {
    background: #FAFAFB;
}

/* Product Detail Page */
.product-detail-page {
    padding: 60px 0 100px;
    background-color: var(--gris-fondo);
}

.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gris-texto);
    font-weight: 600;
    margin-bottom: 30px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--azul-principal);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
    background: white;
    padding: 60px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 968px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 40px;
    }
}

.gallery-main-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid #F3F4F6;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 450px;
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    border: 10px var(--azul-principal) solid;
}

.product-info-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.product-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--azul-ligero);
    color: var(--azul-principal);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    width: fit-content;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin: 0;
    line-height: 1.2;
}

.product-price-box {
    padding: 24px;
    background: #FAFAFB;
    border-radius: 16px;
    border-left: 6px solid var(--azul-principal);
}

.price-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gris-texto);
    margin-bottom: 5px;
}

.price-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--azul-principal);
}

.price-value small {
    font-size: 1rem;
    color: var(--gris-texto);
}

.product-description-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-description-box p {
    color: var(--gris-texto);
    line-height: 1.6;
    font-size: 1.05rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.spec-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: #F9FAFB;
    border-radius: 12px;
}

.spec-icon {
    width: 40px;
    height: 40px;
    background: white;
    color: var(--azul-principal);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.spec-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9CA3AF;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.spec-value {
    font-weight: 700;
    color: var(--negro-titulo);
}

.stock-ok {
    color: #10B981;
}

.stock-low {
    color: #EF4444;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.product-cart-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-cart-form label {
    font-size: 0.9rem;
    color: var(--gris-texto);
    font-weight: 600;
}

.product-cart-controls {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
}

.product-cart-controls input {
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
}

.product-cart-controls input:focus {
    outline: none;
    border-color: var(--azul-principal);
    box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.12);
}

.btn-add-cart {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-add-cart:hover {
    background-color: var(--azul-hover);
    transform: translateY(-1px);
}

.btn-buy-disabled {
    width: 100%;
    padding: 18px;
    background: #E5E7EB;
    color: #9CA3AF;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.shipping-info {
    font-size: 0.9rem;
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Cart Page */
.cart-page {
    padding: 40px 24px 70px;
}

.cart-header {
    max-width: 1200px;
    margin: 0 auto 24px;
}

.cart-header h1 {
    margin: 0 0 8px;
    font-size: 2.1rem;
    color: var(--negro-titulo);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h1 i {
    color: var(--azul-principal);
}

.cart-header p {
    margin: 0;
    color: var(--gris-texto);
    font-size: 1.02rem;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cart-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.cart-alert-success {
    border: 1px solid #BBF7D0;
    background-color: #F0FDF4;
    color: #166534;
}

.cart-alert-error {
    border: 1px solid #FECACA;
    background-color: #FEF2F2;
    color: #991B1B;
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    background-color: var(--blanco-principal);
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 16px;
    display: grid;
    grid-template-columns: 130px 1fr 220px;
    gap: 18px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.cart-item-image {
    width: 130px;
    height: 130px;
    border-radius: 12px;
    background-color: #FAFAFB;
    border: 1px solid #F3F4F6;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.cart-item-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9CA3AF;
    font-size: 0.9rem;
}

.cart-item-info h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: var(--negro-titulo);
}

.cart-item-info p {
    margin: 0 0 14px;
    color: var(--gris-texto);
    font-size: 0.92rem;
}

.cart-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    font-size: 0.92rem;
    color: var(--gris-texto);
}

.cart-price-row strong {
    color: var(--negro-titulo);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-qty-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--gris-texto);
}

.cart-qty-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.cart-qty-controls input {
    border: 1px solid #D1D5DB;
    border-radius: 9px;
    padding: 10px;
    font-size: 0.95rem;
    text-align: center;
    font-family: inherit;
}

.cart-qty-controls button {
    border: 1px solid #D1D5DB;
    background: #F9FAFB;
    color: var(--negro-titulo);
    border-radius: 9px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.86rem;
    transition: all 0.2s ease;
}

.cart-qty-controls button:hover {
    background: #F3F4F6;
}

.cart-remove-btn {
    border: none;
    background-color: #FEF2F2;
    color: #B91C1C;
    border-radius: 10px;
    padding: 10px 12px;
    width: 100%;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.cart-remove-btn:hover {
    background-color: #FEE2E2;
}

.cart-summary {
    background-color: var(--blanco-principal);
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    position: sticky;
    top: 95px;
}

.cart-summary h2 {
    margin: 0 0 16px;
    font-size: 1.3rem;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--gris-texto);
    font-size: 0.95rem;
}

.cart-summary-row strong {
    color: var(--negro-titulo);
}

.cart-summary-total {
    margin-top: 14px;
    border-top: 1px solid #F3F4F6;
    padding-top: 14px;
    font-size: 1.05rem;
}

.cart-summary-total strong {
    color: var(--azul-principal);
    font-size: 1.15rem;
}

.cart-continue-link {
    display: block;
    text-align: center;
    text-decoration: none;
    border: 1px solid #D1D5DB;
    color: var(--negro-titulo);
    border-radius: 10px;
    padding: 11px 12px;
    font-weight: 700;
    margin: 16px 0 12px;
    transition: background 0.2s ease;
}

.cart-continue-link:hover {
    background-color: #F9FAFB;
}

.cart-clear-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: #B91C1C;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cart-empty {
    background-color: var(--blanco-principal);
    border: 1px dashed #D1D5DB;
    border-radius: 16px;
    padding: 55px 20px;
    text-align: center;
}

.cart-empty i {
    font-size: 2.8rem;
    color: #9CA3AF;
    margin-bottom: 14px;
}

.cart-empty h2 {
    margin: 0 0 8px;
    color: var(--negro-titulo);
}

.cart-empty p {
    margin: 0 0 20px;
    color: var(--gris-texto);
}

@media (max-width: 1050px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .cart-item {
        grid-template-columns: 1fr;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .product-cart-controls {
        grid-template-columns: 1fr;
    }
}

/* Auth Required Card */
.auth-required-card {
    text-align: center;
    padding: 60px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.auth-lock-icon {
    font-size: 3.5rem;
    color: var(--azul-principal);
    margin-bottom: 25px;
    opacity: 0.9;
}

.auth-required-content h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 800;
}

.auth-required-content p {
    color: var(--gris-texto);
    margin-bottom: 35px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.auth-required-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 280px;
    margin: 0 auto;
}

.btn-outline {
    display: block;
    width: 100%;
    padding: 14px;
    border: 2px solid var(--azul-principal);
    color: var(--azul-principal);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.2s;
    text-align: center;
}

.btn-outline:hover {
    background-color: var(--azul-principal);
    color: white;
}

/* Admin Panel */
.panel-crud {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 80px);
}

.contenedor-menu-vertical {
    width: 280px;
    background: linear-gradient(180deg, var(--azul-principal) 0%, var(--azul-hover) 100%);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-self: stretch;
    min-height: calc(100vh - 80px);
}

.menu-vertical {
    padding: 35px 20px;
    position: sticky;
    top: 80px;
}

.titulo-menu-crud {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 25px;
    padding-left: 15px;
    font-weight: 800;
}

.lista-menu-crud {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.enlace-menu-crud {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 12px;
}

.enlace-menu-crud:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateX(5px);
}

.enlace-menu-crud.activo {
    background-color: white;
    color: var(--azul-principal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contenedor-contenido-crud {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #F8FAFC;
    min-width: 0;
}

/* Mobile Admin Navigation Components (Hidden by default) */
.mobile-admin-toggle {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--azul-principal) 0%, var(--azul-hover) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(36, 59, 90, 0.4);
    z-index: 100;
    cursor: pointer;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.mobile-admin-toggle:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 30px rgba(36, 59, 90, 0.5);
}

.mobile-admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-admin-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-admin-drawer {
    position: fixed;
    top: 0;
    left: -320px; /* Hidden state, positioned off-screen to the left */
    width: 320px;
    height: 100%;
    background: linear-gradient(180deg, var(--azul-principal) 0%, var(--azul-hover) 100%);
    z-index: 2002;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1); /* Shadow on the right */
}

.mobile-admin-drawer.active {
    transform: translateX(320px); /* Slide in from left */
}

.mobile-admin-drawer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-close-drawer {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-close-drawer:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-admin-drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-menu-list a {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    gap: 12px;
}

.drawer-menu-list a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
}

.drawer-menu-list a.active {
    background-color: white;
    color: var(--azul-principal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Media Query for Mobile Admin Panel */
@media (max-width: 900px) {
    .contenedor-menu-vertical {
        display: none;
    }

    .mobile-admin-toggle {
        display: flex;
    }
}


.portadPanelAdm {
    background: linear-gradient(160deg, var(--azul-principal) 10%, var(--azul-hover) 100%);
    color: white;
    padding: 60px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.portadPanelAdm::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background: linear-gradient(80deg, var(--azul-principal) 50%, var(--azul-hover) 100%);
}

.portadPanelAdm h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
}

.portadPanelAdm h1 i {
    font-size: 2rem;
    opacity: 0.8;
}

.btn-select-portada {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 170px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--fuente-principal);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.btn-select-portada i {
    font-size: 0.9rem;
}

.btn-select-portada--show {
    background: linear-gradient(135deg, var(--azul-principal) 0%, var(--azul-hover) 100%);
    color: var(--blanco-principal);
    border-color: rgba(255, 255, 255, 0.08);
}

.btn-select-portada--show:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #1e3148 0%, var(--azul-principal) 100%);
}

.btn-select-portada--hide {
    background: #F8FAFC;
    color: #0F172A;
    border-color: #CBD5E1;
}

.btn-select-portada--hide:hover {
    transform: translateY(-2px);
    background: #EFF6FF;
    color: var(--azul-principal);
    border-color: var(--azul-principal);
    box-shadow: 0 8px 18px rgba(36, 59, 90, 0.14);
}

.btn-select-portada:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
    .btn-select-portada {
        width: 100%;
        min-width: 0;
    }
    .portadPanelAdm h1 {
        font-size: 2em;
    }
}

.welcome-msg {
    margin-top: 20px;
    opacity: 0.9;
    font-size: 1.2rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-msg strong {
    font-weight: 700;
    color: #FFF;
}

.contenedor-crud {
    padding: 40px 40px;
    flex-grow: 1;
    background-color: #F8FAFC;
}

.contenedor-tabla {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    border: 1px solid #E2E8F0;
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-table th {
    background-color: #F8FAFC;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 2px solid #F1F5F9;
}
.admin-table a {
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.titulo-correo {
    white-space: normal;
    word-break: break-all;
    overflow-wrap: break-word;
}

.admin-table td {
    padding: 20px 1rem;
    border-bottom: 1px solid #F1F5F9;
    color: #1E293B;
    font-size: 1rem;
    text-align: center;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: var(--azul-ligero);
}

.acciones-tabla {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-editar,
.btn-eliminar {
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-editar {
    background-color: #EEF2FF;
    color: var(--azul-principal);
}

.btn-editar:hover {
    background-color: var(--azul-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--azul-ligero);
}

.btn-eliminar {
    background-color: #FFF1F2;
    color: #E11D48;
}

.btn-eliminar:hover {
    background-color: #E11D48;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
}

.paginacion-crud {
    margin-top: 50px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.paginacion-crud nav {
    background: transparent;
}

.paginacion-crud nav {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 3px;
    width: 100%;
    margin-top: 50px;
}

.paginacion-crud p,
.paginacion-crud .text-sm:not(:has(a, span)) {
    display: none !important;
}

.paginacion-crud a,
.paginacion-crud span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    background-color: white;
    color: var(--azul-principal);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    border: 1px solid #E2E8F0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.paginacion-crud a:hover {
    background-color: var(--azul-principal);
    color: white;
    border-color: var(--azul-principal);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px var(--azul-ligero);
}

.paginacion-crud span {
    background-color: #F8FAFC;
    color: #CBD5E1;
    cursor: not-allowed;
    box-shadow: none;
}

.paginacion-crud svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 640px) {
    .paginacion-crud a,
    .paginacion-crud span {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 0.85rem;
    }
}
.contenedor-crud-mobile
{
    display: none;
}
.btn-icon.btn-danger.btn-cancelar {
    color: var(--blanco-principal);
    background: red;
    border: none;
    margin-bottom: -1em;
}
.btn-icon.btn-danger.btn-cancelar:hover {
    color: red;
    background: #ffc6c6;
    border: red 1px solid;
}
/* Mobile Responsiveness for Admin Panel */
@media (max-width: 1200px) {
    .pedido-detalle-grid{
        display:block !important;
    }
    .contenedor-crud-desktop {
        display:none;
    }
    .contenedor-crud-mobile {
        display: block;
        padding: 16px 10px;
        max-width: 100%;
    }

    /* BUSCADOR */
    .formulario-busqueda-pedidos {
        display: flex;
        gap: 8px;
        margin-bottom: 18px;
    }

    .buscador-input-wrap {
        flex: 1;
        display: flex;
        align-items: center;
        padding: 10px 12px;
        border-radius: 20px;
        border: var(--azul-principal) 1px solid;
    }

    .buscador-input-wrap input {
        border: none;
        outline: none;
        width: 100%;
        margin-left: 8px;
        background: transparent;
        font-size: 14px;

    }

    .btn-buscar-pedidos,
    .btn-limpiar-busqueda {
        width: 8vh;
        height: 42px;
        border: none;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--azul-principal);
        color: var(--blanco-principal);
        margin: -2px;
    }

    /* CARD */
    .pedido-card {
        border-radius: 16px;
        padding: 1.5vh;
        margin-bottom: 14px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        transition: transform 0.15s ease;
    }

    .pedido-card:active {
        transform: scale(0.98);
    }

    /* HEADER */
    .pedido-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .pedido-id {
        font-weight: 600;
        font-size: 15px;
    }

    .pedido-fecha {
        font-size: 12px;
        opacity: 0.7;
    }

    /* ESTADO */
    .estado-control {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 500;
        width: fit-content;
    }

    /* FOOTER */
    .pedido-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .pedido-total {
        font-size: 18px;
        font-weight: 700;
    }

    /* BOTONES */
    .pedido-acciones {
        display: flex;
        gap: 8px;
    }

    .btn-icon {
        width: 10vh;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--azul-hover);
        text-decoration: none;
        border: var(--azul-hover) 1px solid;
        gap: 1vh;
    }

    .btn-icon i {
        font-size: 14px;
    }
    .btn-icon.btn-danger {
        color: red;
        border: red 1px solid;
        background: #ffcbcb;
        font-weight: 600;
    }


    /* VACÍO */
    .empty-state {
        text-align: center;
        padding: 30px 15px;
        border-radius: 12px;
        font-size: 14px;
        opacity: 0.7;
    }
}
/* Vista de pedido ampliado movil */
/* =========================
   DESKTOP (por defecto)
========================= */

.contenedor-tabla-movil {
    display: none;
}


/* =========================
   MOBILE / TABLET
========================= */

@media (max-width: 1200px) {

    /* Ocultamos tabla clásica */
    .contenedor-tabla-desktop {
        display: none;
    }

    /* Mostramos versión móvil */
    .contenedor-tabla-movil {
        display: block;
    }
    .contenedor-crud.pedido-detalle {
        padding: 2vh;
    }
    /* Evitar cualquier scroll lateral global */
    body {
        overflow-x: hidden;
    }
    /* Boton Descargar PDF */
    .btn-descargar-pdf {
        padding: 1vh 2vh !important;
        font-weight: 400 !important;
    }
    .pedido-detalle-header{
        gap:3vh !important;
    }

    /* =========================
       TARJETAS DE PRODUCTO
    ========================= */

    .card-vista-ampliada {
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .producto-top {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 10px;
    }

    .producto-top img {
        width: 55px;
        height: 55px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .producto-nombre {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
    }

    .producto-info {
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .producto-info div {
        display: flex;
        flex-direction: column;
    }

    .producto-info span {
        font-size: 12px;
        color: #777;
    }

    .producto-info strong {
        font-size: 14px;
    }


    /* =========================
       FOOTER (TOTAL)
    ========================= */

    .pedido-tabla-footer {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        background: #fff;
        border-radius: 10px;
        border: 1px solid #e5e5e5;
        margin-top: 10px;
    }

    .pedido-tabla-footer-total {
        font-size: 18px;
        font-weight: bold;
        text-align: right;
    }

    .pedido-total-info {
        font-size: 12px;
        color: #666;
    }


    /* =========================
       GRID GENERAL
    ========================= */

    .pedido-detalle-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .pedido-col-right {
        width: 100%;
    }
}
/* ========================= */
/* DIRECCIONES MOBILE EXTRA */
/* ========================= */

@media (max-width: 1200px) {
    .contenedor-tabla-desktop{
        display:none;
    }
    .direccion-card {
        width: 90%;
        padding: 18px;
        border-radius: 18px;
    }

    .direccion-header {
        justify-content: flex-start;
    }

    .direccion-tipo {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 20px;
        font-weight: 600;
    }

    .direccion-body {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .direccion-linea {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.3;
    }

    .direccion-extra {
        font-size: 12px;
        opacity: 0.7;
    }

    .direccion-footer {
        margin-top: 5px;
    }

}

/* Direcciones */
.panel-user-nueva-d {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    align-self: start;
}

.div-direccion-user-tipo {
    margin-bottom: 15px;
}

.label-direccion-user-tipo {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.select-direccion-user-tipo {
    width: 100%;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}

.direccion-calle-user {
    margin-bottom: 15px;
}

.direccion-calle-user label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.direccion-calle-user input {
    width: 93%;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}

.direccion-numero-user {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.direccion-numero-user label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.direccion-numero-user input {
    width: 80%;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}

.direccion-poblacion-user {
    margin-bottom: 15px;
}

.direccion-poblacion-user label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.direccion-poblacion-user input {
    width: 93%;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}

.direccion-provincia-user {
    margin-bottom: 20px;
}

.direccion-provincia-user label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.direccion-provincia-user input {
    width: 93%;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}

.boton-direcciones-submit {
    width: 100%;
    padding: 12px;
    background: var(--azul-principal);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.div-lista-direcciones-user {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Estado pedidos */
.estado-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid transparent;
    background: #F8FAFC;
}

.estado-icon {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 800;
}

.estado-select {
    border: none;
    background: transparent;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    padding-right: 18px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.estado-select:focus {
    outline: none;
}

.estado-pendiente {
    background: #FFF9DB;
    color: #e5be01;
    border-color: rgba(229, 190, 1, 0.25);
}

.estado-pendiente:hover {
    background: #e5be01;
    color: #FFF9DB;
}

.estado-confirmado {
    background: #E8F4FF;
    color: #0095ff;
    border-color: rgba(0, 149, 255, 0.25);
}

.estado-confirmado:hover {
    background: #0095ff;
    color: #E8F4FF;
}

.estado-entregado {
    background: #E7F8EF;
    color: #03543F;
    border-color: rgba(3, 84, 63, 0.25);
}

.estado-entregado:hover {
    background: #03543F;
    color: #E7F8EF;
}

.estado-cancelado {
    background: #FDECEC;
    color: #ff0000;
    border-color: rgba(255, 0, 0, 0.25);
}

.estado-cancelado:hover {
    background: #ff0000;
    color: #FDECEC;
}

/* Detalles Crud */
.btn-volver-listado {
    text-decoration: none;
    color: #64748B;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-volver-listado:hover {
    color: var(--azul-hover);
}

/* Buscador pedidos */
.contenedor-crud  .search-container {
    margin-bottom: 22px;
}

.contenedor-crud  .formulario-busqueda-pedidos {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 640px;
    background: white;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.contenedor-crud  .buscador-input-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.contenedor-crud  .buscador-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.contenedor-crud  .barra-busqueda-crud {
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    padding: 0 12px 0 40px;
    border: 1px solid var(--azul-ligero);
    border-radius: 10px;
    font-size: 0.92rem;
    outline: none;
    transition: 0.25s ease;
    background-color: rgb(248, 250, 252);
    box-shadow: none;
}

.contenedor-crud  .barra-busqueda-crud::placeholder {
    color: #94a3b8;
}

.contenedor-crud .barra-busqueda-crud:focus {
    border-color: var(--azul-hover);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--azul-ligero);
}

.contenedor-crud  .btn-buscar-pedidos,
.contenedor-crud .btn-limpiar-busqueda {
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.contenedor-crud  .btn-buscar-pedidos {
    padding: 0 16px;
    border: none;
    background-color: var(--azul-principal);
    color: white;
    cursor: pointer;
}

.contenedor-crud  .btn-buscar-pedidos:hover {
    background-color: var(--azul-hover);
}

.contenedor-crud .btn-buscar-pedidos span {
    line-height: 1;
}

.contenedor-crud .btn-limpiar-busqueda {
    width: 40px;
    padding: 0;
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.contenedor-crud .btn-limpiar-busqueda:hover {
    background-color: #e2e8f0;
    color: #475569;
}

@media (max-width: 640px) {
    .contenedor-crud  .formulario-busqueda-pedidos {
        width: 100%;
        flex-wrap: wrap;
        max-width: none;
    }

    .contenedor-crud .btn-buscar-pedidos {
        width: 100%;
        justify-content: center;
    }

    .contenedor-crud .btn-limpiar-busqueda {
        width: 100%;
    }

    .contenedor-crud .formulario-busqueda-pedidos[data-auto-search-form] {
        flex-wrap: nowrap;
    }

    .contenedor-crud .formulario-busqueda-pedidos[data-auto-search-form] .btn-limpiar-busqueda {
        width: 40px;
        flex: 0 0 40px;
    }
}

.ayuda-busqueda {
    display: block;
    margin-top: 8px;
    color: var(--azul-hover);
    font-size: 0.75rem;
    line-height: 1.4;
    font-style: italic;
}

/* Carrito */
.btn-ver-pedidos-carrito {
    padding: 18px;
    background: var(--azul-principal);
    color: white;
    border-radius: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-buy-active {
    text-decoration: none;
    margin-top: 20px;
    padding: 18px;
    background: var(--azul-principal);
    color: white;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s;
}

.hidden {
    display: none !important;
}

/* ========================================
   PÁGINA DE PRODUCTOS - CATÁLOGO
   ======================================== */
.products-page {
    min-height: 100vh;
    background: aliceblue;
    padding-bottom: 80px;
}

.products-hero {
    background-color: var(--blanco-principal);
    padding: 60px 24px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
}

.products-hero-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.products-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin: 0 0 16px;
}

.products-hero p {
    font-size: 1rem;
    color: var(--gris-texto);
    line-height: 1.7;
    margin: 0;
}

.products-toolbar {
    background: var(--blanco-principal);
    border-bottom: 1px solid #E5E7EB;
    box-shadow: var(--shadow-sm);
}

.products-toolbar-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
}

.toolbar-group {
    display: flex;
    gap: 18px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.toolbar-group-left {
    flex: 1 1 auto;
}

.toolbar-group-right {
    flex: 0 1 320px;
    min-width: 260px;
    margin-left: auto;
}

.toolbar-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toolbar-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94A3B8;
}

.toolbar-select {
    min-width: 220px;
    padding: 11px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    color: var(--negro-titulo);
    font-family: var(--fuente-principal);
    font-size: 0.92rem;
    font-weight: 600;
    outline: none;
}

.toolbar-select:focus {
    border-color: var(--azul-principal);
    box-shadow: 0 0 0 3px var(--azul-ligero);
    background: var(--blanco-principal);
}

.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    color: var(--gris-texto);
    border-radius: 999px;
    padding: 9px 14px;
    font-family: var(--fuente-principal);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    color: var(--azul-principal);
    border-color: var(--azul-principal);
}

.filter-pill.active {
    background: var(--azul-principal);
    color: var(--blanco-principal);
    border-color: var(--azul-principal);
    box-shadow: 0 8px 18px rgba(36, 59, 90, 0.16);
}

.toolbar-search {
    position: relative;
    width: 100%;
}

.toolbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
}

.toolbar-search input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    background: #F8FAFC;
    color: var(--negro-titulo);
    font-family: var(--fuente-principal);
    font-size: 0.92rem;
    outline: none;
    box-sizing: border-box;
}

.toolbar-search input:focus {
    border-color: var(--azul-principal);
    box-shadow: 0 0 0 3px var(--azul-ligero);
    background: var(--blanco-principal);
}

.products-layout {
    max-width: 1300px;
    margin: 30px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.products-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-card {
    background: var(--blanco-principal);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #F3F4F6;
}

.sidebar-scroll {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--azul-principal) #E2E8F0;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: #E2E8F0;
    border-radius: 999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: var(--azul-principal);
    border-radius: 999px;
}

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9CA3AF;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.sidebar-title i {
    color: var(--azul-principal);
    font-size: 0.85rem;
    position: relative;
    top: -4px;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--gris-texto);
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.sidebar-option input[type="radio"],
.sidebar-option input[type="checkbox"] {
    accent-color: var(--azul-principal);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    transform: translateY(-2.5px);
}

.sidebar-option:hover {
    background: var(--azul-ligero);
    color: var(--azul-principal);
}

.sidebar-option.active {
    background: var(--azul-ligero);
    color: var(--azul-principal);
    font-weight: 600;
}

.sidebar-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 18px 0;
}

.sidebar-content {
    display: none;
    overflow: hidden;
}

/* Estado cuando está abierto */
.sidebar-content.active {
    display: block;
}

.products-main {
    min-width: 0;
}

.products-count {
    font-size: 0.95rem;
    color: var(--gris-texto);
    margin-bottom: 24px;
    font-weight: 500;
}

.products-count span {
    font-weight: 700;
    color: var(--azul-principal);
}

/* ========================================
   GRID DE PRODUCTOS
   FIXES: eliminado display:contents en .products-grid a
   para que no rompa los <a> internos de las cards
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.products-grid--home {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    width: 90%;
    align-self: center;
}

.products-grid--catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ELIMINADO: .products-grid a { display: contents; }
   Causaba que los <a> internos de las cards (.btn-ver-detalle)
   fueran eliminados del DOM por el navegador (HTML inválido:
   no se puede anidar <a> dentro de <a>).
   Ahora el carrusel del home usa display:contents en su propio
   selector específico: .home-products-track a */

/* ========================================
   PRODUCT CARD — OVERLAY PATTERN
   La card es un <article> con position:relative.
   .card-link-overlay cubre toda la card (z-index:1).
   .btn-ver-detalle tiene z-index:2 para quedar encima.
   ======================================== */
.product-card {
    --product-card-surface: #ffffff;
    background: var(--product-card-surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: 0 !important;
    /* CRÍTICO: position relative para que el overlay funcione */
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card.hidden {
    display: none;
}

/* Overlay que hace toda la card clickable */
.card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 20px;
}

.product-card-img,
.product-card-img--home,
.product-card-img--catalog {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    width: 100%;
}

.product-card-img img,
.product-card-img--home img,
.product-card-img--catalog img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    padding: 20px;
    display: block;
    transition: transform 0.3s ease;
    background-color: #ffffff;
}

.product-card-img--home {
    height: 220px !important;
}

.product-card-img--catalog {
    height: 200px !important;
}

.product-card:hover .product-card-img img,
.product-card:hover .product-card-img--home img,
.product-card:hover .product-card-img--catalog img {
    transform: scale(1.06);
}

.product-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--product-card-surface, var(--gris-fondo));
    color: #D1D5DB;
    font-size: 2.5rem;
}

.badge-agotado,
.badge-pocas {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Z-index para quedar sobre el overlay */
    position: absolute;
    z-index: 2;
}

.badge-agotado {
    background: #FEE2E2;
    color: #DC2626;
}

.badge-pocas {
    background: #FEF3C7;
    color: #D97706;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 10px 15px 15px !important;
    gap: 0;
    background-color: transparent;
    border-top: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
}

.product-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.tag-tipo,
.tag-modelo {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
}

.tag-tipo {
    background: var(--azul-ligero);
    color: var(--azul-principal);
}

.tag-modelo {
    background: #EDE9FE;
    color: #6D28D9;
}

.product-card-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    min-height: 0;
    max-height: 2.8em;
    padding: 0;
}

.product-card-desc {
    font-size: 0.88rem;
    color: var(--gris-texto);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    min-height: 0;
    max-height: 4.5em;
}

.product-card-specs {
    display: flex;
    gap: 6px 14px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--gris-texto);
    margin-top: 0;
}

.product-card-specs span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-card-specs i {
    color: var(--azul-principal);
}

/* Pagination Controls */
.pagination-container {
    margin: 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    min-width: 45px;
    height: 45px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1.5px solid #E5E7EB;
    background: white;
    color: var(--gris-texto);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--azul-principal);
    color: var(--azul-principal);
    background: var(--azul-ligero);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.pagination-btn.active {
    background: var(--azul-principal);
    color: white;
    border-color: var(--azul-principal);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #F9FAFB;
}

.pagination-btn-arrow {
    width: auto;
    min-width: 100px;
    padding: 0 20px;
    gap: 10px;
}

/* ====== DESKTOP ====== */
.collapsible {
    display: block;
}

/* ====== MÓVIL ====== */
@media (max-width: 768px) {

    .collapsible {
        display: none;
    }

    .collapsible.active {
        display: block;
    }

    .sidebar-title {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-title::after {
        content: "▼";
        font-size: 12px;
        transition: transform 0.3s;
    }

    .sidebar-title.active::after {
        transform: rotate(180deg);
    }
}

/* ========================================
   PRODUCT CARD FOOTER
   .btn-ver-detalle tiene z-index:2 para quedar
   por encima del .card-link-overlay (z-index:1)
   ======================================== */
.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 16px 0 20px;
    border-top: 1px solid #f1f5f9;
    gap: 20px;
    min-width: 0;
    /* z-index para que los elementos interactivos queden sobre el overlay */
    position: relative;
    z-index: 2;
}

.product-card-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1 1 auto;
    gap: 1px;
}

.price-main {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--azul-principal);
    line-height: 1.1;
    white-space: nowrap;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.price-main--consult {
    font-size: 0.9rem;
    color: var(--gris-texto);
    font-weight: 700;
    white-space: normal;
}

.price-iva {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;
    word-break: keep-all;
}

.price-iva small {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
}

/* CRÍTICO: z-index:2 para que el botón quede sobre el overlay */
.btn-ver-detalle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.12);
    position: relative;
    z-index: 2;
}

.btn-ver-detalle:hover {
    background-color: var(--azul-hover);
    transform: translateY(-1px);
}

/* Variantes de card */
.product-card-body {
    padding: 2px 22px 0;
    gap: 14px;
}

.product-card-meta,
.product-card-name,
.product-card-desc,
.product-card-specs {
    padding-left: 0;
    padding-right: 0;
}

.product-card-meta {
    margin-top: 2px;
    gap: 8px;
}

.tag-tipo,
.tag-modelo {
    font-size: 0.72rem;
    padding: 5px 10px;
    border-radius: 999px;
    letter-spacing: 0.35px;
}

.product-card-name {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-specs {
    gap: 10px 12px;
    font-size: 0.8rem;
}

.product-card-specs span {
    gap: 6px;
    min-width: fit-content;
}

.product-card--home .product-card-body {
    gap: 12px;
    min-height: 20rem;
    max-height: 20rem;
}

.product-card--home .product-card-desc {
    font-size: 0.88rem;
}

.product-card--home .product-card-footer {
    align-items: center;
}

.product-card--home .btn-ver-detalle {
    padding: 9px 14px;
}

.product-card--catalog .product-card-body {
    padding-right: 24px;
    padding-left: 24px;
}

.product-card--catalog .product-card-specs {
    row-gap: 12px;
}

.product-card--catalog .product-card-footer {
    gap: 18px;
}

.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

.products-empty i {
    font-size: 3rem;
    display: block;
    margin-bottom: 14px;
    color: #D1D5DB;
}

.products-empty p {
    font-size: 1rem;
    margin: 0;
}

/* ========================================
   ARTÍCULOS
   ======================================== */
.articles-grid-wrapper {
    padding: 5rem 20px;
    background: aliceblue;
}

.articles-grid-home {
    padding: 5rem 20px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 50px;
    margin: 0 15rem;
}

.articles-grid a {
    display: contents;
}

.article-card {
    background: var(--blanco-principal);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E7EB;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.article-card-image {
    height: 220px;
    overflow: hidden;
    background-color: #F3F4F6;
    position: relative;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.1);
}

.article-no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #CBD5E1;
    font-size: 3rem;
}

.article-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card-meta {
    margin-bottom: 12px;
}

.article-date {
    font-size: 0.85rem;
    color: var(--gris-texto);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--negro-titulo);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-excerpt {
    font-size: 0.95rem;
    color: var(--gris-texto);
    line-height: 1.6;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--azul-principal);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.2s;
}

.btn-read-more:hover {
    gap: 12px;
}

.articles-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 2px dashed #E5E7EB;
}

.articles-empty i {
    font-size: 4rem;
    color: #CBD5E1;
    margin-bottom: 20px;
}

.articles-empty p {
    font-size: 1.1rem;
    color: var(--gris-texto);
}

.articles-pagination {
    margin-top: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* --- Tablet grande / sidebar colapsa --- */
@media (max-width: 1180px) {
    .products-toolbar-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-group-right {
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-left: 0;
    }

    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        position: static;
    }

    .sidebar-scroll {
        max-height: 340px;
    }

    /* Artículos: reducir márgenes laterales */
    .articles-grid {
        margin: 0 4rem;
    }
}

/* --- Grid a 2 columnas --- */
@media (max-width: 1120px) {
    .products-grid,
    .products-grid--catalog {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Tablet pequeña --- */
@media (max-width: 900px) {
    .products-hero {
        padding: 40px 20px;
    }

    .products-hero h1 {
        font-size: 1.9rem;
    }

    .products-layout {
        padding: 0 16px;
        margin-top: 20px;
    }

    /* Artículos: 1 columna + margen mínimo */
    .articles-grid {
        grid-template-columns: 1fr;
        margin: 0 2rem;
        gap: 30px;
    }
}

/* --- Mobile --- */
@media (max-width: 720px) {
    .products-page {
        padding-bottom: 50px;
    }

    .products-hero {
        padding: 28px 16px;
    }

    .products-hero h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .products-hero p {
        font-size: 0.92rem;
    }

    .products-toolbar-inner {
        padding: 16px;
    }

    .toolbar-group {
        max-height: 8rem;
    }

    .toolbar-group-right
    {
        flex: none;
        margin-top:1rem;
    }

    .toolbar-field,
    .toolbar-select {
        width: 100%;
    }

    .toolbar-select {
        min-width: 0;
    }

    .filter-pills {
        width: 100%;
    }

    .filter-pill {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    .products-layout {
        padding: 0 12px;
        gap: 16px;
    }

    .sidebar-card {
        padding: 16px;
        border-radius: 14px;
    }

    .products-grid,
    .products-grid--catalog,
    .products-grid--home {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-card-img--catalog {
        height: 180px !important;
    }

    .product-card-body,
    .product-card--home .product-card-body,
    .product-card--catalog .product-card-body {
        padding-right: 18px;
        padding-left: 18px;
    }

    .product-card-footer,
    .product-card--home .product-card-footer,
    .product-card--catalog .product-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-ver-detalle {
        justify-content: center;
        padding: 11px 16px;
    }

    .pagination-container {
        margin: 36px 0;
        gap: 8px;
        flex-wrap: wrap;
        max-width: 80%
    }

    .pagination-btn {
        min-width: 40px;
        height: 40px;
        font-size: 0.88rem;
    }

    .pagination-btn-arrow {
        min-width: 0;
        padding: 0 14px;
        font-size: 0.82rem;
    }

    /* Artículos mobile */
    .articles-grid-wrapper,
    .articles-grid-home {
        padding: 3rem 16px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        margin: 0;
        gap: 24px;
    }

    .article-card-image {
        height: 180px;
    }

    .article-card-content {
        padding: 18px;
    }

    .article-card-title {
        font-size: 1.1rem;
    }

    .article-card-excerpt {
        font-size: 0.9rem;
    }
}

/* --- Mobile muy pequeño --- */
@media (max-width: 400px) {
    .products-hero h1 {
        font-size: 1.25rem;
    }

    .filter-pill {
        flex: 1 1 48%;
    }

    .tag-tipo,
    .tag-modelo {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .price-main {
        font-size: 1rem;
        white-space: normal;
    }
}

/* ========================================
   DETALLE DE ARTÍCULO (COMPLETO)
   ======================================== */

.article-detail-page {
    background: var(--blanco-principal);
}

/* HERO */
.article-detail-hero {
    padding: 60px 20px 50px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.article-detail-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;    /* Título y fecha centrados */
    text-align: center;
    position: relative;     /* Para el botón absoluto */
}

.article-detail-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.2;
    color: var(--negro-titulo);
    max-width: 75%;         /* Espacio para que no choque con el botón */
}

/* BOTÓN VOLVER (Izquierda y misma altura) */
.btn-back {
    position: absolute;
    left: 0;
    top: 12px;              /* Ajuste para nivelar con el h1 */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-back:hover {
    color: var(--azul-hover);
    transform: translateX(-3px);
}

/* META INFO (FECHA) */
.article-detail-meta {
    margin-top: 5px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-detail-meta i {
    margin-right: 6px;
}

/* IMAGEN DESTACADA */
.article-featured-image {
    width: 700px;
    height: 350px;
    margin: 40px auto 30px auto;
    overflow: hidden;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.article-featured-image:hover img {
    transform: scale(1.03);
}

/* CUERPO Y CONTENIDO */
.article-detail-content-wrapper {
    padding: 0 20px 60px;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gris-texto);
    text-align: left;
    width: 100%;
}

.article-body h2, .article-body h3 {
    color: var(--negro-titulo);
    margin-top: 30px;
}

/* FOOTER Y COMPARTIR (RECUPERADO) */
.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.share-article {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--gris-texto);
}

.share-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul-principal);
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-link:hover {
    background: var(--azul-principal);
    color: var(--blanco-principal);
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .btn-back {
        position: static;
        margin-bottom: 20px;
        align-self: flex-start;
    }

    .article-detail-hero h1 {
        max-width: 100%;
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .article-featured-image {
        width: 100%;
        height: 100%;
    }
}

/* Utilidades */
.w-full { width: 100% !important; }
.max-w-1200 { max-width: 1200px !important; }
.max-w-1000 { max-width: 1000px !important; }
.max-w-800 { max-width: 800px !important; }
.max-w-600 { max-width: 600px !important; }

.display-grid { display: grid !important; }
.display-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 !important; }
.gap-10 { gap: 10px !important; }
.gap-20 { gap: 20px !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }

.m-auto { margin-left: auto !important; margin-right: auto !important; }
.mt-10 { margin-top: 10px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-30 { margin-top: 30px !important; }
.mt-40 { margin-top: 40px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-30 { margin-bottom: 30px !important; }

.p-10 { padding: 10px !important; }
.p-20 { padding: 20px !important; }
.p-30 { padding: 30px !important; }
.p-40 { padding: 40px !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.text-sm { font-size: 0.85rem !important; }
.text-xs { font-size: 0.75rem !important; }
.text-muted { color: #64748B !important; }

.rounded-10 { border-radius: 10px !important; }
.rounded-16 { border-radius: 16px !important; }
.bg-slate-50 { background-color: #F8FAFC !important; }
.bg-slate-100 { background-color: #F1F5F9 !important; }
.border-dashed { border-style: dashed !important; }

.alert-container-top { margin: 24px auto 0; max-width: 1200px; }
.alert-list-top { margin: 0 auto 24px; max-width: 1200px; }

.premium-form-container {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.05);
    border: 1px solid #E2E8F0;
    max-width: 800px;
    margin: 0 auto;
}

.form-group-premium {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.label-premium {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1E293B;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-premium i {
    color: var(--azul-principal);
    font-size: 0.9rem;
}

.input-premium,
.select-premium,
.textarea-premium {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    color: #1E293B;
    background-color: #F8FAFC;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.input-premium:focus,
.select-premium:focus,
.textarea-premium:focus {
    outline: none;
    border-color: var(--azul-principal);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(36, 59, 90, 0.1);
    transform: translateY(-2px);
}

.input-premium::placeholder {
    color: #94A3B8;
}

.row-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.btn-premium {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--azul-principal) 0%, var(--azul-hover) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px var(--azul-ligero);
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--azul-ligero);
    filter: brightness(1.1);
}

.btn-premium:active {
    transform: translateY(-1px);
}

.btn-premium-secondary {
    padding: 14px 28px;
    background: #F1F5F9;
    color: #64748B;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-premium-secondary:hover {
    background: #E2E8F0;
    color: var(--negro-titulo);
}

.form-alert-premium {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.form-alert-success {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.form-alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.auth-premium-card {
    max-width: 450px !important;
    padding: 50px !important;
}

.checkbox-premium-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: #64748B;
}

.checkbox-premium-wrapper input {
    width: 20px;
    height: 20px;
    accent-color: var(--azul-principal);
    cursor: pointer;
}

/* Checkout */
.checkout-wrapper {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 24px 80px;
}

.checkout-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin: 0 0 30px;
    text-align: center;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

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

.checkout-sections {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.checkout-sections .premium-form-container {
    max-width: 100%;
}

.checkout-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkout-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--negro-titulo);
}

.checkout-section-title i {
    color: var(--azul-principal);
}

.checkout-saved-selector {
    display: none;
    margin-bottom: 20px;
    padding: 16px;
    background: #F1F5F9;
    border-radius: 12px;
    border: 1.5px dashed #CBD5E1;
    flex-direction: column;
    gap: 10px;
}

.checkout-saved-selector .select-premium {
    background-color: white;
}

.checkout-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-aside {
    background: white;
    padding: 28px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    border: 1px solid #E2E8F0;
}

.checkout-aside-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 16px;
    color: var(--negro-titulo);
    padding-bottom: 14px;
    border-bottom: 1px solid #F1F5F9;
}

.checkout-lineas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.checkout-linea {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: #475569;
    padding-bottom: 10px;
    border-bottom: 1px solid #F8FAFC;
}

.checkout-linea:last-child {
    border-bottom: none;
}

.checkout-linea-nombre {
    flex-grow: 1;
    line-height: 1.4;
}

.checkout-linea-nombre b {
    color: var(--azul-principal);
    font-weight: 700;
}

.checkout-linea-precio {
    font-weight: 700;
    color: var(--negro-titulo);
    white-space: nowrap;
}

.checkout-totales {
    border-top: 2px dashed #E2E8F0;
    padding-top: 14px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkout-total-row span {
    color: #64748B;
}

.checkout-total-row strong {
    font-weight: 700;
    color: var(--negro-titulo);
}

.checkout-total-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--azul-principal);
    border-top: 2px solid #E2E8F0;
    padding-top: 12px;
    margin-top: 4px;
}

.checkout-submit-btn {
    width: 100%;
    margin-top: 18px;
    padding: 15px;
    background: var(--azul-principal);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}

.checkout-submit-btn:hover {
    background: var(--azul-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--azul-ligero);
}

/* Confirmación */
.confirmacion-wrapper {
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
    text-align: center;
}

.confirmacion-card {
    background: white;
    padding: 60px 40px;
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
}

.confirmacion-icon {
    width: 100px;
    height: 100px;
    background: #DEF7EC;
    color: #0E9F6E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 30px;
}

.confirmacion-title {
    font-weight: 900;
    color: var(--negro-titulo);
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.confirmacion-desc {
    font-size: 1.2rem;
    color: #64748B;
    margin-bottom: 40px;
}

.confirmacion-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.confirmacion-btn-tienda {
    padding: 18px;
    border: 2px solid #E2E8F0;
    color: var(--gris-texto);
    border-radius: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.confirmacion-btn-tienda:hover {
    background: #F9FAFB;
}

/* Panel Admin Stats */
.portad-overlay {
    position: relative;
}

.portad-contenido {
    position: relative;
    z-index: 1;
}

.stats-mini {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.8;
    color: white;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
}

.stat-value--flex {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #10B981;
}

.panel-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.panel-card-link {
    text-decoration: none;
    color: inherit;
}

/* Detalle pedido */
.pedido-detalle-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-descargar-pdf {
    background: linear-gradient(135deg, #243B5A 0%, #1e293b 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(36, 59, 90, 0.25);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-descargar-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(36, 59, 90, 0.35);
}

.btn-descargar-pdf i {
    font-size: 1.1rem;
}

.pedido-detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.pedido-tabla-footer {
    background: #F8FAFC;
    padding: 25px;
    border-top: 2px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedido-tabla-footer-label {
    font-weight: 800;
    color: #64748B;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.pedido-tabla-footer-total {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--azul-principal);
}

.pedido-info-card {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
}

.pedido-info-card h3 {
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--negro-titulo);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pedido-info-card h3 i {
    color: var(--azul-principal);
}

.pedido-info-card-sm {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
}

.pedido-info-card-sm h3 {
    margin-bottom: 15px;
    font-weight: 800;
    color: var(--negro-titulo);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pedido-info-card-sm h3 i {
    color: var(--azul-principal);
}

.pedido-col-right {
    display: grid;
    gap: 30px;
    align-content: start;
}

.pedido-cliente-nombre {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1E293B;
}

.pedido-cliente-info {
    color: #64748B;
    font-size: 0.9rem;
    margin-top: 5px;
}

.pedido-invitado {
    font-weight: 700;
    font-size: 1.1rem;
    color: #64748B;
    font-style: italic;
}

.pedido-invitado-desc {
    color: #94A3B8;
    font-size: 0.85rem;
    margin-top: 5px;
}

.pedido-direccion-texto {
    color: #475569;
    line-height: 1.6;
}

.pedido-direccion-calle {
    font-weight: 700;
}

.pedido-direccion-provincia {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    color: #94A3B8;
    margin-top: 5px;
}

.pedido-no-dir {
    color: #94A3B8;
    font-style: italic;
}

.pedido-estado-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedido-fecha {
    font-weight: 600;
    color: #475569;
}

.pedido-fecha-sep {
    color: #94A3B8;
    margin: 0 5px;
}

.estado-badge {
    padding: 6px 15px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.estado-badge--entregado {
    background: #DEF7EC;
    color: #03543F;
}

.estado-badge--confirmado {
    background: #DEF7EC;
    color: #0095ff;
}

.estado-badge--pendiente {
    background: #DEF7EC;
    color: #e5be01;
}

.estado-badge--cancelado {
    background: #DEF7EC;
    color: #ff0000;
}

.producto-foto-preview {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #F1F5F9;
    border-radius: 10px;
}

.producto-foto-preview img {
    height: 40px;
    border-radius: 6px;
    border: 1px solid #E2E8F0;
}

.producto-foto-preview span {
    font-size: 0.85rem;
    color: #64748B;
}

.form-actions-row {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    border-top: 1px solid #F1F5F9;
    padding-top: 25px;
}

.perfil-form-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
}

.perfil-form-grid {
    display: grid;
    gap: 20px;
}

.perfil-field label {
    display: block;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.perfil-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
}

.perfil-field small {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 15px;
}

.perfil-password-section {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #F1F5F9;
}

.perfil-password-section h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--negro-titulo);
    margin-bottom: 15px;
}

.perfil-password-section p {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 15px;
}

.perfil-password-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.perfil-submit-row {
    margin-top: 30px;
}

.perfil-submit-btn {
    background: var(--azul-principal);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.perfil-submit-btn:hover {
    background: var(--azul-hover);
}

.alert-success-inline {
    background-color: #DEF7EC;
    color: #03543F;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-danger-inline {
    background-color: #FDE8E8;
    color: #9B1C1C;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-danger-inline ul {
    margin: 0;
    padding-left: 20px;
}

.td-center { text-align: center; }
.td-right { text-align: right; }
.td-price { font-weight: 700; color: var(--azul-principal); }
.td-italic-muted { color: #64748B; font-style: italic; }
.td-empty { text-align: center; padding: 40px; color: #64748B; }

.td-producto-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.td-producto-thumb {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.td-producto-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.td-producto-nombre {
    font-weight: 700;
    font-size: 0.9rem;
}

.badge-envio {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-facturacion {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #F3E8FF;
    color: #6B21A8;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #F3F4F6;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #9CA3AF;
    padding: 4px;
}

.modal-close:hover {
    color: var(--negro-titulo);
}

.modal-body {
    padding: 24px;
}

.tabla-section-header {
    padding: 20px;
    border-bottom: 1px solid #F1F5F9;
    margin: 0;
    font-weight: 800;
    color: var(--negro-titulo);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.tabla-section-header i {
    color: var(--azul-principal);
}

.estado-texto {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.panel-card-icon {
    font-size: 2.5rem;
    color: var(--azul-principal);
    margin-bottom: 20px;
}

.panel-card-title {
    margin-bottom: 10px;
    font-weight: 800;
    color: var(--negro-titulo);
}

.panel-card-desc {
    color: #64748B;
    font-size: 0.9rem;
    line-height: 1.5;
}

.direcciones-form {
    max-width: 600px;
    margin-top: 40px;
    border-style: dashed;
    background: #F8FAFC;
}

.direcciones-form-title {
    margin-bottom: 25px;
    font-weight: 800;
    color: var(--negro-titulo);
    display: flex;
    align-items: center;
    gap: 10px;
}

.direcciones-form-title i {
    color: var(--azul-principal);
}

.btn-premium--full {
    width: 100%;
    margin-top: 10px;
}

/* Artículos Form */
.articulos-form-container {
    max-width: 1000px;
}

.articulos-form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 10px;
}

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

.articulos-form-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.articulos-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.articulos-imagen-wrap {
    background: #F8FAFC;
    padding: 20px;
    border-radius: 16px;
    border: 1.5px dashed #E2E8F0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.articulos-imagen-preview img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    box-shadow: var(--shadow-sm);
    margin-top: 6px;
}

.quill-editor-wrap {
    min-height: 300px;
    background: white;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.input-file {
    padding: 10px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
}

.form-hint {
    font-size: 0.78rem;
    color: #94A3B8;
    line-height: 1.4;
    display: block;
}

/* Quill overrides */
.ql-toolbar.ql-snow {
    border: 1.5px solid #E2E8F0;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    background-color: #F8FAFC;
    padding: 10px;
}

.ql-container.ql-snow {
    border: 1.5px solid #E2E8F0;
    border-top: none;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    font-family: var(--fuente-principal);
    font-size: 0.95rem;
}

.ql-editor {
    min-height: 280px;
}

.ql-editor.ql-blank::before {
    color: #94A3B8;
    font-style: normal;
}

/* Direcciones CRUD */
.direcciones-crud-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .direcciones-crud-grid {
        grid-template-columns: 1fr;
    }
}

.direcciones-crud-form {
    position: sticky;
    top: 100px;
}

.checkout-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ========================================
   Cookies Page
   ======================================== */
.cookie-type-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cookie-type-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 18px 20px;
    background-color: var(--gris-fondo);
    border-radius: 14px;
    border: 1px solid #E5E7EB;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-type-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cookie-type-icon {
    width: 42px;
    height: 42px;
    background-color: var(--azul-ligero);
    color: var(--azul-principal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cookie-type-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cookie-type-text strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--negro-titulo);
}

.cookie-type-text p {
    margin: 0;
    color: var(--gris-texto);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-browser-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.cookie-browser-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background-color: var(--gris-fondo);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    color: var(--gris-texto);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.cookie-browser-link i {
    font-size: 1.2rem;
    color: var(--azul-principal);
}

.cookie-browser-link:hover {
    background-color: var(--azul-ligero);
    color: var(--azul-principal);
    border-color: var(--azul-principal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
    .cookie-browser-grid {
        grid-template-columns: 1fr;
    }

    .cookie-type-item {
        flex-direction: column;
        gap: 12px;
    }
}

/* ========================================
   FAQ Page
   ======================================== */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background-color: var(--blanco-principal);
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item--open {
    border-color: var(--azul-principal);
    box-shadow: var(--shadow-md);
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--fuente-principal);
    font-size: 1rem;
    font-weight: 700;
    color: var(--negro-titulo);
    transition: background-color 0.2s ease;
}

.faq-trigger:hover {
    background-color: var(--gris-fondo);
}

.faq-item--open .faq-trigger {
    background-color: var(--azul-ligero);
    color: var(--azul-principal);
}

.faq-trigger-icon {
    width: 38px;
    height: 38px;
    background-color: var(--azul-ligero);
    color: var(--azul-principal);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.faq-item--open .faq-trigger-icon {
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
}

.faq-trigger-text {
    flex: 1;
}

.faq-chevron {
    font-size: 0.85rem;
    color: var(--gris-texto);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item--open .faq-chevron {
    transform: rotate(180deg);
    color: var(--azul-principal);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px 0 78px;
    transition: max-height 0.75s ease, padding 0.75s ease;
}

.faq-item--open .faq-body {
    margin-top: 10px;
    padding: 0 24px 24px 78px;
}

.faq-text {
    color: var(--gris-texto);
    line-height: 1.75;
    font-size: 0.97rem;
    margin: 0;
}

.faq-list {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-list li {
    position: relative;
    padding-left: 18px;
    color: var(--gris-texto);
    font-size: 0.97rem;
    line-height: 1.6;
}

.faq-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--azul-principal);
    flex-shrink: 0;
}

.faq-list--ordered {
    list-style: none;
    counter-reset: faq-counter;
}

.faq-list--ordered li {
    counter-increment: faq-counter;
    padding-left: 32px;
}

.faq-list--ordered li::before {
    content: counter(faq-counter);
    width: 22px;
    height: 22px;
    top: 0;
    border-radius: 50%;
    background-color: var(--azul-principal);
    color: var(--blanco-principal);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-cta {
    margin-top: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.faq-cta p {
    color: var(--gris-texto);
    font-size: 1rem;
    margin: 0;
}

@media (max-width: 640px) {
    .faq-trigger {
        padding: 16px 18px;
        gap: 12px;
    }

    .faq-body {
        padding: 0 18px 20px 18px;
    }

    .faq-trigger-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Detalle de pedido - Base imponible */
.pedido-total-info {
    font-size: 0.8rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-right: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.pedido-total-info i {
    color: #243B5A;
    font-size: 0.9rem;
}

.pedido-tabla-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    background: #fff;
    border-top: 2px solid #f1f1f1;
}

/* ========================================
   Responsive User Panel
   ======================================== */
@media (max-width: 768px) {
    /* Hide desktop vertical menu, handled by toggle button */
    .contenedor-menu-vertical {
        display: none;
    }

    .panel-crud {
        flex-direction: column;
    }


    .portadPanelAdm h1 {
        font-size: 1.8rem;
    }

    .panel-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-mini {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .stat-item {
        justify-content: space-between;
    }

    .contenedor-tabla {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .admin-table {
        min-width: 600px;
    }

    .row-premium {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }

    .premium-form-container, .perfil-form-card {
        padding: 20px;
        margin: 0 10px;
        border-radius: 16px;
        gap:5px;
    }

    .div-lista-direcciones-user {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .perfil-password-grid {
        grid-template-columns: 1fr;
    }

    .form-group-premium {
        margin-bottom: 10px;
    }

    .checkout-row-2 {
        margin-bottom: 10px;
    }
}

/* Modal cancelar */
/* SweetAlert custom buttons */
.swal-confirm-btn {
    background: red;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    margin-left: 10px;
    cursor: pointer;
}

.swal-cancel-btn {
    background: #ddd;
    color: #333;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.btns-header {
    display: flex;
    flex-direction: row;
}
