/* ==========================================================================
   BRIGANDY Quick — Estilos Oficiales PWA Móvil (FASE 2)
   Identidad: Verde Botella (#163D32), Verde Profundo (#0D2822), Crema Cálido (#F7F3EA), Ámbar (#D99A35).
   ========================================================================== */

:root {
    --bg-verde-botella: #163D32;
    --bg-verde-hover: #1E5042;
    --bg-verde-profundo: #0D2822;
    --bg-crema-calido: #F7F3EA;
    --bg-crema-card: #FAF7F2;
    --bg-ambar: #D99A35;
    --bg-ambar-dark: #C58827;
    --bg-carbon: #202522;
    --bg-border: #E5DFC8;
    --color-success: #10B981;
    --color-danger: #EF4444;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-verde-profundo);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Safe areas para iOS notch y barra de navegación de Android */
.safe-top {
    padding-top: max(env(safe-area-inset-top, 0px), 12px);
}

.safe-bottom {
    padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 12px), 16px);
}

/* Ocultar barra de scroll nativa para apariencia limpia de aplicación nativa */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Áreas de interacción táctil ergonómicas (mínimo 48px) */
.touch-target {
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* Botones y controles táctiles */
button, input, select, textarea {
    touch-action: manipulation;
}

/* Retroalimentación táctil activa */
.btn-press:active {
    transform: scale(0.97);
    transition: transform 0.08s ease;
}

/* Chips de categorías y filtros */
.chip-filter {
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    touch-action: manipulation;
}
.chip-filter.active {
    background-color: var(--bg-verde-botella);
    color: var(--bg-crema-calido);
    border-color: var(--bg-verde-botella);
    font-weight: 700;
}
.chip-filter:not(.active) {
    background-color: #FFFFFF;
    color: var(--bg-carbon);
    border-color: var(--bg-border);
}

/* Stepper de cantidad en carrito */
.qty-stepper-btn {
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    transition: background-color 0.1s ease;
}

/* Transiciones de Bottom Sheets y Modales */
.sheet-backdrop {
    background-color: rgba(13, 40, 34, 0.7);
    backdrop-filter: blur(4px);
    transition: opacity 0.25s ease-out;
}

.sheet-content {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animaciones sutiles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #D99A35;
    border-radius: 50%;
    animation: spinSlow 0.8s linear infinite;
}

/* Visibilidad de pantallas resiliente ante latencia de red */
.hidden {
    display: none !important;
}
