/* ========================================
   DISEÑO MODERNO Y PROFESIONAL
   Estilos tipo Shopify/Amazon
   ======================================== */

:root {
    --color-primary: #FF6B35;
    --color-primary-dark: #E55A2B;
    --color-primary-light: #FFD6C0;
    
    --color-secondary: #004E89;
    --color-secondary-dark: #003566;
    --color-secondary-light: #E8F4F8;
    
    --color-success: #00B894;
    --color-danger: #FF6B6B;
    --color-warning: #FDCB6E;
    --color-info: #0984E3;
    
    --color-text: #2D3436;
    --color-text-light: #636E72;
    --color-border: #DFE6E9;
    --color-bg-light: #F8F9FA;
    --color-bg-white: #FFFFFF;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--color-bg-light);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
}

/* ===== ANIMACIONES ===== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

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

/* ===== HEADER ===== */

header {
    background: var(--color-bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.4s ease-out;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

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

.nav-center {
    display: flex;
    gap: 3rem;
    flex: 1;
    justify-content: center;
}

.nav-center a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-center a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: width var(--transition-base);
    border-radius: 2px;
}

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

.nav-center a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ===== BOTONES ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-base), height var(--transition-base);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--color-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary-light);
}

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

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

/* ===== HERO ===== */

.hero {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: slideUp 0.6s ease-out 0.1s backwards;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideUp 0.6s ease-out 0.2s backwards;
}

.hero .btn {
    animation: slideUp 0.6s ease-out 0.3s backwards;
}

/* ===== GRID ===== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 2rem;
    margin: 3rem 0;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ===== TARJETAS DE PRODUCTOS ===== */

.product-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    animation: scaleIn 0.4s ease-out;
}

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

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: var(--color-bg-light);
}

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

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

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    animation: slideUp 0.4s ease-out 0.2s backwards;
}

.product-content {
    padding: 1.5rem;
}

.product-category {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.stars {
    color: var(--color-warning);
}

.product-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.product-stock {
    font-size: 0.85rem;
    color: var(--color-success);
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

.product-actions .btn {
    flex: 1;
}

/* ===== FORMULARIOS ===== */

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* ===== ESTADOS DE ÓRDENES ===== */

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.status-pendiente { background: rgba(253, 203, 110, 0.2); color: #DDA933; }
.status-por_despachar { background: rgba(9, 132, 227, 0.2); color: #0984E3; }
.status-despachando { background: rgba(156, 39, 176, 0.2); color: #9C27B0; }
.status-enviado { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.status-esperando_recogida { background: rgba(255, 152, 0, 0.2); color: #FF9800; }
.status-entregado { background: rgba(40, 167, 69, 0.2); color: #28A745; }
.status-cancelado { background: rgba(220, 53, 69, 0.2); color: #DC3545; }

/* ===== TIMELINE ===== */

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 60px;
    width: 2px;
    height: calc(100% + 1rem);
    background: var(--color-border);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-bg-white);
    border: 3px solid var(--color-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all var(--transition-base);
}

.timeline-item.active .timeline-dot {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.timeline-content h4 {
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ===== ALERTAS ===== */

.alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    animation: slideUp 0.3s ease-out;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--color-success);
    color: #155724;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--color-danger);
    color: #721C24;
}

.alert-info {
    background: rgba(9, 132, 227, 0.1);
    border-left: 4px solid var(--color-info);
    color: #004085;
}

/* ===== FOOTER ===== */

footer {
    background: var(--color-text);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

footer a:hover {
    color: white;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.1rem; }
    .nav-center { display: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .navbar { flex-direction: column; gap: 1rem; }
    .nav-right { flex-wrap: wrap; justify-content: center; }
}

/* ===== LOADING ===== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== BADGES ===== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ===== NOTIFICACIONES ===== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
    z-index: 1001;
}

.notification.error {
    background: var(--color-danger);
}

.notification.warning {
    background: var(--color-warning);
    color: var(--color-text);
}
