/* ============================================================
           RESET & BASE
           ============================================================ */
        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
        
        body, html { 
            height: 100%; 
            overflow: hidden; 
            background-color: #f3f4f5;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            color: #191c1d;
        }

        /* ============================================================
           IFRAME DE SALESFORCE (oculto hasta que cargue)
           ============================================================ */
        .salesforce-frame { 
            width: 100%; height: 100%; border: none; display: block; 
            opacity: 0; 
            transition: opacity 0.6s ease-in-out;
            position: fixed; inset: 0; z-index: 1;
        }
        .salesforce-frame.visible { opacity: 1; z-index: 10000; }

        /* ============================================================
           CONTENEDOR PRINCIPAL DEL LOADER (cubre toda la pantalla)
           ============================================================ */
        #loader-master {
            position: fixed; inset: 0;
            z-index: 9999;
            background-color: #f3f4f5;
            transition: opacity 0.5s ease-out;
        }
        #loader-master.fade-out {
            opacity: 0;
            pointer-events: none;
        }

        /* ============================================================
           FASE 1: BARRA DE PROGRESO
           ============================================================ */
        #phase1 {
            position: absolute; inset: 0;
            display: flex; flex-direction: column; 
            justify-content: center; align-items: center;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            transition: opacity 0.5s ease-out;
        }
        #phase1.hidden { opacity: 0; pointer-events: none; }

        .brand-mark {
            width: 80px; height: 80px;
            background: linear-gradient(135deg, #002446, #0a4d8c);
            border-radius: 20px;
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 24px;
            box-shadow: 0 8px 32px rgba(0, 36, 70, 0.2);
            animation: brandPulse 2s ease-in-out infinite;
        }
        @keyframes brandPulse {
            0%, 100% { box-shadow: 0 8px 32px rgba(0, 36, 70, 0.2); }
            50% { box-shadow: 0 8px 48px rgba(0, 36, 70, 0.35); }
        }
        .brand-mark span {
            font-size: 36px; font-weight: 800;
            font-family: 'Plus Jakarta Sans', sans-serif;
            letter-spacing: -2px;
        }
        .brand-mark .letter-c { color: #ffffff; }
        .brand-mark .letter-t { color: #4dabf7; margin-left: 2px; }



        .p1-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-weight: 700; font-size: 18px;
            color: #002446; margin-bottom: 8px;
        }
        .p1-subtitle {
            font-weight: 400; font-size: 13px;
            color: #64748b;
            transition: opacity 0.3s ease;
        }

        /* ============================================================
           FASE 2: RÉPLICA DEL HOME
           ============================================================ */
        #phase3 {
            position: absolute; inset: 0;
            display: flex; flex-direction: column;
            opacity: 0; pointer-events: none;
            transition: opacity 0.6s ease-in-out;
            background-color: #f3f4f5;
            overflow: hidden;
        }
        #phase3.active { opacity: 1; pointer-events: auto; }

        /* Mini header for phase 2 */
        .mini-header {
            background: #ffffff;
            padding: 16px 32px;
            display: flex; justify-content: space-between; align-items: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
            flex-shrink: 0;
        }
        .mini-header-logo {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #1A3A5F; font-size: 20px; font-weight: 700;
            letter-spacing: 1px;
        }
        .mini-header-nav {
            display: flex; gap: 28px; list-style: none;
        }
        .mini-header-nav li {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #333; font-size: 15px; font-weight: 500;
        }
        .back-btn {
            background: transparent;
            border: none;
            color: #1A3A5F;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            padding: 0;
            transition: opacity 0.3s ease;
            font-family: 'Inter', sans-serif;
        }
        .back-btn:hover {
            opacity: 0.7;
        }

        /* Carousel container */
        .carousel-section {
            flex: 1; display: flex; flex-direction: column;
            justify-content: center; align-items: center;
            padding: 32px 24px;
        }
        .carousel-title-area {
            text-align: center; margin-bottom: 32px;
        }
        .carousel-small-title {
            color: #426087; font-size: 12px; font-weight: 700;
            letter-spacing: 1px; margin-bottom: 8px;
        }
        .carousel-large-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #1A3A5F; font-size: 28px; font-weight: 800;
        }

        .carousel-track-wrapper {
            width: 100%; max-width: 900px;
            overflow: hidden; position: relative;
        }
        .carousel-track {
            display: flex; transition: transform 0.5s ease-in-out;
            cursor: grab;
        }
        .carousel-track.grabbing {
            cursor: grabbing;
        }
        .carousel-slide {
            min-width: 100%;
            display: flex; justify-content: center; align-items: center;
            padding: 0 16px;
        }

        /* Product card in carousel */
        .carousel-card {
            background: #ffffff;
            border: 1px solid #eaeaeb;
            display: flex;
            max-width: 700px; width: 100%;
            border-radius: 4px;
            overflow: hidden;
        }
        .carousel-card-img {
            width: 280px; min-height: 280px;
            background: #ffffff;
            display: flex; align-items: center; justify-content: center;
            padding: 24px; flex-shrink: 0;
        }
        .carousel-card-img img {
            max-width: 100%; max-height: 220px;
            object-fit: contain;
        }
        .carousel-card-body {
            padding: 32px;
            display: flex; flex-direction: column;
            justify-content: center; flex: 1;
        }
        .carousel-card-badge {
            display: inline-block; align-self: flex-start;
            background: #e4e2e1; color: #5f5e5e;
            padding: 4px 10px; font-size: 11px; font-weight: 600;
            letter-spacing: 0.5px; border-radius: 2px;
            margin-bottom: 12px;
        }
        .carousel-card-name {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #002446; font-size: 20px; font-weight: 700;
            margin-bottom: 8px; line-height: 1.3;
        }
        .carousel-card-desc {
            color: #73777f; font-size: 14px; line-height: 1.5;
            margin-bottom: 20px;
        }
        .carousel-card-price {
            color: #002446; font-size: 22px; font-weight: 700;
            margin-bottom: 20px;
        }
        .carousel-card-btn {
            background: #002446; color: #fff; border: none;
            padding: 10px 24px; font-size: 13px; font-weight: 700;
            border-radius: 4px; cursor: default;
            align-self: flex-start;
        }

        /* Carousel dots */
        .carousel-dots {
            display: flex; gap: 10px;
            margin-top: 24px; justify-content: center;
        }
        .carousel-dot {
            width: 10px; height: 10px;
            border-radius: 50%; background: #d1d5db;
            border: none; cursor: pointer;
            transition: background 0.3s, transform 0.3s;
        }
        .carousel-dot.active {
            background: #002446;
            transform: scale(1.2);
        }

        /* Bottom loading bar for phase 2 */
        .phase-loading-bar {
            height: 3px; width: 100%;
            background: #e5e7eb; flex-shrink: 0;
        }
        .phase-loading-bar-inner {
            height: 100%; width: 0%;
            background: linear-gradient(90deg, #002446, #1e6fbf);
            transition: width 0.5s linear;
        }

        /* ============================================================
           FASE 3: CARRUSEL DE PRODUCTOS
           ============================================================ */
        #phase2 {
            position: absolute; inset: 0;
            opacity: 0; pointer-events: none;
            transition: opacity 0.6s ease-in-out;
            overflow-y: auto; overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            background-color: #f3f4f5;
        }
        #phase2.active { opacity: 1; pointer-events: auto; }

        /* Top loading strip */
        .top-loading-strip {
            position: fixed; top: 0; left: 0; right: 0;
            height: 3px; z-index: 10001;
            background: #e5e7eb;
        }
        .top-loading-strip-inner {
            height: 100%; width: 0%;
            background: linear-gradient(90deg, #002446, #1e6fbf, #4dabf7);
            transition: width 1s linear;
        }

        /* Header replica */
        .r-header {
            background: #ffffff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            position: sticky; top: 0; z-index: 1000;
        }
        .r-header-content {
            display: flex; justify-content: space-between; align-items: center;
            padding: 15px 26px;
        }
        .r-header-logo {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #1A3A5F; font-size: 20px; font-weight: 700;
            letter-spacing: 1px;
        }
        .r-header-nav {
            display: flex; gap: 30px; list-style: none;
        }
        .r-header-nav li {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #333; font-size: 16px; font-weight: 500;
        }
        .r-header-nav li.active-nav {
            color: #1A3A5F;
            border-bottom: 2px solid #1A3A5F;
        }
        .r-header-icons {
            display: flex; gap: 20px; align-items: center;
        }
        .r-header-icons svg {
            width: 24px; height: 24px;
            stroke: #1A3A5F; fill: none;
            stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
        }

        /* Hero section replica */
        .r-hero {
            padding: 80px 24px;
            min-height: 450px;
            display: flex; align-items: center;
            background: linear-gradient(to right, #1A3A5F 10%, rgba(26, 58, 95, 0.4) 100%),
                        url('assets/hero_bg.png') center/cover no-repeat;
            background-color: #1A3A5F;
        }
        .r-hero-content {
            max-width: 800px; margin: 0 auto; width: 100%;
        }
        .r-hero-small {
            color: #d3e3ff; font-size: 12px; font-weight: 700;
            margin-bottom: 16px; letter-spacing: 1px;
        }
        .r-hero-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #ffffff; font-size: 48px; font-weight: 800;
            margin-bottom: 24px; line-height: 1.2;
        }
        .r-hero-paragraph {
            color: #abc8f5; font-size: 16px; line-height: 1.5;
            margin-bottom: 32px; max-width: 600px;
        }

        /* Search bar replica */
        .r-search-bar {
            display: flex; max-width: 560px;
            background: #ffffff; border-radius: 4px;
            overflow: hidden; margin-bottom: 24px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        }
        .r-search-input {
            flex: 1; border: none; padding: 14px 20px;
            font-family: 'Inter', sans-serif; font-size: 14px;
            color: #999; outline: none;
            min-width: 0; text-overflow: ellipsis;
        }
        .r-search-btn {
            background: #002446; color: #fff; border: none;
            padding: 14px 28px; font-size: 13px; font-weight: 700;
            cursor: default; letter-spacing: 0.5px;
            flex-shrink: 0;
        }

        /* Chips */
        .r-chips {
            display: flex; flex-wrap: wrap; gap: 12px;
        }
        .r-chip {
            background: rgba(255,255,255,0.1); color: #fff;
            padding: 6px 12px; border-radius: 4px;
            font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
        }

        /* Middle section replica */
        .r-middle {
            padding: 48px 24px;
            background: #ffffff;
        }
        .r-middle-grid {
            display: grid; grid-template-columns: 1fr 1fr;
            gap: 24px; max-width: 1200px; margin: 0 auto;
        }
        .r-middle-card {
            border-radius: 4px; overflow: hidden;
            min-height: 320px; display: flex; align-items: stretch;
        }
        .r-middle-card-content {
            padding: 48px;
            display: flex; flex-direction: column;
            justify-content: center; align-items: flex-start;
        }
        .r-left-card {
            background: linear-gradient(to right, rgba(243,244,245,0.95) 40%, rgba(243,244,245,0.5) 100%),
                        url('assets/hero_bg.png') right/cover no-repeat;
            background-color: #f3f4f5;
        }
        .r-left-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #1A3A5F; font-size: 28px; font-weight: 800;
            margin-bottom: 16px;
        }
        .r-left-para {
            color: #43474e; font-size: 14px; line-height: 1.6;
            margin-bottom: 24px;
        }
        .r-text-btn {
            background: transparent; border: none;
            color: #1A3A5F; font-weight: 700; font-size: 13px;
            display: flex; align-items: center; gap: 8px;
        }

        .r-right-card {
            background: #1A3A5F;
        }
        .r-right-card .r-middle-card-content { width: 100%; }
        .r-right-icon {
            width: 32px; height: 32px; fill: #84A4cf;
            margin-bottom: 24px;
        }
        .r-right-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #84A4cf; font-size: 24px; font-weight: 800;
            margin-bottom: 16px;
        }
        .r-right-para {
            color: #84A4cf; font-size: 13px; line-height: 1.6;
            margin-bottom: 32px;
        }
        .r-outlined-btn {
            background: transparent;
            border: 1px solid rgba(132,164,207,0.5);
            color: #84A4cf;
            padding: 10px 24px; border-radius: 2px;
            font-weight: 600; font-size: 13px;
        }

        /* Bottom / Products section replica */
        .r-bottom {
            padding: 48px 24px 80px;
            background: linear-gradient(to bottom, #ffffff, #f3f4f5);
        }
        .r-bottom-container {
            max-width: 1200px; margin: 0 auto;
        }
        .r-bottom-header {
            display: flex; justify-content: space-between;
            align-items: flex-end; margin-bottom: 32px;
        }
        .r-bottom-small {
            color: #426087; font-size: 12px; font-weight: 700;
            letter-spacing: 1px; margin-bottom: 8px;
        }
        .r-bottom-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #1A3A5F; font-size: 24px; font-weight: 800;
        }
        .r-bottom-link {
            color: #1A3A5F; font-weight: 600; font-size: 13px;
            text-decoration: underline;
        }

        /* Product cards grid */
        .r-products-grid {
            display: grid; grid-template-columns: repeat(4, 1fr);
            gap: 24px;
        }
        .r-product-card {
            background: #fcfcfc;
            border: 1px solid #eaeaeb;
            display: flex; flex-direction: column;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .r-product-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }
        .r-product-img-container {
            width: 100%; height: 200px;
            display: flex; justify-content: center; align-items: center;
            background: #fff; padding: 16px;
        }
        .r-product-img-container img {
            max-width: 100%; max-height: 100%; object-fit: contain;
        }
        .r-product-content {
            padding: 20px 16px 16px;
            display: flex; flex-direction: column; flex-grow: 1;
        }
        .r-product-badge {
            display: inline-block; align-self: flex-start;
            color: #5f5e5e; background: #e4e2e1;
            padding: 4px 8px; font-size: 11px; font-weight: 600;
            letter-spacing: 0.5px; border-radius: 2px;
            margin-bottom: 10px;
        }
        .r-product-name {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #002446; font-size: 15px; font-weight: 700;
            margin-bottom: 8px; line-height: 1.3;
        }
        .r-product-desc {
            color: #73777f; font-size: 12px; line-height: 1.4;
            margin-bottom: 16px; flex-grow: 1;
        }
        .r-product-price {
            color: #002446; font-size: 16px; font-weight: 700;
            margin-bottom: 12px;
        }
        .r-product-actions {
            display: flex; gap: 10px; align-items: center;
        }
        .r-details-btn {
            background: #002446; color: #fff; border: none;
            border-radius: 4px; padding: 8px 16px;
            font-size: 12px; font-weight: 700;
            flex-grow: 1; text-align: center;
        }
        .r-cart-btn {
            background: #eef0f2; border: none; border-radius: 4px;
            width: 36px; height: 36px;
            display: flex; justify-content: center; align-items: center;
        }
        .r-cart-btn svg {
            width: 18px; height: 18px; fill: #002446;
        }

        /* Footer replica */
        .r-footer {
            background: #eef1f6;
            padding: 40px 20px;
        }
        .r-footer-content {
            margin: 0 20px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 40px;
        }
        .r-footer-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #1A3A5F; font-size: 14px; font-weight: 700;
            margin-bottom: 16px;
        }
        .r-footer-text {
            color: #76777b; font-size: 14px; line-height: 1.6;
        }
        .r-footer-links {
            list-style: none; display: flex;
            flex-direction: column; gap: 10px;
        }
        .r-footer-links a {
            color: #76777b; font-size: 14px;
            text-decoration: none;
        }
        .r-footer-contact {
            list-style: none; display: flex;
            flex-direction: column; gap: 12px;
        }
        .r-footer-contact li {
            display: flex; align-items: center; gap: 10px;
            color: #76777b; font-size: 14px;
        }
        .r-footer-contact svg {
            width: 16px; height: 16px;
            stroke: #76777b; fill: none;
            stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
            flex-shrink: 0;
        }
        .r-footer-copyright {
            color: #76777b; font-size: 10px;
            text-transform: uppercase; letter-spacing: 0.5px;
            margin-top: 16px;
        }

        /* Tour Tooltips */
        .tour-wrapper { position: relative; }
        .tour-highlight {
            box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.6);
            border-radius: 4px;
            z-index: 1001;
        }
        .tour-tooltip {
            position: absolute;
            background: #4dabf7;
            color: #002446;
            padding: 12px 16px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.4;
            text-align: center;
            width: 220px;
            z-index: 10002;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease, transform 0.4s ease;
            box-shadow: 0 10px 25px rgba(0,36,70,0.15);
        }
        .tour-tooltip.active {
            opacity: 1;
        }
        .tour-tooltip::after {
            content: '';
            position: absolute;
            border: 8px solid transparent;
        }
        .tour-tooltip.bottom {
            top: calc(100% + 15px);
            left: 50%;
            transform: translateX(-50%) translateY(-10px);
        }
        .tour-tooltip.bottom.active {
            transform: translateX(-50%) translateY(0);
        }
        .tour-tooltip.bottom::after {
            bottom: 100%;
            left: 50%;
            margin-left: -8px;
            border-bottom-color: #4dabf7;
        }
        .tour-tooltip.top {
            bottom: calc(100% + 15px);
            left: 50%;
            transform: translateX(-50%) translateY(10px);
        }
        .tour-tooltip.top.active {
            transform: translateX(-50%) translateY(0);
        }
        .tour-tooltip.top::after {
            top: 100%;
            left: 50%;
            margin-left: -8px;
            border-top-color: #4dabf7;
        }
        .r-hamburger { display: none; cursor: pointer; }
        .r-header-icons .tour-wrapper { display: flex; align-items: center; justify-content: center; }


        .tour-tooltip.inside {
            top: 50%;
            left: 50%;
            transform: translate(-50%, -40%);
            width: 80%;
            text-align: center;
            z-index: 9999;
        }
        .tour-tooltip.inside.active {
            transform: translate(-50%, -50%);
        }
        .tour-tooltip.inside::after {
            display: none;
        }
        .back-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            pointer-events: none;
        }
        .tour-tooltip.right-aligned {
            left: auto;
            right: -10px;
            transform: translateY(-10px);
        }
        .tour-tooltip.right-aligned.active {
            transform: translateY(0);
        }
        .tour-tooltip.right-aligned::after {
            left: auto;
            right: 18px;
        }

        /* Tour Banner */
        .tour-banner {
            position: fixed;
            bottom: 30px;
            left: 30px;
            top: auto;
            right: auto;
            transform: translateX(-20px);
            background: linear-gradient(135deg, #04844b, #036b3c); /* Verde estilo Salesforce/Enterprise */
            color: #ffffff;
            padding: 12px 24px;
            border-radius: 30px;
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 0.5px;
            box-shadow: 0 8px 24px rgba(4, 132, 75, 0.35);
            z-index: 10005;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s ease, transform 0.5s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            border: 1px solid rgba(46, 204, 113, 0.4);
            white-space: nowrap;
        }
        .tour-banner.visible {
            opacity: 1;
            transform: translateX(0);
        }
        .tour-banner-icon {
            font-size: 16px;
        }

        /* ============================================================
           RESPONSIVE
           ============================================================ */
        @media (max-width: 1024px) {
            .r-products-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 768px) {
            .r-hamburger { display: block; }
            /* Phase 2 */
            .mini-header-nav { display: none; }
            .carousel-card { flex-direction: column; }
            .carousel-card-img { width: 100%; min-height: 200px; }
            .carousel-card-body { padding: 20px; }
            .carousel-large-title { font-size: 22px; }

            /* Phase 3 */
            .r-header-nav { display: none; }
            .r-hero-title { font-size: 32px; }
            .r-hero { padding: 48px 20px; min-height: 350px; }
            .r-middle-grid { grid-template-columns: 1fr; }
            .r-middle-card-content { padding: 32px; }
            .r-products-grid { 
                display: flex; 
                flex-wrap: nowrap; 
                overflow-x: auto; 
                -webkit-overflow-scrolling: touch; 
                scroll-snap-type: x mandatory;
                gap: 16px;
                padding-bottom: 16px; 
            }
            .r-product-card {
                flex: 0 0 85%;
                scroll-snap-align: center;
            }
            .r-bottom-header {
                flex-direction: column;
                align-items: flex-start; gap: 12px;
            }
            .r-footer-content { grid-template-columns: 1fr; }
            .r-search-input { padding: 10px 12px; font-size: 12px; }
            .r-search-btn { padding: 10px 16px; font-size: 12px; }
            .tour-banner {
                font-size: 12px;
                padding: 10px 16px;
                white-space: normal;
                text-align: left;
                width: auto;
                max-width: 250px;
                line-height: 1.3;
                bottom: 20px;
                left: 16px;
                top: auto;
                right: auto;
            }
        }