/* ============================================================
   LOCALWISE 2.0 — Design System CSS
   Mobile-first. Nunca usar !important ni colores hardcoded.
   ============================================================ */

/* ------------------------------------------------------------
   1. Google Fonts
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* ------------------------------------------------------------
   2. CSS Custom Properties (Design Tokens)
   ------------------------------------------------------------ */
:root {
    /* ===== PRIMARIO - Azul Localwise ===== */
    --primary-50:  #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #2563eb;
    --primary-600: #1d4ed8;
    --primary-700: #1e40af;
    --primary-800: #1e3a8a;
    --primary-900: #172554;

    /* ===== ACENTO - Ámbar/Naranja ===== */
    --accent-50:  #fffbeb;
    --accent-100: #fef3c7;
    --accent-200: #fde68a;
    --accent-300: #fcd34d;
    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    --accent-700: #b45309;

    /* ===== ÉXITO - Verde ===== */
    --success-50:  #ecfdf5;
    --success-100: #d1fae5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;

    /* ===== ERROR - Rojo ===== */
    --error-50:  #fef2f2;
    --error-100: #fee2e2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;

    /* ===== WARNING - Amarillo ===== */
    --warning-50:  #fefce8;
    --warning-500: #eab308;
    --warning-600: #ca8a04;

    /* ===== NEUTROS ===== */
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* ===== SUPERFICIES ===== */
    --surface:          #ffffff;
    --surface-hover:    #f8fafc;
    --surface-elevated: #ffffff;
    --background:       #f1f5f9;
    --overlay:          rgba(15, 23, 42, 0.5);

    /* ===== WHATSAPP ===== */
    --whatsapp:       #25D366;
    --whatsapp-hover: #20BD5A;

    /* ===== TIPOGRAFÍA ===== */
    --font-body:    'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;

    /* ===== ESPACIADO ===== */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* ===== BORDES ===== */
    --radius-sm:   0.375rem;
    --radius-md:   0.5rem;
    --radius-lg:   0.75rem;
    --radius-xl:   1rem;
    --radius-full: 9999px;

    /* ===== SOMBRAS ===== */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* ===== TRANSICIONES ===== */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ------------------------------------------------------------
   3. Reset CSS
   ------------------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-500);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

h1, h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-800);
}

h5, h6 {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--gray-700);
}

p {
    color: var(--gray-600);
}

/* ------------------------------------------------------------
   4. Layout — Container y Grid
   ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.grid {
    display: grid;
    gap: var(--space-4);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* En móvil, todas las grids son de 1 columna */
@media (max-width: 639px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* Padding para la nav-bottom móvil */
.main-content {
    padding-bottom: 70px; /* Espacio para nav-bottom */
}

@media (min-width: 768px) {
    .main-content {
        padding-bottom: 0;
    }
}

/* ------------------------------------------------------------
   5. Utilidades
   ------------------------------------------------------------ */
.hidden        { display: none; }
.block         { display: block; }
.inline-block  { display: inline-block; }
.text-center   { text-align: center; }
.text-left     { text-align: left; }
.text-right    { text-align: right; }
.w-full        { width: 100%; }
.h-full        { height: 100%; }
.relative      { position: relative; }
.absolute      { position: absolute; }
.overflow-hidden { overflow: hidden; }
.rounded       { border-radius: var(--radius-md); }
.rounded-full  { border-radius: var(--radius-full); }

/* Espaciado utilitario */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

/* Texto */
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-heading { font-family: var(--font-heading); }

.text-primary  { color: var(--primary-500); }
.text-accent   { color: var(--accent-500); }
.text-success  { color: var(--success-500); }
.text-error    { color: var(--error-500); }
.text-muted    { color: var(--gray-500); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }
.text-white    { color: #ffffff; }

/* Responsive utilities */
@media (max-width: 767px) {
    .hide-mobile,
    a.hide-mobile,
    button.hide-mobile,
    div.hide-mobile { display: none; }
}

@media (min-width: 768px) {
    .hide-desktop,
    a.hide-desktop,
    button.hide-desktop,
    div.hide-desktop { display: none; }
}

/* ------------------------------------------------------------
   6. Botones
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    font-size: var(--text-sm);
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
    line-height: 1;
}

.btn:focus-visible {
    outline: 3px solid var(--primary-300);
    outline-offset: 2px;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: var(--text-xs);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--text-base);
}

.btn-block { width: 100%; }

.btn-primary {
    background: var(--primary-500);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-600);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent-500);
    color: #ffffff;
}

.btn-accent:hover {
    background: var(--accent-600);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-500);
    color: #ffffff;
}

.btn-success:hover {
    background: var(--success-600);
    color: #ffffff;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #ffffff;
}

.btn-whatsapp:hover {
    background: var(--whatsapp-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-500);
}

.btn-outline:hover {
    background: var(--primary-500);
    color: #ffffff;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-danger {
    background: var(--error-500);
    color: #ffffff;
}

.btn-danger:hover {
    background: var(--error-600);
    color: #ffffff;
}

/* ------------------------------------------------------------
   7. Formularios
   ------------------------------------------------------------ */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--gray-700);
    margin-bottom: var(--space-1);
}

.form-label .required {
    color: var(--error-500);
    margin-left: var(--space-1);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--gray-800);
    background: var(--surface);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--gray-400);
}

.form-input.is-error,
.form-select.is-error,
.form-textarea.is-error {
    border-color: var(--error-500);
}

.form-input.is-error:focus,
.form-select.is-error:focus {
    box-shadow: 0 0 0 3px var(--error-100);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-help {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--space-1);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--error-500);
    margin-top: var(--space-1);
}

/* Checkbox y Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-500);
    cursor: pointer;
}

/* ------------------------------------------------------------
   8. Cards
   ------------------------------------------------------------ */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card__body {
    padding: var(--space-4);
}

.card__header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-100);
}

.card__footer {
    padding: var(--space-4);
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* Product Card */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gray-100);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.product-card__body {
    padding: var(--space-3);
}

.product-card__title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-1);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card__price {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--accent-600);
}

.product-card__price--sale {
    color: var(--error-500);
}

.product-card__price--original {
    font-size: var(--text-sm);
    color: var(--gray-400);
    text-decoration: line-through;
    font-weight: 400;
}

.product-card__business {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--space-1);
    display: block;
}

.product-card__business:hover {
    color: var(--primary-500);
}

/* Business Card */
.business-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.business-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.business-card__banner {
    height: 120px;
    background: var(--primary-100);
    position: relative;
    overflow: hidden;
}

.business-card__banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-card__logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    border: 3px solid var(--surface);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    position: absolute;
    bottom: -24px;
    left: var(--space-4);
    overflow: hidden;
}

.business-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-card__body {
    padding: var(--space-4);
    padding-top: calc(var(--space-4) + 24px);
}

.business-card__name {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.business-card__category {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

/* ------------------------------------------------------------
   9. Badges
   ------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1;
}

.badge-open     { background: var(--success-50);  color: var(--success-700); }
.badge-closed   { background: var(--error-50);    color: var(--error-700); }
.badge-category { background: var(--primary-50);  color: var(--primary-700); }
.badge-price    { background: var(--accent-50);   color: var(--accent-700); font-weight: 700; }
.badge-verified { background: var(--primary-100); color: var(--primary-700); }
.badge-new      { background: var(--success-100); color: var(--success-700); }

/* ------------------------------------------------------------
   10. Alertas / Mensajes
   ------------------------------------------------------------ */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    border: 1px solid transparent;
    margin-bottom: var(--space-4);
}

.alert-success {
    background: var(--success-50);
    color: var(--success-700);
    border-color: var(--success-100);
}

.alert-error {
    background: var(--error-50);
    color: var(--error-700);
    border-color: var(--error-100);
}

.alert-warning {
    background: var(--warning-50);
    color: var(--warning-600);
    border-color: #fef08a;
}

.alert-info {
    background: var(--primary-50);
    color: var(--primary-700);
    border-color: var(--primary-100);
}

/* ------------------------------------------------------------
   11. Header
   ------------------------------------------------------------ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 var(--space-4);
    max-width: 1280px;
    margin: 0 auto;
}

.site-header__logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--primary-500);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-header__logo span {
    color: var(--accent-500);
}

.site-header__nav {
    display: none;
}

@media (min-width: 768px) {
    .site-header__nav {
        display: flex;
        align-items: center;
        gap: var(--space-6);
    }
}

.site-header__nav a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-600);
    transition: color var(--transition-base);
}

.site-header__nav a:hover,
.site-header__nav a.active {
    color: var(--primary-500);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Burger menu (solo móvil) */
.site-header__burger {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--gray-700);
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .site-header__burger {
        display: none;
    }
}

/* ------------------------------------------------------------
   12. Footer
   ------------------------------------------------------------ */
.site-footer {
    background: var(--primary-900);
    color: var(--primary-100);
    padding: var(--space-10) 0 var(--space-6);
    margin-top: var(--space-16);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .site-footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.site-footer__logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: var(--space-3);
    display: block;
}

.site-footer__logo span {
    color: var(--accent-400);
}

.site-footer__desc {
    font-size: var(--text-sm);
    color: var(--primary-200);
    line-height: 1.7;
}

.site-footer__title {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
}

.site-footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.site-footer__links a {
    font-size: var(--text-sm);
    color: var(--primary-200);
    transition: color var(--transition-base);
}

.site-footer__links a:hover {
    color: var(--accent-400);
}

.site-footer__bottom {
    border-top: 1px solid var(--primary-800);
    padding-top: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: center;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--gray-500);
}

@media (min-width: 768px) {
    .site-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ------------------------------------------------------------
   13. Nav Bottom (móvil)
   ------------------------------------------------------------ */
.nav-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--gray-100);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: flex;
    padding: var(--space-2) 0;
    padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
    .nav-bottom {
        display: none;
    }
}

.nav-bottom__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--gray-400);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    padding: var(--space-1) var(--space-2);
    transition: color var(--transition-base);
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
}

.nav-bottom__item.active,
.nav-bottom__item:hover {
    color: var(--primary-500);
}

.nav-bottom__icon {
    width: 24px;
    height: 24px;
}

/* Cart badge */
.nav-bottom__badge {
    position: relative;
}

.nav-bottom__badge-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--error-500);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ------------------------------------------------------------
   14. Íconos
   ------------------------------------------------------------ */
.icon    { display: inline-block; vertical-align: middle; }
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 32px; height: 32px; }

/* ------------------------------------------------------------
   15. Section — Secciones de página
   ------------------------------------------------------------ */
.section {
    padding: var(--space-10) 0;
}

.section-sm {
    padding: var(--space-6) 0;
}

.section__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.section__subtitle {
    font-size: var(--text-base);
    color: var(--gray-500);
    margin-bottom: var(--space-6);
}

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

/* ------------------------------------------------------------
   16. Hero Section
   ------------------------------------------------------------ */
.hero {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 60%, var(--primary-400) 100%);
    color: #ffffff;
    padding: var(--space-12) 0;
    text-align: center;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
    .hero__title {
        font-size: var(--text-4xl);
    }
}

.hero__subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Bar */
.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.search-bar__input {
    flex: 1;
    padding: var(--space-4);
    border: none;
    font-size: var(--text-base);
    font-family: var(--font-body);
    color: var(--gray-800);
    background: transparent;
}

.search-bar__input:focus {
    outline: none;
}

.search-bar__btn {
    background: var(--accent-500);
    color: #ffffff;
    border: none;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-base);
    font-family: var(--font-body);
}

.search-bar__btn:hover {
    background: var(--accent-600);
}

/* ------------------------------------------------------------
   17. Category Pills
   ------------------------------------------------------------ */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1.5px solid var(--gray-200);
    color: var(--gray-700);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
    cursor: pointer;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: #ffffff;
}

.categories-scroll {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* ------------------------------------------------------------
   18. Tablas (para dashboard)
   ------------------------------------------------------------ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    font-size: var(--text-sm);
}

.table thead {
    background: var(--gray-50);
}

.table th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    padding: var(--space-3) var(--space-4);
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ------------------------------------------------------------
   19. Avatar
   ------------------------------------------------------------ */
.avatar {
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--gray-200);
    flex-shrink: 0;
}

.avatar-sm { width: 32px;  height: 32px; }
.avatar-md { width: 48px;  height: 48px; }
.avatar-lg { width: 64px;  height: 64px; }
.avatar-xl { width: 96px;  height: 96px; }

/* ------------------------------------------------------------
   20. Animaciones
   ------------------------------------------------------------ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}

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

.animate-fade-in  { animation: fadeIn  var(--transition-slow) ease forwards; }
.animate-slide-up { animation: slideUp var(--transition-slow) ease forwards; }
.animate-pulse    { animation: pulse   1.5s ease infinite; }
.animate-spin     { animation: spin    1s linear infinite; }

/* Accesibilidad: reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none;
        transition: none;
    }
}

/* ------------------------------------------------------------
   21. Skeleton loader
   ------------------------------------------------------------ */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ------------------------------------------------------------
   22. Spinner
   ------------------------------------------------------------ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ------------------------------------------------------------
   23. Empty State
   ------------------------------------------------------------ */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-4);
    color: var(--gray-500);
}

.empty-state__icon {
    margin: 0 auto var(--space-4);
    color: var(--gray-300);
}

.empty-state__title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.empty-state__text {
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}
