/* ===================================
   VELTORA - MODERN DESIGN SYSTEM
   =================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand colors — neutral engine defaults.
       Real values are overridden by the layout-injected :root vars from brand(). */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;

    /* Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Typography — base values; overridden per-store by the inline :root block
       injected in main.php (brand('fonts.display') / brand('fonts.body')).
       Using var() here keeps the cascade safe: brand vars win, these are the
       engine-level fallbacks (Inter + Poppins). */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-sans: var(--font-body); /* legacy alias — do not remove */
    --font-display: 'Poppins', var(--font-body);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    /* var(--font-body) is injected by main.php from brand('fonts.body');
       falls back to var(--font-sans) = Inter when no brand font is set. */
    font-family: var(--font-body, var(--font-sans));
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-4);
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    /* var(--font-display) is injected by main.php from brand('fonts.display');
       falls back to Poppins (modern.css :root default) when no brand font set. */
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

p {
    margin-bottom: var(--space-4);
    color: var(--gray-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.125rem;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: var(--space-8);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1.5rem;
}

.header-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    flex: 1;
    justify-content: center;
}

.header-nav a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-nav a:hover {
    color: var(--primary);
}

.header-nav .nav-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white !important;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-weight: 600;
    white-space: nowrap;
}

.header-nav .nav-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.cart-link {
    position: relative;
    display: inline-block;
    text-decoration: none !important;
    color: inherit !important;
}

.cart-icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 1.5px solid var(--gray-300) !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* Icono del carrito */
.cart-icon-wrapper i {
    position: relative;
    z-index: 1;
    color: var(--gray-700) !important;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

/* Hover effects - minimalista profesional */
.cart-link:hover .cart-icon-wrapper {
    background: var(--gray-50) !important;
    border-color: var(--primary) !important;
}

.cart-link:hover .cart-icon-wrapper i {
    color: var(--primary) !important;
}

/* Active/Click effect */
.cart-link:active .cart-icon-wrapper {
    transform: scale(0.96);
    background: var(--gray-100) !important;
}

/* Badge del contador */
.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow:
        0 3px 12px rgba(255, 71, 87, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    z-index: 3;
    animation: float-badge 2.5s ease-in-out infinite;
}

@keyframes float-badge {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.05);
    }
}

.cart-link:hover .cart-count {
    animation: float-badge 2.5s ease-in-out infinite, pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.25);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: var(--space-20) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1.5" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: var(--space-6);
    line-height: 1.1;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: var(--space-8);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* Trust Badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-12);
}

.trust-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-badge i {
    font-size: 2rem;
    margin-bottom: var(--space-3);
    display: block;
}

.trust-badge-title {
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: white;
}

.trust-badge-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Section */
.section {
    padding: var(--space-8) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-10) 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title {
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
}

@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-6);
    }
}

.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-50);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--danger);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card-content {
    padding: var(--space-5);
}

.product-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--gray-900);
}

.product-card-team {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--space-3);
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.price-original {
    font-size: 1rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: var(--space-16) 0 var(--space-8);
}

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

.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--gray-800);
    color: var(--gray-400);
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Language switcher styles removed - now handled in header.php */

/* Fix link underlines */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* Fix product card sizes */
.product-card {
    max-width: 100%;
}

.product-card-image {
    max-height: 320px;
}

.product-card-image img {
    max-height: 320px;
}

/* Fix hero section */
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

.hero p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto var(--space-8);
}

/* Fix button sizes */
.btn {
    font-size: 0.95rem;
    padding: 0.625rem 1.5rem;
}

.btn-lg {
    font-size: 1rem;
    padding: 0.875rem 2rem;
}

.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Fix trust badges */
.trust-badges {
    max-width: 900px;
    margin: var(--space-8) auto 0;
}

.trust-badge {
    padding: var(--space-4);
}

.trust-badge i {
    font-size: 1.5rem;
}

.trust-badge-title {
    font-size: 0.875rem;
}

.trust-badge-desc {
    font-size: 0.75rem;
}

/* Fix section headers */
.section-title {
    font-size: 2rem;
    margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-subtitle {
    font-size: 1rem;
}

/* Fix product grid responsive */
@media (max-width: 640px) {
    .product-card-content {
        padding: var(--space-3);
    }

    .product-card-title {
        font-size: 0.875rem;
        margin-bottom: var(--space-1);
    }

    .product-card-team {
        font-size: 0.75rem;
        margin-bottom: var(--space-2);
    }

    .price-current {
        font-size: 1rem;
    }

    .price-original {
        font-size: 0.875rem;
    }

    .product-badge {
        padding: var(--space-1) var(--space-2);
        font-size: 0.65rem;
    }
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix header spacing on mobile */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .header-logo span {
        font-size: 1.25rem;
    }
}

/* Footer social icons */
.footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: var(--radius-lg);
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Fix footer list styles */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

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

.footer-links i {
    font-size: 0.875rem;
}

/* Footer section headings */
.footer-section h4 {
    font-size: 1rem;
    margin-bottom: var(--space-4);
    color: white;
}

.footer-section p {
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* Cart Counter Animation */
.cart-count.cart-updated {
    animation: cartPulse 0.6s ease;
}

@keyframes cartPulse {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.1);
    }
}

/* Additional cart styling */
[data-cart-count] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
