/* =================================================================== */
/* ==                     ESTILOS COMPLETOS BEST DENT                  == */
/* =================================================================== */

/* --- VARIABLES DE COLOR --- */
:root {
    --color-primario: #5395E9;
    --color-primario-oscuro: #3a78bf;
    --color-secundario: #FF7C6F;
    --color-acento: #A8E6CF;
    --color-fondo: #F5F5F5;
    --color-blanco: #FFFFFF;
    --color-texto: #2f3a4a;
    --color-texto-claro: #6f7a86;
    --color-primario-light: #6ea9ea;
    --sombra-suave: 0 4px 14px rgba(74, 144, 226, 0.12);
    --sombra-fuerte: 0 12px 28px rgba(74, 144, 226, 0.2);
    --radio-borde: 12px;
    --transicion: all 0.3s ease;
}

/* --- ESTILOS GENERALES Y RESET BÁSICO --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', 'Roboto', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =================================================================== */
/* ==                         HEADER Y NAVEGACIÓN                        == */
/* =================================================================== */

.main-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-texto);
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 10px;
    display: block;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primario);
}

/* Botón Hamburguesa (Móvil) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-texto);
    border-radius: 2px;
}

/* Navegación de Escritorio */
.desktop-nav-items {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    background-color: #f9f9f9;
}

.search-bar input {
    border: none;
    outline: none;
    padding: 5px;
    background: transparent;
    font-size: 14px;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primario);
    padding: 5px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-texto);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primario);
}

.cart-icon-container {
    position: relative;
    cursor: pointer;
}

.cart-icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--color-texto);
    stroke-width: 1.5;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--color-secundario);
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-button {
    background-color: var(--color-primario);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--color-primario-oscuro);
}

/* --- MENÚ MÓVIL --- */
.mobile-nav-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav-container.active {
    right: 0;
}

.mobile-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-texto);
}

.mobile-nav-container nav ul {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.mobile-nav-container .nav-link {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: var(--color-texto);
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.mobile-nav-container .nav-link:hover {
    color: var(--color-primario);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 768px) {
    .desktop-nav-items {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
}

/* =================================================================== */
/* ==                         CONTENIDO PRINCIPAL                        == */
/* =================================================================== */

main {
    min-height: 60vh;
}

/* --- SECCIÓN HERO --- */
.hero-section {
    background: linear-gradient(135deg, #4A90E2 0%, #6ea9ea 55%, #A8E6CF 100%);
    padding: 90px 0;
    color: white;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.hero-content-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: center;
}

.hero-texto {
    text-align: left;
}

.hero-media {
    display: flex;
    justify-content: center;
}

.hero-media img {
    width: 320px;
    max-width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 24px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 14px 30px rgba(47, 58, 74, 0.22);
}

.cta-button-large {
    display: inline-block;
    background-color: var(--color-secundario);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s, transform 0.2s ease;
}

.cta-button-large:hover {
    background-color: #ea6e5a;
    transform: translateY(-2px);
}

/* =================================================================== */
/* ==                     SECCIÓN DE CATEGORÍAS                           == */
/* =================================================================== */

.categories-section {
    padding: 60px 0;
}

.categories-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-texto);
    margin-bottom: 30px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: var(--color-blanco);
    border-radius: var(--radio-borde);
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-fuerte);
}

.category-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Ajuste independiente por categoría */
.categoria-equipos img {
    height: 321px;
    object-fit: cover;
    object-position: center;
}

.categoria-instrumental img {
    height: 376px;
    object-fit: cover;
    object-position: center;
}

.categoria-materiales img {
    height: 314px;
    object-fit: cover;
    object-position: center;
}

.categoria-higiene img {
    height: 358px;
    object-fit: cover;
    object-position: center;
}

.category-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-texto);
    margin: 15px;
}

.category-card p {
    font-size: 14px;
    color: var(--color-texto-claro);
    margin: 0 15px 15px;
    line-height: 1.5;
}

/* =================================================================== */
/* ==                 SECCIÓN DE PRODUCTOS DESTACADOS                    == */
/* =================================================================== */

.featured-products {
    padding: 60px 0;
    background: linear-gradient(135deg, #0066cc 0%, #0a7be0 55%, #8fd6ff 100%);
}

.featured-products h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--color-blanco);
    border-radius: var(--radio-borde);
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-fuerte);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--color-secundario);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Ajuste independiente por producto destacado */
.destacado-autoclave img {
    height: 300px;
    object-fit: cover;
    object-position: center;
}

.destacado-instrumental img {
    height: 300px;
    object-fit: cover;
    object-position: center;
}

.destacado-resina img {
    height: 300px;
    object-fit: cover;
    object-position: center;
}

.destacado-turbina img {
    height: 300px;
    object-fit: cover;
    object-position: center;
}

.destacado-cemento img {
    height: 300px;
    object-fit: cover;
    object-position: center;
}

.destacado-fresa img {
    height: 300px;
    object-fit: cover;
    object-position: center;
}

.product-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-texto);
    margin: 15px 15px 5px;
    line-height: 1.4;
}

.product-card > p {
    font-size: 14px;
    color: var(--color-texto-claro);
    margin: 0 15px 10px;
}

.product-card .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-texto);
    margin: 0 15px 5px;
}

.product-card .stock-status {
    display: inline-block;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 0 15px 10px;
}

.product-card .stock-status.in-stock {
    background-color: #d4edda;
    color: #155724;
}

.product-card .stock-status.limited-stock {
    background-color: #fff3cd;
    color: #856404;
}

.product-card .add-to-cart-btn {
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 12px;
    background-color: var(--color-primario);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.product-card .add-to-cart-btn:hover {
    background-color: var(--color-primario-oscuro);
}

/* =================================================================== */
/* ==                     SECCIÓN SOBRE NOSOTROS                         == */
/* =================================================================== */

.about-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-texto);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 16px;
    color: var(--color-texto-claro);
    margin-bottom: 15px;
    line-height: 1.6;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: var(--radio-borde);
}

/* =================================================================== */
/* ==                     SECCIÓN DE MARCAS                             == */
/* =================================================================== */

.brands-section {
    padding: 64px 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.18), transparent 32%),
        radial-gradient(circle at 88% 74%, rgba(255, 255, 255, 0.14), transparent 36%),
        linear-gradient(135deg, #065eb8 0%, #0b7cda 56%, #7bc4f0 100%);
}

.brands-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Carrusel de marcas */
.brands-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brands-viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 18px;
    padding: 8px 2px;
}

.brands-track {
    display: flex;
    transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.brand-slide {
    min-width: 25%;
    padding: 12px;
    box-sizing: border-box;
}

.brand-card {
    background: linear-gradient(155deg, rgba(6, 80, 142, 0.32), rgba(10, 108, 186, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    height: 126px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 26px rgba(8, 35, 68, 0.2);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    backdrop-filter: blur(2px);
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(8, 35, 68, 0.24);
}

.brand-card img {
    max-width: 80%;
    max-height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
    opacity: 1;
}

.brand-card .brand-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-texto);
}

.brands-nav {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #0a66c2;
    box-shadow: 0 8px 18px rgba(8, 35, 68, 0.22);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.brands-nav:hover {
    transform: scale(1.06);
    background: #eef6ff;
}

.brands-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.brands-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.brands-dot.active {
    background: #ffffff;
    transform: scale(1.2);
}

/* =================================================================== */
/* ==                     FOOTER PRINCIPAL                             == */
/* =================================================================== */

.main-footer {
    background: linear-gradient(135deg, #3d81d1 0%, #4A90E2 100%);
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info h3, .footer-links h4, .footer-social h4 {
    margin-bottom: 15px;
    color: var(--color-primario-light);
}

.footer-info p, .footer-links ul li, .footer-social .social-icons a {
    color: #ccc;
    margin-bottom: 8px;
    text-decoration: none;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--color-primario-light);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    font-size: 20px;
    color: #ccc;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--color-primario-light);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.25);
    color: #eaf3ff;
    font-size: 14px;
}

/* =================================================================== */
/* ==                 BOTÓN FLOTANTE DE WHATSAPP                        == */
/* =================================================================== */

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #006A00;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 999;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

.wa-icon {
    font-size: 40px;
    color: #ffffff;
    line-height: 1;
    display: block;
}

/* Quita subrayado/línea del enlace del botón flotante */
a.whatsapp-float,
a.whatsapp-float:hover,
a.whatsapp-float:focus,
a.whatsapp-float:active,
a.whatsapp-float:visited {
    text-decoration: none !important;
}

/* =================================================================== */
/* ==                     LOADER GLOBAL                                == */
/* =================================================================== */

.loader-global {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.loader-global.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-global .loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loader-global .loader-logo {
    width: 120px;
    max-width: 40vw;
    animation: loaderPulse 1.2s ease-in-out infinite;
}

.loader-global .loader-texto {
    font-weight: 700;
    color: #0078d4;
    font-size: 14px;
}

@keyframes loaderPulse {
    0% { transform: scale(0.95); opacity: 0.75; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.75; }
}

/* =================================================================== */
/* ==                     CARRITO LATERAL                              == */
/* =================================================================== */

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: right 0.3s ease;
    overflow: hidden;
}

.cart-sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    background-color: #4a90e2;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cart-item {
    display: grid;
    grid-template-columns: 60px minmax(140px, 1fr) auto;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
    position: relative;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 60px;
}

.item-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding-right: 8px;
}

.item-details h4 {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    color: #1f2a44;
    margin: 0;
    text-transform: none;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: manual;
    max-width: 100%;
}

.item-details .item-price {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1f2a44;
    line-height: 1.2;
    margin: 0 0 6px 0;
}

.item-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-right: 0;
    align-self: center;
}

.item-quantity span {
    min-width: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1f2a44;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #dfe5ef;
    background: #fff;
    color: #1f2a44;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #f3f7ff;
    border-color: #bfd2ee;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.checkout-button {
    display: block;
    width: 100%;
    background-color: var(--color-primario);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.checkout-button:hover {
    background-color: var(--color-primario-oscuro);
}

/* =================================================================== */
/* ==                     NOTIFICACIONES                                == */
/* =================================================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification.info {
    background-color: #17a2b8;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
}


/* =================================================================== */
/* ==                     DISEÑO RESPONSIVE                             == */
/* =================================================================== */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-content-split {
        display: flex;
        flex-direction: column;
        gap: 24px;
        text-align: center;
        align-items: center;
    }

    .hero-texto {
        text-align: center;
    }

    .hero-media img {
        width: 190px;
        height: 190px;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-text, .about-image {
        flex: 1;
        width: 100%;
    }
    
    .brand-slide {
        min-width: 50%;
    }

    .brands-nav {
        width: 38px;
        height: 38px;
    }
    
    .products-grid, .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-products h2, .categories-section h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .social-icons {
        justify-content: center;
    }

    .brand-slide {
        min-width: 100%;
    }

    .brand-card {
        height: 108px;
    }

    .brands-carousel {
        gap: 8px;
    }
}

/* =================================================================== */
/* ==            CARRITO FLOTANTE MÓVIL (TIPO BURBUJA)                == */
/* =================================================================== */

@media (max-width: 991px) {
    /* Burbuja de carrito móvil (index + productos) */
    #cart-toggle-mobile {
        position: fixed;
        right: 20px;
        bottom: 164px; /* Encima del botón de filtros y WhatsApp */
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        margin: 0 !important;
        border: 0;
        background: linear-gradient(135deg, #0078d4, #005fa8);
        color: #ffffff !important;
        text-decoration: none;
        box-shadow: 0 6px 20px rgba(0, 120, 212, 0.38);
        z-index: 1003;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    #cart-toggle-mobile:hover,
    #cart-toggle-mobile:focus {
        transform: scale(1.08);
        box-shadow: 0 10px 24px rgba(0, 120, 212, 0.48);
    }

    /* Normaliza ícono FA o SVG dentro de la burbuja */
    #cart-toggle-mobile i,
    #cart-toggle-mobile svg,
    #cart-toggle-mobile .cart-icon {
        width: 24px !important;
        height: 24px !important;
        font-size: 22px !important;
        line-height: 1 !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #cart-toggle-mobile svg,
    #cart-toggle-mobile .cart-icon {
        stroke: #ffffff;
    }

    /* Badge más redondo y centrado (igual que productos) */
    #cart-toggle-mobile .cart-count {
        position: absolute !important;
        top: -6px !important;
        right: -6px !important;
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        border-radius: 999px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        background: #ff6600 !important;
        color: #fff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
        transform: none !important;
    }

    /* Evita que el contenedor del menú móvil deforme la burbuja */
    .mobile-nav-container .cart-icon-container {
        position: static;
    }

    .mobile-nav-container #cart-toggle-mobile {
        position: fixed;
    }

    /* Orden visual de burbujas para no solaparse */
    .btn-filtros-flotante {
        right: 20px;
        bottom: 92px;
        z-index: 1002;
    }

    .whatsapp-float {
        right: 20px;
        bottom: 20px;
        z-index: 1001;
    }

    /* Corrección scroll del carrito en móvil/tablet */
    .cart-sidebar {
        width: min(92vw, 360px);
        max-width: 92vw;
        height: 100dvh;
        overflow: hidden;
    }

    .cart-sidebar-content {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }

    .cart-items {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 24px;
    }

    .cart-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
    }
}

@media (max-width: 480px) {
    #cart-toggle-mobile {
        width: 56px;
        height: 56px;
        bottom: 156px;
        right: 16px;
    }

    #cart-toggle-mobile i {
        font-size: 20px !important;
    }

    #cart-toggle-mobile .cart-count {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        font-size: 11px !important;
        top: -5px !important;
        right: -5px !important;
    }

    .btn-filtros-flotante {
        right: 16px;
        bottom: 88px;
        width: 56px;
        height: 56px;
    }

    .whatsapp-float {
        right: 16px;
        bottom: 20px;
        width: 56px;
        height: 56px;
    }
}

/* ===== PARIDAD TOTAL CARRITO (PC + TABLET + MÓVIL) ===== */
/* Carrito desktop/tablet (mismo look que productos.php) */
#cart-toggle,
#cart-toggle-mobile {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none;
    line-height: 1;
    overflow: visible !important;
}

#cart-toggle .cart-icon,
#cart-toggle svg,
#cart-toggle-mobile .cart-icon,
#cart-toggle-mobile svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    vertical-align: middle !important;
    overflow: visible !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

#cart-toggle .cart-count,
#cart-toggle-mobile .cart-count {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    background-color: #FF7C6F !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* Tablet/móvil: burbuja flotante igualada */
@media (max-width: 991px) {
    .mobile-nav-container #cart-toggle-mobile {
        position: fixed !important;
        right: 20px !important;
        bottom: 160px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        background: linear-gradient(135deg, #0078d4, #005fa8) !important;
        color: #ffffff !important;
        text-decoration: none !important;
        box-shadow: 0 6px 20px rgba(0, 120, 212, 0.38) !important;
        z-index: 1003 !important;
        overflow: visible !important;
    }

    .mobile-nav-container #cart-toggle-mobile .cart-icon,
    .mobile-nav-container #cart-toggle-mobile svg {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        stroke: #ffffff !important;
        fill: none !important;
        stroke-width: 1.7 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
    }

.mobile-nav-container #cart-toggle-mobile .cart-count {
    top: -7px !important;
    right: -7px !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ff6600 !important;
    color: #ffffff !important;
    z-index: 1004 !important;
}
}

@media (max-width: 480px) {
    .mobile-nav-container #cart-toggle-mobile {
        right: 16px !important;
        bottom: 160px !important;
        width: 60px !important;
        height: 60px !important;
    }

    .mobile-nav-container #cart-toggle-mobile .cart-icon,
    .mobile-nav-container #cart-toggle-mobile svg {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        max-width: 22px !important;
        max-height: 22px !important;
    }

.mobile-nav-container #cart-toggle-mobile .cart-count {
    top: -6px !important;
    right: -6px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ff6600 !important;
    color: #ffffff !important;
    z-index: 1004 !important;
}
}

/* ===== EFECTO SCROLL REVEAL (index tipo lapsos/spaceship) ===== */
.scroll-reveal {
    opacity: 0;
    transform: translate3d(0, 38px, 0);
    filter: blur(6px);
    transition:
        opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

.scroll-reveal.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
}

.reveal-hero {
    transition-duration: 1.05s;
}

.reveal-section {
    transition-duration: 0.95s;
}

.reveal-stagger > * {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.985);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.scroll-reveal.in-view .reveal-stagger > * {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Respeto accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal,
    .reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}

/* ===== NORMALIZACIÓN ESTÉTICA INDEX.PHP (look productos.php) ===== */

/* Header / nav */
.main-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-text {
    color: #0066cc;
    font-weight: 700;
}

.main-nav a {
    font-weight: 500;
    color: #2c3e50;
}

.main-nav a:hover,
.main-nav a.active {
    color: #0066cc;
}

.search-bar {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.search-bar input {
    color: #2c3e50;
}

.cta-button {
    background-color: #0066cc;
    border-radius: 8px;
    font-weight: 700;
}

.cta-button:hover {
    background-color: #004499;
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, #0066cc 0%, #0a7be0 55%, #8fd6ff 100%);
    padding: 84px 0;
}

.hero-section h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-section p {
    color: rgba(255, 255, 255, 0.95);
    max-width: 640px;
}

.hero-media img {
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
    background: #ffffff;
}

/* Cards (categorías + destacados) */
.category-card,
.product-card {
    border-radius: 14px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.category-card:hover,
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    border-color: #d9e4f5;
}

.category-card h3,
.product-card h4 {
    color: #2c3e50;
}

.category-card p,
.product-card > p {
    color: #7f8c8d;
}

.product-card .price {
    color: #2c3e50;
    font-weight: 700;
}

.product-card .add-to-cart-btn {
    background-color: #0066cc;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-card .add-to-cart-btn:hover {
    background-color: #004499;
}

/* Secciones */
.categories-section,
.featured-products,
.about-section,
.brands-section {
    padding-top: 56px;
    padding-bottom: 56px;
}

.categories-section h2,
.about-text h2 {
    color: #036bd1;
    letter-spacing: 0.2px;
}

.featured-products h2,
.brands-section h2 {
    color: #ffffff !important;
    letter-spacing: 0.2px;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, #0066cc 0%, #0a7be0 55%, #8fd6ff 100%);
    color: #ffffff;
}

.footer-info h3,
.footer-links h4,
.footer-social h4 {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.footer-info p,
.footer-links ul li a,
.footer-social .social-icons a {
    color: rgba(255, 255, 255, 0.95);
}

.footer-links ul li a:hover,
.social-icons a:hover {
    color: #cfe9ff;
}

/* Responsive fino */
@media (max-width: 768px) {
    .hero-section {
        padding: 72px 0;
    }

    .hero-media img {
        width: 210px;
        height: 210px;
    }

    .categories-section,
    .featured-products,
    .about-section,
    .brands-section {
        padding-top: 46px;
        padding-bottom: 46px;
    }

    .category-card,
    .product-card {
        border-radius: 12px;
    }

    .cta-button {
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 64px 0;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .categories-section,
    .featured-products,
    .about-section,
    .brands-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .search-bar {
        border-radius: 6px;
    }

    .cta-button {
        border-radius: 6px;
    }
}
