/* Smarth 1 Solution - Modern CSS inspired by Fix Credit Express */
/* =================================================================== */

:root {
    /* Primary Colors */
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #6366f1;
    
    /* Secondary Colors */
    --secondary-color: #06b6d4;
    --secondary-dark: #0891b2;
    --secondary-light: #22d3ee;
    
    /* Accent Colors */
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    
    /* Neutral Colors */
    --dark-color: #1e293b;
    --dark-light: #334155;
    --gray-color: #64748b;
    --gray-light: #94a3b8;
    --gray-lighter: #e2e8f0;
    --white-color: #ffffff;
    --background-color: #f8fafc;
    
    /* Success/Error Colors */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Poppins', 'Inter', sans-serif;
    
    /* Spacing */
    --container-width: 100%;
    --container-padding: 2rem;
    --section-padding: 5rem 0;
    --header-height: 72px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Layout max width for centered sections */
    --content-max: 1200px;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Admin helpers */
.btn.btn-dark{background:#111827;color:#e5e7eb;border:1px solid #374151}
.btn.btn-dark:hover{background:#1f2937}
.status-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:.75rem;font-weight:600;border:1px solid transparent}
.status-badge.status-active{background:#dcfce7;color:#065f46;border-color:#bbf7d0}
.status-badge.status-inactive{background:#fee2e2;color:#991b1b;border-color:#fecaca}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

/* Margen para anclas al usar scrollIntoView con header fijo */
[id] { scroll-margin-top: 90px; }

/* Container */
.container { max-width: var(--container-width); width: 100%; margin: 0 auto; padding: 0 var(--container-padding); }

/* Header & Navigation */
.header-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--gray-light); /* línea separadora más visible */
    z-index: 1000;
    transition: var(--transition-normal);
}

/* Franja de acento bajo el menú para diferenciarlo del contenido */
.header-modern::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.navbar-modern {
    padding: 1rem 0;
}

.nav-container { max-width: var(--container-width); width: 100%; margin: 0 auto; padding: 0 var(--container-padding); display: flex; align-items: center; justify-content: space-between; }

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition-fast);
}

.brand-link:hover {
    transform: scale(1.02);
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.brand-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.nav-link i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cart Dropdown */
.cart-dropdown {
    position: relative;
}

.cart-button {
    position: relative;
    background: none;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--dark-color);
}

.cart-button:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--error-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-lg);
    min-width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-lighter);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    z-index: 100;
}

.cart-dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.cart-count {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
}

.cart-dropdown-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-dropdown-item:last-child {
    border-bottom: none;
}

.item-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.item-info p {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.item-total {
    font-weight: 600;
    color: var(--primary-color);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-lighter);
}

.cart-total {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.cart-total-amount {
    color: var(--primary-color);
    font-weight: 700;
}

.cart-actions {
    display: flex;
    gap: 0.75rem;
}

.cart-loading,
.cart-empty,
.cart-error {
    padding: 2rem;
    text-align: center;
    color: var(--gray-color);
}

.cart-loading i,
.cart-empty i,
.cart-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--dark-color);
}

.user-button:hover {
    background: rgba(79, 70, 229, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.user-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-lighter);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    z-index: 100;
    overflow: hidden;
}

.user-dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--gray-lighter);
}

.dropdown-item:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-lighter);
    margin: 0.5rem 0;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--dark-color);
    border-radius: 1px;
    transition: var(--transition-fast);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.mobile-nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: var(--transition-normal);
    overflow-y: auto;
}

.mobile-nav-overlay.show .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
}

.mobile-nav-menu {
    padding: 1rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--gray-lighter);
}

.mobile-nav-link:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.mobile-nav-divider {
    height: 1px;
    background: var(--gray-lighter);
    margin: 1rem 0;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease-out;
}

.flash-success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
    border-left: 4px solid var(--success-color);
}

.flash-error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border-left: 4px solid var(--error-color);
}

.flash-warning {
    background: rgba(245, 158, 11, 0.9);
    color: white;
    border-left: 4px solid var(--warning-color);
}

.flash-info {
    background: rgba(79, 70, 229, 0.9);
    color: white;
    border-left: 4px solid var(--primary-color);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.flash-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
/* Con header sticky no necesitamos margen extra arriba */
.main-content {
    margin-top: 0; /* antes: 80px */
}

/* Hero Section Modern */
.hero-modern {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    overflow: hidden;
    padding-top: var(--header-height); /* evita que el header tape el contenido inicial */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle-system {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 2px, transparent 2px);
    background-size: 100px 100px, 150px 150px, 200px 200px;
    animation: float 20s ease-in-out infinite;
}

.gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(79, 70, 229, 0.1) 0%, 
        rgba(6, 182, 212, 0.1) 50%, 
        rgba(245, 158, 11, 0.1) 100%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.hero-container { position: relative; z-index: 2; width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--container-padding); }

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* texto ligeramente más ancho para centrar visualmente */
    gap: 3rem;
    align-items: center;
    min-height: 80vh;
}

.hero-text {
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: slideInDown 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-secondary);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: slideInLeft 0.8s ease-out 0.6s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.feature-item i {
    color: var(--accent-color);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: slideInLeft 0.8s ease-out 0.8s both;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    animation: slideInUp 0.8s ease-out 1s both;
}

.stat-card {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 0.8s ease-out 0.4s both;
}

.credit-score-demo {
    position: relative;
}

.score-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    width: 350px;
    box-shadow: var(--shadow-xl);
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.score-header h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.score-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
}

.score-display {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.score-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.score-change {
    display: block;
    font-size: 1rem;
    color: var(--success-color);
    font-weight: 600;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 0.95rem;
}

.detail-item.success {
    color: var(--success-color);
    font-weight: 600;
}

/* Products Section */
.products-section {
    padding: var(--section-padding);
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Checkout remove button */
.order-item {
    position: relative;
}
.order-item .remove-item {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.25rem;
    margin-left: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
}
.order-item .remove-item:hover { background: rgba(239,68,68,0.1); }
.order-item .remove-item:active { transform: scale(0.95); }

.product-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-lighter);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-header {
    text-align: center;
    margin-bottom: 2rem;
}

.product-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.product-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.product-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price-symbol {
    font-size: 1.2rem;
    color: var(--gray-color);
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-period {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.product-description {
    margin-bottom: 2rem;
}

.product-description p {
    color: var(--gray-color);
    line-height: 1.6;
}

.product-features {
    margin-bottom: 2rem;
}

.product-features .feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.product-features .feature-item i {
    color: var(--success-color);
    width: 16px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Process Section */
.process-section {
    padding: var(--section-padding);
    background: var(--background-color);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.step-content p {
    color: var(--gray-color);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
    color: white;
}

.cta-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}

.cta-text h2 {
    font-family: var(--font-secondary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

/* Footer */
.footer {
        background: #0f172a;
        color: #cbd5e1;
        padding: 4rem 0 2rem;
        margin-top: 3rem;
}

.footer .container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--container-padding); }

.footer-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 2rem;
        margin-bottom: 2rem;
}

.footer-logo .logo { width: 120px; margin-bottom: 1rem; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.footer-section h4 { color: #e2e8f0; margin-bottom: 1rem; font-weight: 600; }
.footer-section ul { list-style: none; }
.footer-section a { color: #94a3b8; text-decoration: none; transition: color .2s ease; }
.footer-section a:hover { color: #e2e8f0; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.06); color: #e2e8f0; margin-right: .5rem; transition: transform .2s ease, background .2s ease; }
.footer-social a:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); }
.footer-badges { display: flex; gap: .75rem; align-items: center; }
.footer-badge { height: 28px; opacity: .9; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1rem; }
.footer-bottom-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Floating chat button */
.floating-chat { position: fixed; right: 20px; bottom: 20px; z-index: 1100; opacity: 0; transform: translateY(20px); transition: all .4s ease; }
.floating-chat.show { opacity: 1; transform: translateY(0); }
.floating-chat .chat-button { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); box-shadow: 0 10px 20px rgba(0,0,0,.25); cursor: pointer; }
.floating-chat .chat-button i { font-size: 1.5rem; }
.floating-chat .chat-tooltip { position: absolute; right: 70px; top: 50%; transform: translateY(-50%); background: #111827; color: #f9fafb; padding: .5rem .75rem; border-radius: .5rem; white-space: nowrap; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.floating-chat:hover .chat-tooltip { opacity: 1; }

/* Forzar que overlays no se recorten por el footer y ocultar cart sidebar universalmente por ahora */
.cart-sidebar { display: none !important; }
.modal { z-index: 2000; }

/* Checkout page redesign */
.checkout-container { padding: 2rem 0 4rem; }
.checkout-container .page-title { font-size: 1.8rem; font-weight: 800; color: #0f172a; margin: 0 0 1rem; }
.checkout-content { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.billing-section, .order-summary { background: #fff; border: 1px solid var(--gray-lighter); border-radius: 1rem; box-shadow: var(--shadow-md); }
.billing-section form { padding: 1.5rem; }
.form-section h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; color: #0f172a; margin-bottom: .75rem; display:flex; align-items:center; gap:.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { font-weight: 600; color: #0f172a; margin-bottom: .25rem; display:block; }
.form-group input, .form-group select { width: 100%; padding: .75rem .9rem; border: 1px solid var(--gray-lighter); border-radius: .6rem; font-size: .95rem; transition: .2s; background:#fff; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.payment-methods { display: grid; gap: .75rem; margin: .5rem 0 1rem; }
.payment-method { display:flex; gap:.5rem; align-items:center; }
.payment-option { display:flex; align-items:center; gap:.6rem; background:#f8fafc; border:1px solid var(--gray-lighter); padding:.6rem .8rem; border-radius:.5rem; }
.payment-option .cards i { opacity:.75; }
.payment-info { margin: .5rem 0 0; font-size: .9rem; color: #475569; display:flex; gap:.5rem; align-items:center; }
.form-actions { display:flex; gap:.75rem; align-items:center; }
.order-summary .summary-card { padding: 1rem 1rem 1.25rem; }
.order-summary h2 { font-size: 1rem; text-transform: uppercase; letter-spacing:.02em; margin-bottom:.75rem; color:#0f172a; display:flex; gap:.5rem; align-items:center; }
.order-items { display:flex; flex-direction:column; gap:.5rem; margin-bottom: .75rem; }
.order-item { display:flex; align-items:center; justify-content: space-between; gap:.75rem; background:#f8fafc; border:1px solid var(--gray-lighter); border-radius:.6rem; padding:.6rem .8rem; }
.order-item .item-details h4 { font-size:.95rem; margin:0; color:#0f172a; }
.order-item .item-details .quantity { font-size:.85rem; color:#64748b; }
.order-item .item-price { font-weight:700; color: var(--primary-color); }
.order-totals { border-top:1px solid var(--gray-lighter); padding-top:.75rem; margin-top:.25rem; display:grid; gap:.25rem; }
.total-line { display:flex; justify-content: space-between; font-size:.95rem; color:#0f172a; }
.total-line.total { font-weight:800; }
.guarantees { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.75rem; }
.guarantee-item { display:flex; gap:.4rem; align-items:center; font-size:.9rem; color:#475569; }
.loading-overlay { position: fixed; inset:0; background: rgba(15,23,42,.6); display:none; align-items:center; justify-content:center; z-index: 3000; }
.loading-spinner { background:#fff; border-radius: .75rem; padding: 1rem 1.25rem; display:flex; gap:.5rem; align-items:center; box-shadow: var(--shadow-lg); }

@media (max-width: 980px){
    .checkout-content { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .footer-bottom-content { flex-direction: column; align-items: flex-start; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Ripple effect */
.btn { position: relative; overflow: hidden; }
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255,255,255,.35);
    animation: ripple .6s linear;
    pointer-events: none;
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Variante para header claro */
.btn-outline-dark {
    background: transparent;
    color: var(--dark-color);
    border: 2px solid var(--gray-light);
}
.btn-outline-dark:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000; /* sobre header y overlays móviles */
    backdrop-filter: blur(5px);
    align-items: center; /* centrar contenido cuando use flex */
    justify-content: center;
}

/* Cuando está visible, mostrar como flex para centrar */
.modal.show { display: flex; }
/* Compatibilidad con otras partes que usan modal-show */
.modal.modal-show { display: flex; }

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96); /* estado base: levemente reducido */
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    opacity: 0; /* estado base invisible */
    transition: transform .18s ease, opacity .18s ease; /* animación nativa rápida */
    z-index: 1; /* por encima del fondo del modal */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 0;
    border-bottom: 1px solid var(--gray-lighter);
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--dark-color);
}

.modal-form {
    padding: 0 2rem 2rem;
}

/* Acciones del modal */
.modal-actions {
    display: flex;
    gap: .75rem;
    padding: 0 2rem 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Animations */
.modal.show .modal-content,
.modal.modal-show .modal-content {
    /* al mostrar el modal, animar a tamaño completo y opacidad 1 */
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal elements when JS adds .animate-in */
.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .cta-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ================= Extra Overrides de Visibilidad de Bordes ================= */
/* Engrosar bordes de inputs y selects globalmente para mejorar contraste */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
    border-width: 2px !important;
    border-color: var(--gray-light) !important; /* más oscuro que --gray-lighter */
}

/* Engrosar bordes de contenedores clave */
.product-card,
.billing-section,
.order-summary,
.cart-dropdown-content,
.dropdown-item,
.modal-content,
.order-item {
    border-width: 2px !important;
    border-color: var(--gray-light) !important;
}

/* Líneas divisorias más notorias */
.cart-header,
.cart-footer,
.dropdown-divider,
.order-totals,
.modal-header {
    border-top-width: 2px !important;
    border-bottom-width: 2px !important;
    border-color: var(--gray-light) !important;
}

/* Estado de foco más marcado */
input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2) !important;
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    --header-height: 64px;
    }
    /* Menú responsivo */
    .nav-menu { display: none; }
    .mobile-menu-toggle { display: flex; }
    .nav-actions { gap: .5rem; }
    .auth-buttons .btn { padding: .45rem .7rem; font-size: .8rem; }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .score-card {
        width: 300px;
        padding: 1.5rem;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    .auth-buttons { gap: .5rem; }
    .btn-sm { padding: .45rem .65rem; font-size: .8rem; }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-header,
    .modal-form {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
