/* --- CONFIGURACIÓN BASE --- */
html, body {
    background-color: #f2f2f7; /* Gris iOS */
    color: #1c1c1e;
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
}

/* --- LAYOUT RESPONSIVO --- */
.main-container {
    max-width: 1100px;      /* El ancho máximo que quieres en PC */
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;            /* Para que en móviles ocupe todo el ancho */
    display: block;         /* Asegura que se comporte como bloque */
}

.main-wrapper {
    width: 100%;
    display: flex;          /* Usamos Flexbox en el padre para ayudar al centrado */
    justify-content: center; 
    padding: 20px 15px 80px 15px;
}

/* --- TARJETAS APPLE STYLE --- */
.apple-card {
    background: #ffffff;
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 20px;
}

/* --- SISTEMA DE BOTONES UNIFICADO --- */
/* Botón Principal (Azul Apple) - Usar en: Nuevo Producto, Guardar */
.btn-apple-primary {
    background-color: #007aff;
    color: white;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

/* Botón Secundario (Gris Apple) - Usar en: Volver, Cancelar, Cerrar */
.btn-apple-secondary {
    background-color: #e5e5ea;
    color: #1c1c1e;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

/* Botones de Acción (Tabla) - Editar, Eliminar, Detalles */
.btn-action {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: transform 0.1s;
}

.btn-edit { background-color: #f2f2f7; color: #007aff; }
.btn-delete { background-color: #fff5f5; color: #ff3b30; }
.btn-view { background-color: #f2f2f7; color: #5856d6; }

.btn-apple-primary:hover, .btn-action:hover {
    transform: scale(0.96);
    filter: brightness(0.95);
}

/* --- TABLAS MODERNAS --- */
.table-apple {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-apple thead th {
    border: none;
    color: #8e8e93;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0 15px;
}

.table-apple tbody tr {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.table-apple td {
    padding: 15px;
    border: none;
    vertical-align: middle;
}

.table-apple td:first-child { border-radius: 15px 0 0 15px; }
.table-apple td:last-child { border-radius: 0 15px 15px 0; }

/* --- INPUTS --- */
.apple-input {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s;
    color: #111827;
}

.apple-input:focus {
    background: #ffffff;
    border-color: #007aff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.apple-input:hover {
    border-color: #d1d5db;
}


/* --- REGLAS MAESTRAS DE SCROLL Y BASE (INTEGRADAS) --- */
html, body {
    background-color: #f2f2f7; /* Gris iOS */
    color: #1c1c1e;
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    width: 100%;
    
    /* Tu configuración de scroll natural */
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Fluidez Apple */
    
    /* Soporte para el notch/isla dinámica de iPhone */
    padding-top: env(safe-area-inset-top);
}

/* Botón Volver - Estilo Superior (Slim) */
.btn-back-slim {
    font-size: 0.85rem;
    border-color: #d1d1d6;
    color: #1c1c1e;
    background-color: white;
    height: fit-content;
    transition: all 0.2s ease;
}
.btn-back-slim:hover {
    background-color: #f2f2f7;
    border-color: #c7c7cc;
    transform: translateY(-1px);
}

/* Botón Volver - Estilo Menú (Grande) */
.btn-back-menu {
    padding: 1rem 3rem;
    font-weight: 700;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}
.btn-back-menu:hover {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    transform: scale(1.02);
}

/* --- LAYOUT RESPONSIVO Y CENTRADO --- */
.main-wrapper {
    /* Mantenemos espacio para que no choque con los bordes */
    padding: 20px 15px 80px 15px; 
}


/* Mustard text for Garantía badges (centralizado) */
.text-mustard { color: #FF9500 !important; }



