:root {
            --dual-blue: #081A3A;
            --accent-orange: #FF6A00;
            --wa-green: #25D366;
        }

        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        body {
            margin: 0; padding: 0;
            font-family: 'Arial Black', Gadget, sans-serif;
            background-color: #f4f7f6;
            color: #333;
            overflow-x: hidden;
        }

        header {
            position: sticky; top: 0; width: 100%; z-index: 1000;
            padding: 1rem 0;
            background: white;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 1.5rem; }
        .logo { font-size: 1.3rem; font-weight: 900; text-decoration: none; font-style: italic; display: flex; gap: 4px; }
        .logo .l-dual { color: var(--dual-blue); }
        .logo .l-orange { color: var(--accent-orange); }

        .nav-menu { display: flex; gap: 12px; align-items: center; }
        .nav-menu a { color: var(--dual-blue); text-decoration: none; font-size: 0.8rem; font-weight: 900; cursor: pointer; text-transform: uppercase; }

        /* CARRITO EN HEADER (PC) */
        #cart-header-btn {
            display: none;
            background: var(--accent-orange);
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            align-items: center;
            gap: 8px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.4s;
        }
        #cart-header-btn.visible { display: flex; animation: slideInRight 0.4s ease-out; }
        @keyframes slideInRight { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

        /* VISTAS */
        #cat-view { display: none; }
        main { display: block; }
        #cat-view:target { display: block; }
        #cat-view:target ~ main { display: none; }

        .hero {
            height: 60vh;
            background-color: var(--dual-blue);
            display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
            padding: 0 2rem;
            background-image: radial-gradient(circle at center, #1a2a4a 0%, #081A3A 100%);
        }

        .hero-main-text { font-size: 3rem; font-weight: 900; letter-spacing: -1px; line-height: 1.1; margin-bottom: 1.5rem; text-transform: uppercase; }
        .hero-sub { font-size: 1rem; font-family: sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-orange); margin-bottom: 1rem; }
        
        .btn-primary { background: var(--accent-orange); color: white; padding: 1rem 2rem; border-radius: 50px; text-decoration: none; font-size: 1rem; font-weight: 900; cursor: pointer; border: none; transition: transform 0.2s; display: inline-block; }
        .btn-primary:active { transform: scale(0.95); }

        .section { padding: 4rem 1.5rem; max-width: 1200px; margin: 0 auto; }
        .section-header { margin-bottom: 3rem; text-align: center; }
        .section-header h2 { font-size: 2rem; margin: 0; color: var(--dual-blue); text-transform: uppercase; }
        .section-header::after { content: ""; display: block; width: 60px; height: 4px; background: var(--accent-orange); margin: 15px auto; }
        .catalog-search { display: block; width: min(680px, 100%); margin: 0 auto 2.5rem; padding: 1rem 1.25rem; border: 2px solid #dfe5ea; border-radius: 50px; background: white; color: var(--dual-blue); font-family: sans-serif; font-size: 1rem; outline: none; box-shadow: 0 4px 14px rgba(0,0,0,0.05); transition: border-color 0.2s, box-shadow 0.2s; }
        .catalog-search:focus { border-color: var(--accent-orange); box-shadow: 0 4px 18px rgba(255,106,0,0.15); }
        .catalog-empty { grid-column: 1 / -1; text-align: center; color: #666; font-family: sans-serif; padding: 2rem; }

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

        .product-card { 
            position: relative; border: none; padding: 25px; border-radius: 15px; text-align: center; 
            background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s;
        }
        .product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

        /* SERVICIOS DE CÓDIGO Y DESARROLLO */
        .services-intro { max-width: 760px; margin: -1.5rem auto 2.25rem; text-align: center; color: #4b5563; font: 1rem/1.6 Arial, sans-serif; }
        .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; align-items: stretch; }
        .service-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 100%; padding: 26px 24px; border: 1px solid #e6eaf0; border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(8,26,58,0.07); }
        .service-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 15px; background: #fff2e9; }
        .service-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--dual-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
        .service-icon .icon-accent { stroke: var(--accent-orange); }
        .service-card h3 { margin: 0 0 10px; color: var(--dual-blue); font-size: 1.12rem; line-height: 1.35; text-transform: uppercase; }
        .service-card p { margin: 0 0 18px; color: #4b5563; font: 0.96rem/1.55 Arial, sans-serif; }
        .service-price { margin-top: auto !important; color: var(--dual-blue) !important; font-weight: 700 !important; }
        .service-quote { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 2px; padding: 12px 16px; border-radius: 999px; background: var(--wa-green); color: #fff; font: 700 0.93rem Arial, sans-serif; text-align: center; text-decoration: none; transition: transform 0.2s, filter 0.2s; }
        .service-quote:hover { filter: brightness(0.94); transform: translateY(-1px); }
        .service-quote:focus-visible { outline: 3px solid var(--accent-orange); outline-offset: 3px; }
        @media (max-width: 600px) { .services-section { padding: 3rem 1rem; } .services-intro { margin: -1rem auto 1.75rem; font-size: .94rem; } .services-grid { grid-template-columns: 1fr; gap: 15px; } .service-card { padding: 22px 19px; } }
        
        .p-img { height: 200px; display: flex; align-items: center; justify-content: center; padding: 10px; margin-bottom: 15px; cursor: pointer; }
        .p-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
        
        .price { color: var(--accent-orange); font-size: 1.4rem; font-weight: 900; margin-top: 10px; }
        .product-card h3 { font-size: 1.1rem; margin: 10px 0; color: var(--dual-blue); text-transform: uppercase; cursor: pointer; }

        /* MODALES */
        .product-modal {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.85); z-index: 2000;
            display: none; align-items: center; justify-content: center;
            padding: 1.5rem; backdrop-filter: blur(5px);
        }
        .modal-active { display: flex; }
        .close-modal-btn { position: absolute; top: 20px; right: 20px; color: white; font-size: 2.5rem; cursor: pointer; z-index: 2001; background: transparent; border: 0; padding: 0; line-height: 1; }
        .detail-container { max-width: 900px; width: 100%; display: grid; grid-template-columns: 1fr; gap: 2rem; background: white; padding: 2.5rem; border-radius: 20px; position: relative; overflow-y: auto; max-height: 90vh; text-align: center; }

        /* CONTROLES CANTIDAD MODAL */
        .qty-control { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 20px 0; }
        .qty-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--dual-blue); background: white; color: var(--dual-blue); font-size: 1.5rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; }
        .qty-btn:disabled { opacity: .45; cursor: not-allowed; }
        .qty-val { font-size: 1.4rem; width: 30px; font-weight: 900; }

        .add-to-cart-btn { background: var(--dual-blue); color: white; width: 100%; padding: 1.2rem; border-radius: 50px; border: none; font-weight: 900; text-transform: uppercase; cursor: pointer; font-size: 1rem; transition: transform 0.1s; }
        .add-to-cart-btn:active { transform: scale(0.95); }
        .buy-now-wa { background: transparent; color: var(--wa-green); border: none; font-weight: 900; text-transform: uppercase; cursor: pointer; font-size: 0.8rem; margin-top: 15px; text-decoration: underline; }


        .stock-info { font-family: sans-serif; font-size: 0.82rem; font-weight: 800; margin: 14px 0 0; }
        .stock-info.available { color: #27ae60; }
        .stock-info.low { color: #d68910; }
        .stock-info.out { color: #d35400; }
        .stock-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; background:currentColor; }
        .stock-limit-message { display:none; margin:10px 0 0; padding:10px 12px; border:1px solid #fed7aa; border-left:4px solid var(--accent-orange); border-radius:10px; background:#fff7ed; color:#693b12; font:600 .84rem/1.4 Arial,sans-serif; text-align:left; }
        .stock-limit-message.visible { display:block; }
        #cart-stock-limit-message { margin:0 0 .7rem; font-size:.82rem; }
        .add-to-cart-btn:disabled, .buy-now-wa:disabled { cursor:not-allowed; opacity:1; }
        .add-to-cart-btn:disabled { background:#777; color:#fff; }
        .buy-now-wa:disabled { color:#777; text-decoration:none; }

        /* CARRITO FLOTANTE (MÓVIL) */
        #cart-float-btn {
            position: fixed; bottom: 30px; right: 30px;
            background: var(--accent-orange); color: white;
            width: 65px; height: 65px; border-radius: 50%;
            display: none; align-items: center; justify-content: center;
            box-shadow: 0 5px 20px rgba(255,106,0,0.4);
            z-index: 1500; cursor: pointer;
            animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        #cart-float-btn.visible { display: flex; }
        .cart-count { position: absolute; top: 0; right: 0; background: var(--dual-blue); color: white; width: 22px; height: 22px; border-radius: 50%; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; border: 2px solid white; }

        /* VENTANA REVISIÓN CARRITO */
        #cart-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.7); z-index: 3000;
            display: none; align-items: center; justify-content: center; padding: 1rem;
        }
        .cart-window { background: white; width: min(92vw, 900px); max-width: 900px; height: min(760px, calc(100vh - 2rem)); border-radius: 25px; overflow: hidden; display: flex; flex-direction: column; animation: slideUp 0.3s ease-out; }
        @keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

        .cart-header { background: var(--dual-blue); color: white; padding: 1.35rem 1.5rem; display: flex; justify-content: space-between; align-items: center; flex: 0 0 auto; }
        .cart-items { padding: 1.15rem 1.5rem; flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
        .c-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
        .c-item-info { flex-grow: 1; text-align: left; }
        .c-item-name { font-size: 0.85rem; font-weight: 900; color: var(--dual-blue); }
        .c-item-price { font-size: 0.8rem; color: var(--accent-orange); }
        .c-qty-control { display: flex; align-items: center; gap: 8px; }
        .btn-mini { width: 25px; height: 25px; border-radius: 50%; border: 1px solid #ccc; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
        .count { font-size: 0.9rem; width: 15px; text-align: center; }

        .cart-footer { padding: .85rem 1.25rem 1rem; background: #f9f9f9; text-align: center; flex: 0 0 auto; }
        .total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; font-weight: 900; }
        .cart-header h2 { font-size: 1.55rem; }
        .c-item { padding: 15px 0; gap: 16px; }
        .c-item-name { font-size: 1rem; }
        .c-item-price { font-size: .95rem; }
        .delivery-notice { background: #fff7ed; border: 1px solid #fed7aa; border-left: 4px solid var(--accent-orange); border-radius: 12px; padding: .7rem .9rem; margin: .55rem 0 .75rem; color: #693b12; font-size: .84rem; line-height: 1.35; display: flex; flex-direction: column; gap: .25rem; }
        .delivery-notice strong { color: #9a4d00; font-size: .9rem; }
        .total-row { font-size: 1.05rem; margin-bottom: .8rem; }
        @media (max-width: 600px) { .cart-window { width: calc(100vw - 1rem); max-width: none; height: calc(100vh - 1rem); } .cart-header { padding: 1.15rem 1.2rem; } .cart-items { padding: 1rem 1.2rem; } .cart-footer { padding: .7rem 1rem .85rem; } .delivery-notice { margin: .4rem 0 .6rem; padding: .6rem .75rem; font-size: .78rem; } }

        .btn-finish { background: var(--wa-green); color: white; width: 100%; padding: 1.1rem; border-radius: 50px; border: none; font-weight: 900; cursor: pointer; font-size: 1rem; box-shadow: 0 4px 15px rgba(37,211,102,0.3); }
        .btn-empty { background: transparent; color: #999; border: none; font-size: 0.75rem; cursor: pointer; text-decoration: underline; margin-top: 15px; }

        /* ANIMACIÓN +1 */
        .plus-one { position: fixed; color: var(--accent-orange); font-weight: 900; font-size: 1.2rem; pointer-events: none; z-index: 5000; animation: fadeUp 0.6s ease-out forwards; }
        @keyframes fadeUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-50px); opacity: 0; } }

        @media (min-width: 768px) {
            .hero-main-text { font-size: 5rem; }
            .detail-container { grid-template-columns: 1fr 1fr; align-items: center; text-align: left; }
            .product-grid { grid-template-columns: repeat(3, 1fr); }
            #cat-view .product-grid { grid-template-columns: repeat(4, 1fr); }
        }

        @media (max-width: 767px) {
            main .product-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; }
            #cat-view .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
            main .product-card { padding: 10px 5px; }
            main .product-card h3 { font-size: 0.7rem; }
            main .price { font-size: 0.8rem; }
            main .p-img { height: 100px; }
        }

        footer { text-align: center; padding: 4rem; color: #888; font-size: 0.9rem; background: #eee; margin-top: 4rem; }

/* CSP-safe interaction styles */
body.cart-open { overflow: hidden; }
#cart-overlay.cart-open { display: flex; }
.cart-icon { font-size: 1.5rem; }
.product-open { cursor: pointer; }
.product-open:focus-visible, [data-action]:focus-visible { outline: 3px solid var(--accent-orange); outline-offset: 2px; }
.modal-product-image img { max-width: 100%; border-radius: 15px; }
.modal-description { font-family: sans-serif; font-size: .9rem; color: #666; line-height: 1.4; }
.cart-quantity-hint { font-size: .7rem; color: #888; margin-top: 10px; }
.plus-one { position: fixed; top: 1.5rem; right: 2rem; }
