/* static/css/styles.css */

/* =========================================
   1. VARIABLES & BRANDING
   ========================================= */
:root {
    --sni-primary: #14532d;
    --sni-primary-hover: #14532d;
    --sni-accent: #0ea5e9;
    --sni-gold: #d97706;

    --bg-body: #f8fafc;
    --surface: #ffffff;
    --surface-secondary: #f1f5f9;
    
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    --glass-bg: rgba(255, 255, 255, 0.90);
    --glass-border: rgba(255, 255, 255, 0.5);
    --backdrop-blur: blur(16px);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --surface: #1e293b;
    --surface-secondary: #334155;
    
    --text-main: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #334155;
    
    --sni-primary: #81A98F;
    --sni-primary-hover: #81A98F;

    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* =========================================
   2. GLOBAL RESET & BASE
   ========================================= */
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a { text-decoration: none; transition: all 0.2s ease; }
ul { list-style: none; padding: 0; margin: 0; }

/* Utilitarios */
.text-primary { color: var(--sni-primary) !important; }
.text-accent { color: var(--sni-accent) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-main { color: var(--text-main) !important; }
.text-muted-2 { color: var(--text-muted) !important; }
.text-sm { font-size: 0.8rem !important}
.text-md { font-size: 1rem !important}
.bg-surface { background-color: var(--surface); }
.bg-primary { background-color: var(--sni-primary) !important }

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* =========================================
   3. COMPONENTS
   ========================================= */

/* --- Buttons --- */
.btn-sni-primary {
    background-color: var(--sni-primary);
    color: var(--text-inverse);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-sni-primary:hover {
    background-color: var(--sni-primary);
    transform: translateY(-2px);
    color: var(--text-inverse);
}
.btn-sni-primary:active {
    background-color: var(--sni-primary);
    color: var(--text-inverse) !important;
    transform: scale(0.98);
}

.btn-sni-white {
    background-color: white;
    color: var(--sni-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none !important;
}

.btn-sni-white:hover {
    transform: translateY(-2px);
}
.btn-sni-white:active {
    transform: scale(0.98);
}

.btn-sni-outline {
    background: transparent;
    border: 1px solid var(--sni-primary);
    color: var(--sni-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-sni-outline:hover, 
.btn-sni-outline:focus-visible {
    background-color: var(--sni-primary);
    color: white;
    border-color: var(--sni-primary);
    outline: none;
}

.btn-sni-outline:active {
    transform: scale(0.98);
    background: transparent;
    border-color: var(--sni-primary) !important;
    color: var(--sni-primary) !important;
}


.btn-sni-outline-white {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-decoration: none !important;
}


.btn-sni-outline-white:hover, 
.btn-sni-outline-white:focus-visible {
    background-color: white;
    color: var(--sni-primary);
    border-color: white;
    outline: none;
}

.btn-sni-outline-white:active {
    transform: scale(0.98);
    background: transparent;
    border-color: white;
    color: white;
}


.logo-img {
    height: 45px;
    width: auto;
    border-radius: 50%; /* Si el logo es cuadrado, esto lo hace circular */
}


/* Animation Utils */
.fade-in-up { animation: fadeInUp 0.8s ease-out; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

 .background-glass {
    background-color: var(--glass-bg);
 }

 /* =========================================
   4. OPTIMIZACIONES DE ESPACIO (HOME COMPACTO)
   ========================================= */

/* Hacemos la imagen perfectamente cuadrada */
.card-img-wrapper.square-ratio {
    height: auto;
    aspect-ratio: 1 / 1; /* Relación de aspecto cuadrada exacta */
    position: relative;
    overflow: hidden;
}

.fs-xs {
    font-size: 0.7rem;
}


/* Badge más discreto */
.card-badge.small-badge {
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
}

/* Precio dentro de la imagen para ahorrar espacio vertical */
.price-overlay {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    backdrop-filter: blur(2px);
}

/* Shadow del texto en el hero */
.text-shadow {
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}


.input-icon-addon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.input-text-addon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-icon {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
}
.btn-icon:hover, .btn-icon:active {
    background-color: transparent;
    color: var(--sni-primary) !important;
    border-color: var(--sni-primary) !important;
}

@media (max-width: 768px) {
    .mt-md-only-4 {
        margin-top: 1.5rem;
    }
}
@media (min-width: 768px) {
    .mt-lg-only-4 {
        margin-top: 1.5rem;
    }
}

.border-bottom-sni {
    border-bottom: 1px solid var(--border-color) !important;
}

