/* John Barbas - Redesign 2024 (Clean & WhatsApp Focused) */

/* ========================================
   VARIABLES CSS - Sistema de Colores Limpio
======================================== */
:root {
    /* Paleta Principal - Tonos más sobrios y profesionales */
    --primary: #2563eb;      /* Azul profesional */
    --primary-dark: #1e40af;
    --whatsapp: #25D366;     /* WhatsApp oficial */
    --whatsapp-dark: #128C7E;
    
    /* Tonos Neutros */
    --bg-body: #f3f4f6;      /* Gris muy suave para fondo */
    --bg-card: #ffffff;      /* Blanco puro para tarjetas */
    --text-main: #1f2937;    /* Gris oscuro para lectura */
    --text-muted: #6b7280;   /* Gris medio para secundarios */
    --border-color: #e5e7eb; /* Bordes sutiles */

    /* Espaciado y Redondeo */
    --radius-card: 16px;
    --radius-btn: 12px;
    --spacing-unit: 1rem;

    /* Sombras Suaves (Soft 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);
    
    /* Tipografía */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* ========================================
   RESET & BASE
======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* ========================================
   LAYOUT PRINCIPAL
======================================== */
.main-container {
    width: 100%;
    max-width: 480px; /* Ancho típico de móvil/app */
    margin: 0 auto;
    background-color: transparent;
}

/* ========================================
   NAVEGACIÓN
======================================== */
.unified-nav {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-tab i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-tab.active {
    color: var(--primary);
    background-color: #eff6ff; /* Azul muy claro */
    font-weight: 600;
}

.nav-tab:hover:not(.active) {
    background-color: #f9fafb;
    color: var(--text-main);
}

/* ========================================
   HEADER
======================================== */
.page-header {
    text-align: center;
    margin-bottom: 25px;
    background: var(--bg-card);
    padding: 30px 20px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    margin-bottom: 15px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 15px;
}

.page-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto;
}

/* ========================================
   TARJETAS (CARDS)
======================================== */
.unified-card, .product-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.unified-card:hover, .product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.card-content {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ========================================
   BOTONES
======================================== */
.btn-unified {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    transition: transform 0.1s, box-shadow 0.1s;
    gap: 10px;
    border: none;
    cursor: pointer;
}

.btn-unified:active {
    transform: scale(0.98);
}

/* Botón WhatsApp (Principal) */
.btn-whatsapp {
    background-color: var(--whatsapp);
    color: white;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    font-size: 1.1rem; /* Ligeramente más grande */
}

.btn-whatsapp:hover {
    background-color: var(--whatsapp-dark);
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}

/* Botón Primario (Acciones Secundarias) */
.btn-primary {
    background-color: var(--bg-card);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: #eff6ff;
}

/* Botón Secundario (Enlaces externos) */
.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Botón Warning (Para avisos o compras especiales) */
.btn-warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fcd34d;
}

/* ========================================
   PRODUCTOS
======================================== */
.product-content {
    display: flex;
    gap: 15px;
}

.product-image-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.product-info {
    flex-grow: 1;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* ========================================
   ESTADÍSTICAS
======================================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.stat-item {
    background: #f9fafb;
    padding: 10px;
    border-radius: 10px;
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   FOOTER
======================================== */
.unified-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 30px;
    padding-bottom: 80px; /* Espacio para el botón flotante */
}

.unified-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   BOTÓN FLOTANTE
======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: var(--whatsapp-dark);
}

/* ========================================
   UTILIDADES
======================================== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.w-100 { width: 100%; }

/* Video Responsive */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    margin: 10px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Badge */
.product-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
}

/* ========================================
   MEDIA QUERIES
======================================== */
@media (max-width: 400px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    .product-content {
        flex-direction: column;
    }
    .product-image-container {
        width: 100%;
        height: 150px;
    }
}