﻿:root {
    --primary-color: #00a8e8;
    /* Vivid Water Blue */
    --secondary-color: #007ea7;
    /* Deep Ocean Blue */
    --accent-color: #003459;
    /* Dark Navy */
    --text-color: #333333;
    --light-text: #f4f4f4;
    --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--background-gradient);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

/* Glass Panel Effect */
.glass-panel {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--accent-color);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    animation: ripple 15s infinite linear;
    z-index: -1;
}

@keyframes ripple {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-content {
    max-width: 800px;
    padding: 3rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #555;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.4);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 232, 0.6);
}

/* Features Grid */
.features {
    padding: 5rem 10%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

/* Shopify Buy Button Containers */
.feature-card [id^="shopify-"] {
    margin-top: 1.5rem;
    min-height: 120px;
    display: block !important;
    width: 100%;
}

.feature-card [id^="shopify-"] iframe {
    width: 100% !important;
    min-height: 120px !important;
}

/* Force Shopify iframes to have proper height */
.feature-card [id^="shopify-"] iframe {
    min-height: 250px !important;
    height: 250px !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure Shopify buttons are visible */
.shopify-buy__btn {
    margin: 0.5rem 0 !important;
    width: 100% !important;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--accent-color);
    color: white;
    padding: 3rem 5%;
    text-align: center;
    margin-top: auto;
}

/* SPA Utilities */
.hidden {
    display: none !important;
}

.page-content {
    min-height: 100vh;
}

.animate-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Navigation Styles */
.nav-button {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
}

.nav-button:hover {
    color: var(--primary-color);
    background: rgba(0, 168, 232, 0.1);
}

.nav-button.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.4);
}

/* Division Navigation (Sub-tabs) */
.division-nav-button {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.division-nav-button:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.division-nav-button.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.4);
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    height: 300px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 16px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* File Upload Area */
.upload-area:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: var(--secondary-color) !important;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: white;
    /* Changed to white for better visibility on dark nav */
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
}

/* Animations for Shopping Cart */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* Product Actions */
.product-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

/* Cart Icon */
#cart-icon-container button {
    position: relative;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

#cart-icon-container button:hover {
    color: #2563eb;
}

/* Toggle Button */
.nav-toggle-btn {
    transition: all 0.3s ease;
}

/* Scanning Effect */
.scanning-effect {
    position: relative;
    overflow: hidden;
}

.scanning-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #00f3ff;
    box-shadow: 0 0 15px #00f3ff;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes fadeInZoom {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ping {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ======================================= */
/* RESPONSIVE DESIGN - TABLETS & MOBILE */
/* ======================================= */

/* Tablets */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .features {
        padding: 4rem 5%;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .hero {
        padding: 0 3%;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {

    /* Typography adjustments */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* Header adjustments */
    header {
        padding: 0.75rem 4%;
    }

    nav {
        flex-wrap: wrap;
    }

    /* Mobile menu toggle visible */
    .mobile-menu-toggle {
        display: block;
        position: relative;
        z-index: 10001;
    }

    /* Mobile Menu handled by mobile-menu.js */

    /* Hero section mobile */
    .hero {
        min-height: auto !important;
        height: auto !important;
        padding: 4rem 5% 3rem !important;
    }

    /* Hero grid - single column on mobile */
    .hero>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Hero text adjustments */
    .hero h1 {
        font-size: 2rem !important;
    }

    .hero p {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }

    /* Button container adjustments */
    .hero div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .hero button,
    .hero .cta-button {
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }

    /* Product grid mobile */
    .hero .glass-panel div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        height: auto !important;
        gap: 1rem !important;
    }

    /* Features grid */
    .features {
        padding: 2rem 5% !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Feature cards */
    .feature-card {
        padding: 1.5rem !important;
    }

    /* Glass panels */
    .glass-panel {
        padding: 1.5rem !important;
    }

    .hero-content {
        padding: 1.5rem !important;
        max-width: 100% !important;
    }

    /* Product grids in divisions */
    #division-construccion,
    #division-industria,
    #division-vehicular,
    #division-hogar {
        grid-template-columns: 1fr !important;
    }

    /* Division navigation */
    div[style*="display: flex"][style*="justify-content: center"] {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .division-nav-button {
        font-size: 0.9rem !important;
        padding: 0.6rem 1rem !important;
    }

    /* Pilares section mobile */
    #page-pilares {
        padding: 3rem 1rem !important;
    }

    #page-pilares>div {
        margin-bottom: 3rem !important;
    }

    #page-pilares h2 {
        font-size: 2rem !important;
    }

    #page-pilares p {
        font-size: 1rem !important;
    }

    /* Pilares cards grid */
    #page-pilares>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding-bottom: 3rem !important;
    }

    /* Asesor section */
    #page-asesor .hero {
        padding: 5rem 5% 2rem !important;
    }

    #page-asesor .glass-panel {
        padding: 1.5rem !important;
    }

    /* Asesor grid adjustments */
    #result-content>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Image dimensions */
    img[alt] {
        max-width: 100%;
        height: auto !important;
    }

    .logo img {
        height: 40px !important;
        width: auto !important;
    }

    /* Adjust inline styles that use viewport units */
    [style*="font-size: clamp"] {
        font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    }

    /* Chart container */
    .chart-container {
        height: 250px;
        max-width: 100%;
    }

    /* Footer */
    footer {
        padding: 2rem 5%;
        font-size: 0.9rem;
    }

    /* Contact section adjustments */
    #contacto-container {
        padding: 1rem !important;
    }

    /* Product card images */
    .feature-card img {
        height: 180px !important;
    }

    /* Badges and small elements */
    div[style*="border-radius: 50px"],
    div[style*="border-radius: 9999px"] {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .hero {
        padding: 3rem 4% 2rem !important;
    }

    .features {
        padding: 1.5rem 4% !important;
    }

    .cta-button {
        padding: 0.9rem 1.5rem !important;
        font-size: 0.95rem !important;
    }

    .glass-panel {
        padding: 1rem !important;
    }

    /* Product controls */
    .product-controls select,
    .product-controls input {
        font-size: 0.9rem !important;
    }
}