/**
 * ALPACA LINK - GLOBAL STYLES
 * Common elements shared across all pages
 * Header, Footer, Typography, Buttons, Utilities
 *
 * Breakpoints usados en el proyecto (reusar estos, no agregar nuevos):
 *   1024px - layouts de 2 columnas colapsan a 1 (sidebars, grids con texto largo)
 *   768px  - menu movil / tablet chico
 *   600px  - ajustes puntuales de grillas densas (productos)
 *   480px  - telefonos chicos
 *   375px  - ancho de referencia para pruebas (iPhone SE/mini)
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ========================================
   COLORES DE MARCA OFICIALES - ALPACA LINK
   ======================================== */
/**
 * Paleta de colores corporativos:
 * - Rojo Principal: #BF1120 (Brand Red)
 * - Rojo Oscuro: #A62C21 (Dark Red)
 * - Marrón: #8C3730 (Brown)
 * - Gris: #595646 (Gray)
 * - Gris Claro: #F2F2F2 (Light Gray)
 */

/* ========== CSS VARIABLES ========== */
:root {
    /* Brand Colors - WCAG AA Compliant */
    --color-primary: #BF1120;      /* Rojo Principal */
    --color-secondary: #595646;     /* Gris Oscuro */
    --color-accent: #A62C21;        /* Rojo Oscuro */
    --color-dark-accent: #8C3730;   /* Marrón */
    --color-background: #F2F2F2;    /* Gris Claro */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-text: #595646;
    --color-text-light: #6E6E6E;    /* oscurecido desde #757575: 4.34:1 fallaba AA en texto normal sobre fondos claros */
    --color-footer: #1a1a1a;        /* Negro para footer */
    --color-cream: #F2F2F2;
    --color-border: rgba(191, 17, 32, 0.1);

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(191, 17, 32, 0.06);
    --shadow-md: 0 4px 20px rgba(191, 17, 32, 0.08);
    --shadow-lg: 0 8px 40px rgba(191, 17, 32, 0.12);
    --shadow-hover: 0 12px 48px rgba(191, 17, 32, 0.18);

    /* Z-index */
    --z-header: 1000;
    --z-modal: 2000;
    --z-whatsapp: 900;
}

/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-secondary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-secondary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ========== HEADER NORMALIZADO ========== */
.main-header {
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    transition: all 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.logo img {
    height: 50px;
    width: auto;
}

/* Navigation */
.main-nav ul {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    color: var(--color-secondary);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    width: 80%;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.language-selector {
    display: flex;
    gap: var(--spacing-sm);
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--color-background);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.main-header .btn,
.main-header .btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: 4px;
    box-shadow: none;
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px 24px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.main-header .btn:hover,
.main-header .btn-primary:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 4px 15px rgba(191, 17, 32, 0.3);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-secondary);
    transition: all 0.3s ease;
}

/* ========== FOOTER NEGRO NORMALIZADO ========== */
.main-footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    border-top: 3px solid var(--color-primary);
}

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

.footer-col h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.footer-tagline {
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--spacing-sm);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-col ul a {
    display: inline-block;
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-col ul a:hover {
    color: var(--color-primary);
}

/* Footer Logo */
.footer-logo {
    margin-bottom: var(--spacing-md);
}

.footer-logo img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

/* Footer Bottom */
.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--color-primary);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 0.9rem;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(191, 17, 32, 0.3);
    color: var(--color-white);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(191, 17, 32, 0.3);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1rem;
}

/* Call to Action Button */
.cta-button {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-white);
    padding: 15px 40px;
    font-size: 1.1rem;
    box-shadow: 0 5px 20px rgba(191, 17, 32, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(191, 17, 32, 0.4);
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(191, 17, 32, 0.1);
}

/* ========== CARDS ========== */
.card {
    background: var(--color-white);
    border-radius: 12px;
    padding: var(--spacing-xl);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========== MOBILE OVERLAY ========== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-overlay.active {
    display: block;
}

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: var(--z-whatsapp);
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* ========== SECTION DEFAULTS ========== */
section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    color: var(--color-secondary);
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--color-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-top: 15px;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.bg-white { background-color: var(--color-white); }
.bg-light { background-color: var(--color-background); }

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    /* Mobile Menu */
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--color-white);
        display: flex;
        flex-direction: column;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        left: 0;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .main-nav ul {
        flex-direction: column;
        flex: 1;
        gap: 0;
        padding: var(--spacing-xl);
    }

    .main-nav ul li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: var(--spacing-lg) var(--spacing-md);
        font-size: 1.1rem;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .header-actions .btn {
        display: none;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* ========== IMAGE PROTECTION ========== */
/* Protección contra descarga de imágenes */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

/* ========== STORE REACT PARITY OVERRIDES ========== */
/* header fijo mide ~90px: el padding-top debe absorberlo y dejar aire visible */
.store-hero {
    padding: 148px 0 60px !important;
}

@media (max-width: 768px) {
    .store-hero {
        padding: 126px 0 48px !important;
    }
}

.store-hero .container {
    max-width: 1200px !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.store-hero .hero-title,
.store-hero .stat-number,
.products-section .collection-title {
    font-family: var(--font-primary) !important;
}

.store-hero .stat-number,
.store-hero .stat-label {
    display: block !important;
}

.features-bar .container,
.products-section .container {
    max-width: 1200px !important;
    padding-left: var(--spacing-lg) !important;
    padding-right: var(--spacing-lg) !important;
}

.features-bar .features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    justify-content: center;
    width: 100%;
}

/* ========== LEGAL REACT PARITY OVERRIDES ========== */
.privacy-section,
.terms-section {
    background: var(--color-background) !important;
    min-height: 100vh;
    padding: 120px 0 60px !important;
}

.privacy-content,
.terms-content {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    max-width: 1200px !important;
    padding: 0 !important;
}

.privacy-content h1,
.terms-content h1 {
    border-bottom: 0 !important;
    color: #1a1a2e !important;
    font-size: 2.5rem;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0 !important;
}

.last-updated {
    color: #888;
    margin-bottom: 3rem;
}

.legal-section {
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}

.legal-section:last-child {
    border-bottom: 0;
}

.legal-section h2 {
    color: #1a1a2e !important;
    font-size: 1.25rem;
    margin-bottom: 1rem !important;
}

.legal-section p {
    color: #555 !important;
    line-height: 1.8;
}

/* Prevenir arrastre de imágenes */
img::selection {
    background: transparent;
}

img::-moz-selection {
    background: transparent;
}

/* Protección extra para imágenes de contenido real */
img[src*="real-photos"] {
    pointer-events: none !important;
    position: relative;
}

/* Overlay de protección sobre imágenes de hero */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: auto;
    z-index: 10;
}

/* Protección contenedores de imágenes */
.producto-imagen,
.product-image-col,
.team-showcase-image {
    position: relative;
}

.producto-imagen::after,
.product-image-col::after,
.team-showcase-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: auto;
    z-index: 10;
}
