/* public/css/styles.css */

:root {
    --primary-blue: #1e3a8a;
    --primary-red: #dc2626;
    --primary-gradient: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-red) 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Segment Switcher */
.segment-switcher {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    width: fit-content;
    border: 1px solid var(--gray-200);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.segment-tab {
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-500);
    border: 1px solid transparent;
}

.segment-tab i {
    font-size: 1.2rem;
}

.segment-tab:hover {
    color: var(--primary-blue);
    background: white;
}

.segment-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.3);
}

.segment-tab.active i {
    animation: bounce 0.5s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header.scrolled {
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.98);
}

.navbar {
    padding: 0;
    background: transparent;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 850;
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

.logo-icon {
    width: clamp(45px, 10vw, 55px);
    height: clamp(45px, 10vw, 55px);
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: clamp(20px, 4vw, 24px);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.2);
}

.logo-img {
    max-height: clamp(55px, 12vw, 75px);
    width: auto;
    object-fit: contain;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    letter-spacing: 0.2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Ofertas special nav link */
.nav-link--ofertas {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-red) !important;
    font-weight: 700;
    position: relative;
}
.nav-link--ofertas i { color: var(--primary-red); }
.nav-link--ofertas::after { background: var(--primary-red) !important; }

.nav-ofertas-badge {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    animation: badgePulse 2s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.75; transform: scale(0.92); }
}

/* Mega Menu Dropdown Styles */
.dropdown-nav {
    position: relative;
}

.dropdown-menu-mega {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(25px) scale(0.97);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 25px 60px -10px rgba(30, 58, 138, 0.25);
    border-radius: 18px;
    padding: 35px;
    display: flex;
    gap: 45px;
    min-width: 780px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.6);
    background-image: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(243, 244, 246, 0.9) 100%);
    z-index: 1000;
}

.dropdown-menu-mega::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-gradient);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.dropdown-nav:hover .dropdown-menu-mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.mega-column {
    flex: 1;
}

.mega-title {
    font-size: 1.15rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.mega-title i {
    color: white;
    background: var(--primary-gradient);
    padding: 8px;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.mega-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mega-list li a {
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
}

.mega-list li a i {
    color: var(--primary-red);
    font-size: 1.15rem;
    transition: var(--transition);
    opacity: 0.8;
    width: 25px;
    text-align: center;
}

.mega-list li a:hover {
    color: var(--primary-blue);
    background: white;
    border: 1px solid rgba(30, 58, 138, 0.1);
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.mega-list li a:hover i {
    opacity: 1;
    transform: scale(1.15) rotate(-5deg);
    color: var(--primary-blue);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--gray-700);
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

/* Botón cerrar menú móvil: oculto en desktop */
.close-mobile-menu {
    display: none;
}

/* Category Badge in Product Card */
.product-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(30, 58, 138, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 550px;
    background: #0f172a;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0.8) 100%),
        radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 950px;
    padding: 0 2rem;
    animation: heroSlideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-content h1 {
    font-size: clamp(2.8rem, 10vw, 5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    line-height: 1;
    letter-spacing: -2px;
}

.carousel-content p {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 3rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0.9;
    font-weight: 500;
}

.btn-hero {
    padding: 18px 45px;
    font-size: 1.1rem;
    border-radius: 40px;
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.4);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 10;
    pointer-events: none;
}

.carousel-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: white;
    color: var(--primary-blue);
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-dots {
    position: absolute;
    bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot.active {
    background: white;
    transform: scale(1.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Search Section */
.search-section {
    background: var(--primary-gradient);
    padding: 8rem 0;
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Creatividad: Fondo Animado */
.search-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 20% 30%, rgba(30, 58, 138, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(220, 38, 38, 0.4) 0%, transparent 40%);
    z-index: -1;
    animation: backgroundFloat 15s ease-in-out infinite alternate;
}

@keyframes backgroundFloat {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(5deg) scale(1.1);
    }
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    animation: contentFadeUp 1s ease-out;
}

@keyframes contentFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    line-height: 1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-subtitle {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    margin-bottom: 4rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Creatividad: Search Box Stylizado */
.search-box {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 40px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-box:focus-within {
    transform: translateY(-5px) scale(1.01);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.5);
}

.search-input {
    flex: 1;
    padding: 18px 30px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--gray-900);
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input::placeholder {
    color: var(--gray-500);
}

.search-btn {
    padding: 0 40px;
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: scale(1.05);
}

.search-btn i {
    font-size: 1.2rem;
}

/* Categories */
.categories-section {
    padding: 3rem 0;
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--gray-900);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 100%);
    color: white;
    transform: rotate(10deg) scale(1.08);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.35);
}

.category-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-description {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Products */
.products-section {
    padding: 2rem 0 3rem;
    background: var(--gray-50);
}

/* Buscador compacto dentro de sección de productos */
.products-search-bar {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    background: white;
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.3s ease;
}

.products-search-bar:focus-within {
    box-shadow: 0 6px 25px rgba(30, 58, 138, 0.15);
    border-color: var(--primary-blue);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 220px;
    /* Altura controlada */
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--gray-100);
    position: relative;
    padding: 5px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-brand,
.product-sku {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.product-part-number {
    background: var(--primary-blue);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-family: monospace;
}

.product-status {
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

.product-description {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    flex: 1;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Map Section */
.map-section {
    padding: 6rem 0;
    background: white;
    margin-bottom: 2rem;
}

.map-container {
    width: 100%;
    margin-top: 3rem;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    display: block;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p,
.footer-section a {
    color: var(--gray-300);
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1rem;
    text-align: center;
    color: var(--gray-400);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.admin-subtle-link {
    color: var(--gray-700);
    font-size: 0.8rem;
    transition: var(--transition);
    opacity: 0.5;
}

.admin-subtle-link:hover {
    color: var(--gray-400);
    opacity: 1;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex; /* cambiado para centrar el icono */
        order: 3;
        margin-left: clamp(10px, 3vw, 20px);
    }

    .navbar-content > div:last-child {
        order: 2;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .close-mobile-menu {
        display: flex;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        color: var(--gray-700);
        cursor: pointer;
        z-index: 1000;
        background: var(--gray-100);
        border-radius: 50%;
        transition: background 0.2s;
    }

    .close-mobile-menu:hover {
        background: var(--gray-200);
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        backdrop-filter: blur(2px);
        overflow: hidden;
    }

    .menu-overlay.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .nav-link {
        font-size: 1.2rem;
        width: 100%;
        color: var(--gray-900);
        padding: 15px 0;
        border-bottom: 1px solid var(--gray-100);
        display: block;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        padding: 15px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 20px;
    }

    .products-search-bar {
        padding: 6px;
        border-radius: 16px;
    }

    .search-input {
        width: 100%;
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        margin-top: 5px;
        height: 50px;
    }

    .products-search-bar .search-btn {
        width: auto;
        margin-top: 0;
        height: 42px;
        padding: 8px 18px !important;
        border-radius: 10px !important;
    }

    .products-header {
        flex-direction: column;
        align-items: stretch;
    }

    .products-filters {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .hero-carousel {
        height: 60vh;
    }

    .carousel-content h1 {
        font-size: 2.5rem;
    }

    .carousel-content p {
        font-size: 1.1rem;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .navbar {
        padding: 0.8rem 0;
    }

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

    .logo span {
        display: none;
        /* Hide text logo on very small screens if PT icon is present */
    }

    .search-title {
        font-size: 1.5rem;
    }

    /* Ocultar la palabra "Ingresar" o nombre de usuario en teléfonos chicos, dejando solo el icono */
    .login-link span,
    .user-menu-nav span {
        display: none !important;
    }

    .login-link i,
    .user-menu-nav i {
        font-size: 1.5rem;
    }
}

/* Cart & Modals Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.cart-modal-container,
.checkout-modal-container {
    background: white;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden; /* Previene que el border-radius se rompa */
}

.checkout-modal-container {
    max-width: 650px;
}

.cart-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* El header no se encoge */
}

.cart-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
}

/* El form debe ser flex column para que checkout-body pueda crecer */
#profile-form,
#checkout-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.cart-body,
.checkout-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Necesario para que overflow-y funcione en flex items */
}

.cart-footer {
    flex-shrink: 0; /* El footer no se encoge */
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-50);
    align-items: center;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    background: var(--gray-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: var(--gray-900);
}

.cart-item-info .sku {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 5px;
}

.cart-item-info .price {
    font-weight: 700;
    color: var(--primary-red);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
}

.quantity-control span {
    width: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.remove-btn {
    border: none;
    background: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-footer {
    padding: 20px 25px;
    background: var(--gray-50);
    border-radius: 0 0 20px 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.btn-block {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-box {
    background: var(--gray-50);
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.empty-cart-msg {
    text-align: center;
    padding: 40px 0;
    color: var(--gray-500);
}

.empty-cart-msg i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    z-index: 3000;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 5px solid var(--success);
}

.toast-error {
    border-left: 5px solid #ef4444;
}

.toast-info {
    border-left: 5px solid var(--primary-blue);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .cart-modal-container,
    .checkout-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* User Dropdown */
.nav-right-actions {
    display: flex;
    align-items: center;
}

.user-menu-nav {
    position: relative;
    padding-bottom: 5px;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 10px 0;
    z-index: 1000;
    margin-top: 10px;
    border: 1px solid var(--gray-100);
    animation: fadeInSlide 0.3s ease;
}

.user-dropdown-content.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 10px 20px;
    border-bottom: 1px solid var(--gray-50);
    margin-bottom: 5px;
}

.dropdown-header strong {
    color: var(--gray-900);
    font-size: 14px;
    display: block;
}

.dropdown-header small {
    color: var(--gray-500);
    font-size: 11px;
    display: block;
}

.user-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 14px;
    transition: all 0.2s;
}

.user-dropdown-content a:hover {
    background: var(--gray-50);
    color: var(--primary-blue);
}

.user-dropdown-content a i {
    width: 18px;
    color: var(--primary-blue);
    font-size: 16px;
}

.user-dropdown-content hr {
    border: 0;
    border-top: 1px solid var(--gray-100);
    margin: 5px 0;
}

.login-link {
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.login-link:hover {
    background: var(--gray-50);
    color: var(--primary-blue) !important;
}

/* Payment Methods Styles */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.payment-option {
    border: 2px solid var(--gray-100);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.payment-option i {
    font-size: 24px;
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.payment-option span {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.payment-option:hover {
    border-color: var(--primary-blue);
    background: var(--gray-50);
}

.payment-option.active {
    border-color: var(--primary-blue);
    background: rgba(30, 58, 138, 0.05);
}

.payment-option.active i {
    color: var(--primary-blue);
    transform: scale(1.1);
}

.payment-option.active span {
    color: var(--primary-blue);
}

/* ═══════════════════════════════════════
   SECTION: Promo Cards (Light, Cohesive)
════════════════════════════════════════ */
.promo-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.3s ease;
    position: relative;
}
.promo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

/* Colored top ribbon */
.promo-ribbon {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: white;
}
.promo-ribbon--blue {
    background: linear-gradient(90deg, var(--primary-blue), #2563eb);
}
.promo-ribbon--red {
    background: linear-gradient(90deg, var(--primary-red), #ef4444);
}

/* Product image area */
.promo-image {
    width: 100%;
    height: 170px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.promo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Body */
.promo-body {
    padding: 1.2rem 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.promo-components {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.promo-components i { color: var(--primary-blue); }
.promo-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}
.promo-desc {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 0.7rem;
    line-height: 1.5;
}

/* Pricing row */
.promo-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.promo-old {
    text-decoration: line-through;
    color: var(--gray-500);
    font-size: 0.9rem;
}
.promo-price {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}
.promo-price--blue { color: var(--primary-blue); }
.promo-price--red  { color: var(--primary-red); }
.promo-pct {
    background: rgba(30,58,138,0.1);
    color: var(--primary-blue);
    border-radius: 50px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}
.promo-savings {
    font-size: 0.82rem;
    color: #059669;
    margin-bottom: 0.8rem;
}

/* CTA button */
.promo-btn {
    margin-top: auto;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}
.promo-btn--blue {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(30,58,138,0.3);
}
.promo-btn--blue:hover {
    background: #1d4ed8;
    box-shadow: 0 8px 20px rgba(30,58,138,0.4);
    transform: translateY(-1px);
}
.promo-btn--red {
    background: var(--primary-red);
    color: white;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3);
}
.promo-btn--red:hover {
    background: #b91c1c;
    box-shadow: 0 8px 20px rgba(220,38,38,0.4);
    transform: translateY(-1px);
}

/* Card accent border on hover */
.promo-card--kit:hover { border-color: rgba(30,58,138,0.3); }
.promo-card--offer:hover { border-color: rgba(220,38,38,0.3); }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
/* Kit cards - glassmorphism dark */
.kit-card-dark {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 1.8rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s ease, border-color 0.3s ease;
}
.kit-card-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139,92,246,0.12) 0%, rgba(30,58,138,0.08) 100%);
    border-radius: 20px;
    z-index: 0;
}
.kit-card-dark > * { position: relative; z-index: 1; }
.kit-card-dark:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(139,92,246,0.5);
    box-shadow: 0 25px 50px rgba(139,92,246,0.2), 0 0 0 1px rgba(139,92,246,0.15);
}
.kit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(124,58,237,0.4);
}
.kit-price-old {
    text-decoration: line-through;
    color: rgba(255,255,255,0.35);
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.kit-price-new {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.btn-kit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(124,58,237,0.35);
    margin-top: 1rem;
}
.btn-kit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(124,58,237,0.5);
    background: linear-gradient(135deg, #6d28d9, #4338ca);
}
/* Offer cards - dark red glow */
.offer-card-dark {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 20px;
    padding: 1.8rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s ease, border-color 0.3s ease;
}
.offer-card-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220,38,38,0.1) 0%, rgba(15,23,42,0.05) 100%);
    border-radius: 20px;
    z-index: 0;
}
.offer-card-dark > * { position: relative; z-index: 1; }
.offer-card-dark:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(248,113,113,0.6);
    box-shadow: 0 25px 50px rgba(220,38,38,0.2), 0 0 0 1px rgba(220,38,38,0.15);
}
.offer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(220,38,38,0.4);
}
.offer-price-new {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f87171, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.btn-offer {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(220,38,38,0.35);
    margin-top: 1rem;
}
.btn-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(220,38,38,0.5);
    background: linear-gradient(135deg, #b91c1c, #991b1b);
}
.dark-card-image {
    width: 100%;
    height: 155px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.2);
    overflow: hidden;
}
.dark-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.dark-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}
.dark-card-meta {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.savings-chip {
    display: inline-block;
    background: rgba(16,185,129,0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 50px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 6px;
}
.price-old-dark {
    text-decoration: line-through;
    color: rgba(255,255,255,0.35);
    font-size: 0.9rem;
    margin-bottom: 2px;
}