/* FUENTES Y VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --primary: #28a745;
    --primary-dark: #1e7e34;
    --accent: #ffd700;
    --bg: #f4f7f6;
    --text-dark: #1a202c;
    --text-light: #718096;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.08);
    --radius: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-dark);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* HEADER PREMIUM */
header {
    background: var(--white);
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky; top: 0; z-index: 1000;
}
header .container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.logo img { height: 55px; width: auto; object-fit: contain; }

nav ul { list-style: none; display: flex; gap: 25px; align-items: center; margin: 0; }
nav ul li a { 
    text-decoration: none; color: var(--text-dark); 
    font-weight: 600; font-size: 0.95rem; transition: 0.3s;
}
nav ul li a:hover { color: var(--primary); }

.btn-staff-access {
    background: #f1f5f9; color: var(--text-dark) !important;
    padding: 8px 16px; border-radius: 50px; font-size: 0.8rem !important;
    border: 1px solid #cbd5e1;
}

/* HERO SECTION PROFESIONAL */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('../images/chiriqui_hero_bg.jpg.webp') no-repeat center center/cover;
    padding: 100px 20px; text-align: center; color: var(--white);
    border-bottom-left-radius: 40px; border-bottom-right-radius: 40px;
}
.hero-section h1 { font-size: 3.5rem; font-weight: 800; margin: 0; letter-spacing: -1px; }
.hero-section p { font-size: 1.2rem; opacity: 0.9; margin: 15px 0 30px; }

/* GRID DE PRODUCTOS (VISTA CLIENTE) */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px; padding: 50px 0;
}

.product-card {
    background: var(--white); border-radius: var(--radius);
    overflow: hidden; transition: 0.3s; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; position: relative;
    border: 1px solid #edf2f7;
}
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); }

.product-card img { width: 100%; height: 240px; object-fit: cover; }

/* ETIQUETAS (BADGES) */
.badge-condition {
    position: absolute; top: 15px; left: 15px;
    padding: 5px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; color: white;
}
.new { background: #2ecc71; }
.used { background: #f39c12; }
.certified { 
    background: var(--accent); color: #000; 
    position: absolute; top: 15px; right: 15px; font-size: 0.7rem; padding: 5px 10px;
}

.product-card-body { padding: 20px; text-align: left; }
.product-card-body .brand { font-size: 0.8rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; }
.product-card-body h3 { font-size: 1.25rem; margin: 5px 0 15px; font-weight: 700; color: var(--text-dark); }
.product-card-body .price { font-size: 1.5rem; font-weight: 800; color: #e74c3c; margin-bottom: 20px; }

.btn-details {
    display: block; width: 100%; padding: 12px; border-radius: 12px;
    background: #f8fafc; color: var(--primary); text-align: center;
    text-decoration: none; font-weight: 700; border: 1px solid #e2e8f0; transition: 0.3s;
}
.btn-details:hover { background: var(--primary); color: white; }

/* DASHBOARD ADMIN (Para que tú lo veas bien) */
.admin-panel { background: white; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-md); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 15px; border-bottom: 2px solid #f1f5f9; color: var(--text-light); font-size: 0.8rem; }
.admin-table td { padding: 15px; border-bottom: 1px solid #f1f5f9; }

/* Botones Formulario Admin */
.admin-input { 
    width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 10px;
    font-size: 1rem; margin-top: 5px;
}
.btn-submit-admin {
    background: var(--primary); color: white; border: none; padding: 15px;
    border-radius: 12px; font-weight: 700; width: 100%; cursor: pointer;
}/* --- MEJORAS ESPECÍFICAS PARA EL DASHBOARD Y EDICIÓN --- */

/* Contenedor de Estadísticas Rápidas */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.stat-card span { font-size: 0.8rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; }
.stat-card strong { font-size: 1.8rem; color: var(--primary); margin-top: 5px; }

/* Tabla Mejorada */
.admin-table-wrapper {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

.admin-table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table-modern th {
    padding: 15px;
    text-align: left;
    background: #f8fafc;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-bottom: 2px solid #edf2f7;
}

.admin-table-modern td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.admin-table-modern tr:hover { background-color: #fcfdfe; }

/* Estilo de los campos en Edit */
.edit-card {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.modern-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    font-size: 1rem;
    transition: 0.3s;
    background: #fbfcfd;
}

.modern-input:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}/* =======================================================
   SECCIÓN DE DETALLES - DISEÑO MÓVIL PRIMERO (Base)
   ======================================================= */

.product-detail-page {
    padding: 10px;
    margin-bottom: 40px;
}

.product-container-white {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* Apilado vertical en móvil */
    gap: 25px;
}

.detail-image-box img {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 15px;
}

/* PRECIO GIGANTE EN MÓVIL */
.price-container {
    background: #fff5f5; /* Un toque rojizo suave de fondo */
    padding: 20px;
    border-radius: 15px;
    border: 2px dashed #feb2b2;
    margin: 10px 0;
    text-align: center;
}

.price-tag-large {
    font-size: 2.8rem; /* Tamaño muy grande para móvil */
    font-weight: 800;
    color: #e74c3c;
    display: block;
}

/* BOTÓN WHATSAPP GIGANTE Y CÓMODO */
.btn-whatsapp-modern {
    background: #25D366;
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 22px; /* Muy alto para facilitar el clic con el pulgar */
    border-radius: 18px;
    font-weight: 800;
    font-size: 1.3rem;
    margin-top: 20px;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    text-transform: uppercase;
}

/* ESPECIFICACIONES EN MÓVIL */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columnas en móvil */
    gap: 12px;
}

.spec-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #edf2f7;
}

.spec-item label {
    font-size: 0.7rem;
    color: #a0aec0;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
}

.spec-item span {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
}

/* =======================================================
   MEDIA QUERY PARA COMPUTADORA (Escritorio)
   Aquí el diseño cambia a horizontal y tamaños moderados
   ======================================================= */
@media (min-width: 992px) {
    .product-container-white {
        flex-direction: row; /* Horizontal en PC */
        padding: 50px;
        gap: 60px;
    }

    .detail-image-box {
        width: 45%;
    }

    .detail-info-box {
        width: 55%;
    }

    .product-brand-title {
        font-size: 3rem;
    }

    .price-container {
        width: auto;
        text-align: left;
        padding: 20px 40px;
        display: inline-block;
    }

    .price-tag-large {
        font-size: 3.5rem;
    }

    .btn-whatsapp-modern {
        width: fit-content; /* No ocupa todo el ancho en PC */
        padding: 18px 40px;
    }
}/* --- BUSCADOR Y FILTROS MODERNOS --- */
.filter-sidebar {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    border: 1px solid #edf2f7;
}

.filter-form-modern .filter-group-main {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.filter-form-modern .filter-group-main input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 1.1rem;
}

.btn-search {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.2rem;
}

.filter-grid-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.filter-grid-options .opt label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.filter-grid-options .opt select, 
.filter-grid-options .opt input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .filter-grid-options {
        grid-template-columns: 1fr 1fr; /* 2 columnas en celular */
    }
}/* FORZAR TIPOGRAFÍA EN TODOS LOS NAVEGADORES Y ELEMENTOS */
input, 
select, 
textarea, 
button, 
option {
    font-family: 'Montserrat', sans-serif !important; /* El !important obliga al navegador a obedecer */
    -webkit-appearance: none; /* Quita estilos automáticos de iPhone/Safari */
    -moz-appearance: none;
    appearance: none;
}

/* Específicamente para el buscador y filtros */
.filter-form-modern input, 
.filter-form-modern select,
.filter-grid-options select,
.filter-grid-options input {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important; /* Evita que el iPhone haga zoom automático al hacer clic */
    color: #1a202c !important;
}

/* Estilo para que los select tengan una flechita bonita en todos los navegadores */
.filter-grid-options .opt select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}/* --- POPUP MUNDIAL --- */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.popup-content {
    background: white; padding: 30px; border-radius: 25px;
    text-align: center; max-width: 400px; width: 90%;
    position: relative; animation: popIn 0.5s ease;
}
.timer-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* 4 columnas (días, horas, min, seg) */
    gap: 8px; 
    margin: 20px 0; 
}

.timer-box { 
    background: #e74c3c; 
    color: white; 
    padding: 10px 5px; 
    border-radius: 10px; 
}

.timer-box span { 
    display: block; 
    font-size: 1.1rem; 
    font-weight: 800; 
}

.timer-box label { 
    font-size: 0.55rem; 
    text-transform: uppercase; 
}/* Sello de VENDIDO llamativo */
.sold-badge {
    position: absolute;
    top: 20px;
    right: -10px;
    background: #e74c3c;
    color: white;
    padding: 8px 20px;
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    transform: rotate(15deg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 10;
    pointer-events: none;
}
.sold-overlay {
    filter: grayscale(80%) brightness(0.8);
}