/* Variables de color basadas en tu logo */
:root {
    --primary-color: #DDA7A5; /* Oro rosado/Cobre del logo */
    --bg-light: #FFF5F7; /* Fondo rosa muy pálido */
    --text-dark: #333333;
    --text-light: #777777;
    --white: #FFFFFF;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

/* --- Header --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    height: 60px; /* Ajusta según necesites */
    object-fit: contain;
}

.navbar a {
    text-decoration: none;
    color: var(--text-dark);
    margin: 0 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

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

.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-actions a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
}

.login-btn {
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

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

.cart-count {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    vertical-align: top;
}

/* --- Hero Section --- */
.hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(255, 245, 247, 0.8), rgba(255, 245, 247, 0.8)), url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Products --- */
.products-section {
    padding: 4rem 5%;
    text-align: center;
}

.products-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img-placeholder {
    height: 300px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.btn-add {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--text-dark);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

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

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--white);
    color: var(--text-light);
    margin-top: 2rem;
}

/* --- Responsive Básicos --- */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }
    .navbar {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* --- Estilos del Dashboard (Sistema Interno) --- */
.dashboard-body {
    background-color: #f4f6f9; /* Un fondo gris muy claro para el sistema */
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    padding: 1rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.sidebar-footer a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Contenido Principal */
.main-content {
    flex: 1;
    margin-left: 250px; /* Deja espacio para el sidebar fijo */
    padding: 2rem 3rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.topbar h2 {
    color: var(--text-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.avatar {
    background-color: var(--primary-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tarjetas de Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    background-color: var(--bg-light);
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-details h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.stat-details p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Área de trabajo */
.workspace-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    min-height: 300px;
}

/* =======================================================
   DISEÑO RESPONSIVO (MÓVILES Y TABLETS)
   ======================================================= */

.mobile-header { display: none; }

@media screen and (max-width: 768px) {
    /* 1. Contenedor Principal */
    body { margin: 0; padding: 0; overflow-x: hidden; }
    .dashboard-container { display: flex; flex-direction: column; width: 100%; }

    /* 2. Menú Lateral -> Barra Superior con Hamburguesa */
    /* Añadimos position: relative !important para evitar que quede fijo flotando encima del texto */
    .sidebar { 
        position: relative !important; 
        width: 100%; 
        height: auto; 
        min-height: auto !important;
        padding: 0; 
        flex-direction: column; 
        background-color: #2c3e50; 
    }
    
    .desktop-only { display: none !important; }
    
    .mobile-header { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        padding: 15px 20px; 
        background-color: #1a252f; 
    }
    
    /* CORRECCIÓN LOGO: Ancho igual al alto y object-fit cover */
    .mobile-logo-img { 
        height: 40px; 
        width: 40px; 
        border-radius: 50%; 
        object-fit: cover; 
    }
    
    .hamburger-btn { background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; transition: 0.3s; }
    .hamburger-btn:active { opacity: 0.5; }

    .sidebar-menu-container { display: none; flex-direction: column; width: 100%; background-color: #2c3e50; }
    .sidebar.open .sidebar-menu-container { display: flex; }

    .sidebar-nav { flex-direction: column; padding: 0; }
    .sidebar-nav a { padding: 15px 20px; font-size: 1rem; border-left: 4px solid transparent; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .sidebar-nav a.active { border-left: 4px solid #3498db; background-color: #34495e; }
    .sidebar-footer { padding: 15px 20px; display: flex; justify-content: flex-start; }

    /* 3. Contenido Principal y Formularios */
    /* CORRECCIÓN ESPACIOS: Margin-left 0 para centrar todo y más padding-top para respirar */
    .main-content { 
        margin-left: 0 !important; 
        padding: 25px 15px; 
        width: 100%; 
        box-sizing: border-box; 
    }
    
    .topbar { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 15px; 
        margin-bottom: 20px;
    }
    
    .form-grid, .settings-grid { grid-template-columns: 1fr !important; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-filters { flex-direction: column; width: 100%; }
    .search-filters input, .search-filters select, .btn-primary { width: 100%; box-sizing: border-box; margin-bottom: 10px; }
    .modal-content { width: 95%; padding: 1.5rem; margin: 10px; box-sizing: border-box; }
    .pos-container { grid-template-columns: 1fr !important; height: auto; }
    .products-panel { max-height: 50vh; overflow-y: auto; }
    
    /* Aseguramos que las tarjetas tomen todo el ancho */
    .stats-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; width: 100%; }
}
