/*
Theme Name: RAM Systems
Theme URI: https://ramsystems.com
Author: RAM Systems
Author URI: https://ramsystems.com
Description: Tema WordPress minimalista para tienda de tecnología con WooCommerce como catálogo y checkout vía WhatsApp.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ramsystems
Tags: e-commerce, woocommerce, technology, modern, minimalist, responsive

RAM Systems - Tema para tienda de tecnología
Diseño minimalista con paleta: blanco, negro y celeste tecnológico
*/

/* ==========================================================================
   CSS Variables - Modern Design System
   ========================================================================== */
:root {
    /* Colores principales - Paleta moderna Sky */
    --color-primary: #0ea5e9;
    --color-primary-dark: #0284c7;
    --color-primary-light: #38bdf8;
    --color-accent: #8b5cf6;

    /* Neutros más cálidos y sofisticados */
    --color-black: #0f172a;
    --color-dark: #1e293b;
    --color-gray-dark: #334155;
    --color-gray: #475569;
    --color-gray-light: #64748b;
    --color-gray-lighter: #64748b;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-400: #94a3b8;
    --color-gray-600: #475569;
    --color-gray-900: #0f172a;
    --color-white: #FFFFFF;
    --color-off-white: #f8fafc;

    /* Estados - Mejor contraste */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* WhatsApp */
    --color-whatsapp: #25D366;
    --color-whatsapp-dark: #128C7E;

    /* Tipografía */
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Tamaños de fuente */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Espaciado - Mayor whitespace */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 5rem;
    --spacing-4xl: 6rem;

    /* Bordes - Más finos para look moderno */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Sombras modernas y sutiles */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.25);

    /* Transiciones más naturales con cubic-bezier */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;

    /* Container */
    --container-max: 1280px;
    --container-padding: var(--spacing-lg);

    /* Focus ring para accesibilidad */
    --focus-ring: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-primary);
    --focus-ring-offset: 2px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Buttons */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Inputs */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   Typography - Modern with better readability
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-black);
    letter-spacing: -0.025em;
}

h1 {
    font-size: var(--text-5xl);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
h2 {
    font-size: var(--text-4xl);
    letter-spacing: -0.025em;
}
h3 {
    font-size: var(--text-3xl);
    letter-spacing: -0.02em;
}
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

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

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--spacing-3xl) 0;
}

/* Grid */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flex utilities */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* ==========================================================================
   Components - Buttons (Modern & Subtle)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid transparent;
}

/* Focus states for accessibility */
.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: var(--focus-ring-offset);
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--color-black);
    border-color: var(--color-gray-200);
}

.btn-secondary:hover {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

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

.btn-whatsapp:hover {
    background: var(--color-whatsapp-dark);
    border-color: var(--color-whatsapp-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--text-xs);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Accessibility - WCAG 2.1 Compliant
   ========================================================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.skip-link {
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-md);
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.skip-link:focus {
    top: var(--spacing-sm);
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

/* Global focus-visible styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Remove outline on mouse focus, keep for keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ARIA live region for announcements */
.sr-announce {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

[aria-live="polite"],
[aria-live="assertive"] {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base) ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) ease forwards;
}

/* ==========================================================================
   WordPress Core Classes
   ========================================================================== */
.alignleft {
    float: left;
    margin-right: var(--spacing-lg);
}

.alignright {
    float: right;
    margin-left: var(--spacing-lg);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: var(--text-sm);
    color: var(--color-gray-lighter);
    text-align: center;
    margin-top: var(--spacing-sm);
}

/* Gallery */
.gallery {
    display: grid;
    gap: var(--spacing-md);
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }

