/*
 * MÓDULO: Core Frontend UI / UI/UX
 * ARCHIVO: app/static/css/style.css
 * DESCRIPCIÓN: Hoja de estilos estabilizada y blindada.
 * ESTADO: AUDITADO / SANITIZADO
 * FECHA: 01-07-26
 */
/* 
   RetailOS 2026 - Legacy Styles (Refactored)
   Fecha Migración: 22 Enero 2026
   Estado: GRID LAYOUT (Flexbox Removed)
*/

:root {
    --background: #f0f4f8;
    --foreground: #111111;
    --muted: #64748b;
    --muted-foreground: #94a3b8;
    --popover: #ffffff;
    --popover-foreground: #111111;
    --card: #ffffff;
    --card-foreground: #111111;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --primary: #111111;
    --primary-foreground: #ffffff;
    --secondary: #f4f4f7;
    --secondary-foreground: #111111;
    --accent: #f4f4f7;
    --accent-foreground: #111111;
    --destructive: #d30005;
    --destructive-foreground: #ffffff;
    --ring: #111111;
    --radius: 0px !important;
    --font-sans: "Inter", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    /* SOLUCIÓN STICKY FOOTER CON FLEXBOX */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--muted-foreground);
}

/* Maintain compatibility with legacy classes if needed, but rely on Bootstrap */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Ensure Main takes available space */
main {
    width: 100%;
    min-width: 0;
    /* FIX 17-09-2026 (A-06): mismo motivo que en design_system_2026.css. `clip`
       contiene el desborde sin anular `position: sticky` en los descendientes;
       `hidden` queda como respaldo para navegadores sin soporte. Guardia STICKY-001. */
    overflow-x: hidden;
    overflow-x: clip;
}

/* --- PREMIUM PRODUCT CARD COMPONENT (2026 - BENTO ORTOGONAL) --- */
.product-card {
    border: 1px solid var(--border) !important;
    border-radius: 0px !important;
    background-color: var(--card);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: none !important;
    border-color: var(--primary) !important;
}

/* Hover Overlay Logic */
.group-hover-opacity {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.product-card:hover .group-hover-opacity {
    opacity: 1;
    pointer-events: auto;
}

/* Button Animation */
.transform-up-hover {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.product-card:hover .transform-up-hover {
    transform: translateY(0);
}

/* Image Zoom */
.group-hover-scale {
    transition: transform 0.5s ease;
}

.product-card:hover .group-hover-scale {
    transform: scale(1.08);
}

/* Text Truncation */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}