/* ============================================================================
   Feria Paseo de Compras - Las Heras (Mendoza, Argentina)
   Hoja de Estilos Principal (Mobile-First, Diseño Moderno Marketplace)
   ============================================================================ */

:root {
    --bg-body: #eef7ff;
    --bg-card: #ffffff;
    --text-main: #0b192c;
    --text-secondary: #1e3a5f;
    --text-muted: #4b6584;
    --border-color: #93c5fd;
    --primary: #0072ff;
    --primary-hover: #0056cc;
    --primary-soft: #e0f2fe;
    --sky-accent: #00a8ff;
    --gold-accent: #ffdd00;
    --gold-border: #f59e0b;
    --wood-bg: #a45a2a;
    --wood-dark: #6e3815;
    --whatsapp: #16a34a;
    --whatsapp-hover: #15803d;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --warning: #d97706;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-pill: 9999px;
    --shadow-sm: 0 3px 10px rgba(0, 114, 255, 0.10);
    --shadow-md: 0 8px 22px rgba(0, 90, 210, 0.15);
    --shadow-hover: 0 14px 30px rgba(0, 114, 255, 0.24);
    --font-display: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
    --font-script: 'Kaushan Script', cursive;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    background-image: radial-gradient(circle at 15% 15%, rgba(0, 168, 255, 0.12) 0%, transparent 45%),
                      radial-gradient(circle at 85% 80%, rgba(255, 221, 0, 0.14) 0%, transparent 45%);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
}

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

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 14px;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   Header / Navegación
   ============================================================================ */
.site-header {
    background: linear-gradient(90deg, #0066eb 0%, #00a8ff 50%, #0066eb 100%);
    border-bottom: 4px solid var(--gold-accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 90, 210, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    gap: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid var(--gold-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.08rem;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-shadow: 0 2px 0 #051937, 0 3px 6px rgba(0, 0, 0, 0.35);
}

.brand-subtitle {
    font-size: 0.76rem;
    color: var(--gold-accent);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ============================================================================
   Botones
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.82rem;
}

.btn-xs {
    padding: 5px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
}

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

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-outline {
    background-color: #ffffff;
    color: var(--text-main);
    border-color: #cbd5e1;
}
.btn-outline:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.btn-danger {
    background-color: #fef2f2;
    color: var(--danger);
    border-color: #fecaca;
}
.btn-danger:hover {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-warning {
    background-color: #fffbeb;
    color: var(--warning);
    border-color: #fde68a;
}
.btn-warning:hover {
    background-color: var(--warning);
    color: #ffffff;
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: #ffffff;
    width: 100%;
    padding: 9px 10px;
    font-size: 0.82rem;
    line-height: 1.25;
    white-space: normal;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.22);
    margin-top: auto;
}
.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    transform: translateY(-1px);
}

.wa-icon {
    flex-shrink: 0;
}

/* ============================================================================
   Hero, Buscador y Píldoras de Categorías
   ============================================================================ */
.hero-search {
    background: linear-gradient(180deg, #d8eeff 0%, #eef7ff 100%);
    border-bottom: 3px solid #93c5fd;
    padding: 18px 0 16px;
}

/* Portada Oficial del Paseo de Compras B° Municipal */
.hero-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    border: 3px solid #ffffff;
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-md);
    color: #ffffff;
}

.hero-poster-card {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    border: 4px solid var(--gold-accent);
    box-shadow: 0 10px 25px rgba(5, 25, 55, 0.38);
    background: #0b192c;
}

.hero-poster-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.hero-welcome-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.hero-wood-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, #b86b35 0%, #8a481c 100%);
    border: 2px solid #f7d794;
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 5px 14px;
    border-radius: 10px;
    box-shadow: 0 3px 0 #5a2d0c;
}

.hero-display-title {
    margin: 2px 0;
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0.02em;
    color: #0b192c;
    text-transform: uppercase;
    /* Efecto de cartel negro con borde celeste/blanco como el flyer */
    text-shadow:
        -2px -2px 0 #ffffff,
         2px -2px 0 #ffffff,
        -2px  2px 0 #ffffff,
         2px  2px 0 #ffffff,
         0px  4px 10px rgba(0, 0, 0, 0.35);
}

.hero-display-title span {
    display: block;
    color: #051937;
}

.hero-script-Lead {
    margin: 0;
    font-family: var(--font-script);
    font-size: 1.45rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-time-pill {
    font-family: var(--font-display);
    font-size: 1.05rem;
    background-color: var(--gold-accent);
    color: #0b192c;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    border: 2px solid #0b192c;
    box-shadow: 0 3px 0 #0b192c;
    text-shadow: none;
}

.hero-subtext {
    margin: 0;
    font-size: 0.92rem;
    color: #f0f9ff;
    line-height: 1.45;
}

.hero-subtext strong {
    color: var(--gold-accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.auth-poster-link {
    display: inline-block;
    margin-bottom: 10px;
}

.auth-poster-thumb {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
    margin: 0 auto;
}

.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

/* Buscador Dual: Palabra clave + Selector de Feriante */
.search-bar-dual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.feriante-select-wrap select {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
    cursor: pointer;
}

.feriante-select-wrap select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Directorio Visual de Feriantes (Buscador de Puestos) */
.feriantes-directory {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.feriantes-dir-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.feriantes-dir-title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.88rem;
}

.feriantes-dir-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.feriante-quick-input {
    padding: 6px 11px;
    font-family: inherit;
    font-size: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-pill);
    min-width: 210px;
}

.feriantes-cards-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.feriante-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    color: var(--text-main);
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.16s ease;
    text-align: left;
}

.feriante-chip:hover {
    border-color: var(--primary);
    background-color: var(--primary-soft);
}

.feriante-chip.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.feriante-chip-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.feriante-chip.active .feriante-chip-avatar {
    background-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.feriante-chip-info {
    display: flex;
    flex-direction: column;
}

.feriante-chip-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}

.feriante-chip-count {
    font-size: 0.7rem;
    opacity: 0.8;
}

.feriante-chip-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-accent);
    flex-shrink: 0;
    background-color: #ffffff;
}

.seller-mini-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--primary);
    flex-shrink: 0;
}

/* Tarjeta / Banner del Feriante Seleccionado (con Header, Foto de Perfil y Descripción Opcional) */
.selected-feriante-card {
    margin-top: 16px;
    background: #ffffff;
    border: 3px solid #38bdf8;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.selected-feriante-cover {
    width: 100%;
    height: 95px;
    background: linear-gradient(135deg, #0072ff 0%, #00c6ff 55%, #38bdf8 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--gold-accent);
}

.selected-feriante-cover.has-custom-header {
    height: 165px;
}

.selected-feriante-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.selected-feriante-content {
    padding: 14px 18px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.selected-feriante-identity {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 240px;
}

.selected-feriante-avatar {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    margin-top: -46px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #0072ff 0%, #00a8ff 100%);
    color: #ffffff;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0, 90, 210, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.selected-feriante-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-feriante-badge {
    display: inline-block;
    background: linear-gradient(180deg, #b86b35 0%, #8a481c 100%);
    color: #ffffff;
    border: 1.5px solid #fde68a;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.selected-feriante-info h2 {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.selected-feriante-desc {
    margin: 4px 0 6px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    background: #e0f2fe;
    border-left: 3px solid var(--primary);
    padding: 6px 10px;
    border-radius: 0 8px 8px 0;
    line-height: 1.4;
}

.selected-feriante-meta {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Vista previa de Portada (Header) + Foto de Perfil en panel.html */
.stall-branding-preview {
    border: 2px solid #93c5fd;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 4px;
}

.stall-header-preview {
    width: 100%;
    height: 105px;
    background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--gold-accent);
}

.stall-header-placeholder {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(11, 25, 44, 0.35);
    border-radius: var(--radius-pill);
}

.stall-header-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stall-avatar-preview-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 10px;
}

.stall-avatar-preview {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin-top: -32px;
    position: relative;
    z-index: 2;
    background: var(--primary);
    color: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.stall-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stall-branding-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stall-branding-titles strong {
    font-family: var(--font-display);
    font-size: 0.94rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-feriante-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.selected-feriante-actions .btn-whatsapp {
    width: auto;
}

.btn-link-reset {
    background: none;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    padding: 0;
}

.product-seller-btn {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px 8px;
    margin-bottom: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.15s, border-color 0.15s;
}

.product-seller-btn:hover {
    background-color: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input-wrap input {
    width: 100%;
    padding: 11px 36px 11px 40px;
    font-family: inherit;
    font-size: 0.92rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.clear-search {
    position: absolute;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

/* Píldoras Horizontales Deslizables en Móvil */
.categories-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    padding-bottom: 4px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;
}
.categories-scroll::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 7px 15px;
    border-radius: var(--radius-pill);
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-secondary);
    font-size: 0.83rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cat-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cat-pill.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ============================================================================
   Grilla de Productos (2 columnas en móvil, 4 en escritorio)
   ============================================================================ */
.main-catalog {
    padding-top: 16px;
    padding-bottom: 40px;
    flex: 1;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.results-count {
    margin: 0;
}

.reset-filters-link {
    font-weight: 700;
}

/* Mobile-First: 2 columnas en celulares tipo MercadoLibre / Marketplace */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-card {
    background: linear-gradient(180deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: var(--radius-md);
    border: 2.5px solid #38bdf8;
    box-shadow: 0 6px 16px rgba(0, 114, 255, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
}

/* Cinta superior celeste y blanca estilo bandera argentina del flyer */
.product-card::before {
    content: "";
    display: block;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #0072ff 0%, #38bdf8 35%, #ffffff 50%, #38bdf8 65%, #0072ff 100%);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #e0f2fe;
    overflow: hidden;
    border-bottom: 2px solid #bae6fd;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.04);
}

.product-cat-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: linear-gradient(180deg, #b86b35 0%, #8a481c 100%);
    border: 1.5px solid #fde68a;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Precio destacado en amarillo oro con borde oscuro igual que "17hs" / "mejores precios" del flyer */
.product-price {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 700;
    background-color: var(--gold-accent);
    color: #0b192c;
    padding: 2px 11px;
    border-radius: 10px;
    border: 2px solid #0b192c;
    box-shadow: 0 2px 0 #0b192c;
    letter-spacing: 0.01em;
    line-height: 1.25;
    margin-bottom: 8px;
}

.product-title {
    margin: 0 0 5px;
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 700;
    color: #0b192c;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.product-desc {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-seller {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 6px;
    padding-bottom: 8px;
    font-size: 0.74rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.seller-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--whatsapp);
    flex-shrink: 0;
}

.seller-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   Login Minimalista (login.php)
   ============================================================================ */
.auth-page {
    justify-content: center;
    align-items: center;
    padding: 20px 14px;
}

.auth-container {
    width: 100%;
    max-width: 410px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 28px 24px;
}

.auth-header {
    text-align: center;
    margin-bottom: 22px;
}

.brand-badge-lg {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.auth-header h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
}

.auth-header p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.demo-credentials-box {
    margin-top: 16px;
    padding: 12px;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
}

.demo-cred-title {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.demo-cred-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.auth-note {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.back-link {
    font-size: 0.85rem;
    font-weight: 700;
}

/* ============================================================================
   Paneles (Feriante y Administrador)
   ============================================================================ */
.dashboard-layout {
    padding-top: 20px;
    padding-bottom: 48px;
    flex: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 18px;
}

.panel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.panel-card-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.form-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.image-preview-box {
    position: relative;
    margin-top: 8px;
    width: 140px;
    height: 140px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--primary);
    background: #f8fafc;
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    padding: 3px 4px;
}

/* Acceso a Cámara en Panel del Feriante */
.camera-actions-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.btn-camera {
    background-color: #0f172a;
    color: #ffffff;
    font-size: 0.82rem;
    padding: 10px 10px;
}

.btn-camera:hover {
    background-color: #1e293b;
}

.btn-gallery-label {
    font-size: 0.82rem;
    padding: 10px 10px;
    cursor: pointer;
    margin: 0;
}

.file-input-accessible {
    font-size: 0.78rem;
    padding: 6px !important;
}

.camera-box {
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    background-color: #0f172a;
    color: #ffffff;
    overflow: hidden;
    margin-top: 6px;
    margin-bottom: 6px;
}

.camera-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #1e293b;
    font-size: 0.82rem;
    font-weight: 700;
}

.camera-box-controls {
    display: flex;
    gap: 6px;
}

.camera-box-controls .btn-ghost {
    color: #e2e8f0;
}

.camera-video-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #000000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-box-footer {
    padding: 10px;
    background-color: #1e293b;
}

/* Subida Múltiple de Fotos en Panel del Feriante */
.multi-mode-box {
    margin-top: 10px;
    padding: 12px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
}

.multi-mode-title {
    display: block;
    font-size: 0.82rem;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.multi-mode-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.multi-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #ffffff;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #dbeafe;
    cursor: pointer;
    font-weight: 500 !important;
}

.multi-mode-option input[type="radio"] {
    width: auto;
    margin-top: 3px;
}

.multi-mode-option span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.multi-mode-option strong {
    font-size: 0.82rem;
    color: var(--text-main);
}

.multi-mode-option small {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.multi-photos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.multi-photo-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background-color: #f8fafc;
    align-items: flex-start;
    position: relative;
}

.multi-photo-thumb-wrap {
    width: 84px;
    height: 84px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: #ffffff;
    position: relative;
}

.multi-photo-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.multi-photo-index {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
}

.multi-photo-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.multi-photo-row {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 6px;
}

.multi-photo-fields input,
.multi-photo-fields textarea {
    padding: 6px 8px !important;
    font-size: 0.8rem !important;
}

.multi-photo-remove {
    background: #fee2e2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
}

.multi-photo-remove:hover {
    background: var(--danger);
    color: #ffffff;
}

/* Galería / Miniaturas dentro de la tarjeta de producto en el Catálogo */
.product-gallery-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.product-thumbs-bar {
    display: flex;
    gap: 5px;
    padding: 6px 10px 0;
    overflow-x: auto;
}

.product-mini-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.product-mini-thumb.active,
.product-mini-thumb:hover {
    border-color: var(--primary);
    opacity: 1;
}

/* Listado de Productos en Panel Feriante / Admin */
.seller-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.seller-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    flex-wrap: wrap;
}

.seller-product-item.is-paused {
    background-color: #f8fafc;
    opacity: 0.82;
}

.seller-product-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}

.seller-product-info {
    flex: 1;
    min-width: 180px;
}

.seller-product-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.seller-product-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.seller-product-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.seller-product-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
}

.seller-product-desc {
    margin: 3px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.seller-product-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

/* Tabla de Administración */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table th {
    font-weight: 700;
    color: var(--text-secondary);
    background-color: #f8fafc;
}

.row-suspended {
    background-color: #fef2f2;
}

.admin-actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reset-pass-form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.input-xs {
    padding: 4px 8px;
    font-size: 0.78rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 115px;
}

/* Badges y Alertas */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-info {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Estados vacíos y utilidades */
.empty-state {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 40px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.empty-state h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.empty-state p {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.empty-state-sm {
    text-align: center;
    padding: 24px 12px;
}

.fw-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.small { font-size: 0.78rem; }

/* Footer */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.83rem;
}

.footer-inner p {
    margin: 4px 0;
}

.footer-note {
    color: var(--text-muted);
}

/* ============================================================================
   Media Queries (Optimización Fina para Celulares, Tablets y Escritorio)
   ============================================================================ */

/* Evitar desbordamientos horizontales en cualquier celular sin romper el scroll táctil */
html {
    overflow-x: clip;
}

body {
    overflow-x: clip;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Ajustes específicos para Celulares (< 639px) */
@media (max-width: 639px) {
    .container {
        padding: 0 10px;
    }

    /* 1. Header compacto y equilibrado en celular */
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .brand {
        justify-content: center;
        text-align: left;
    }

    .brand-badge {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
    }

    .brand-title {
        font-size: 0.95rem;
    }

    .brand-subtitle {
        font-size: 0.7rem;
    }

    .header-actions {
        justify-content: center;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .header-actions .btn {
        width: 100%;
        min-width: 0;
        padding: 7px 8px;
        font-size: 0.78rem;
        line-height: 1.2;
        white-space: normal;
        gap: 5px;
    }

    .brand-with-logo {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }

    .brand-logo-img {
        height: 30px;
    }

    .brand-logo-pill-sm .brand-logo-img {
        height: 24px;
    }

    .hero-banner-cs {
        min-height: 210px;
        margin-bottom: 12px;
    }

    .hero-banner-overlay {
        padding: 16px 14px;
        gap: 8px;
    }

    .hero-cs-title {
        font-size: 1.65rem;
    }

    .hero-cs-subtext {
        font-size: 0.82rem;
    }

    .hero-cs-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .hero-cs-actions .btn {
        width: 100%;
        padding: 8px 6px;
        font-size: 0.78rem;
        white-space: normal;
        line-height: 1.2;
    }

    /* 2. Portada Hero compacta en celular para ver productos rápido */
    .hero-search {
        padding: 12px 0 12px;
    }

    .hero-showcase {
        grid-template-columns: 115px 1fr;
        gap: 12px;
        padding: 12px;
        border-radius: 14px;
        margin-bottom: 12px;
        align-items: center;
    }

    .hero-poster-card {
        max-width: 115px;
        border-width: 2.5px;
        border-radius: 10px;
    }

    .hero-welcome-panel {
        gap: 4px;
    }

    .hero-wood-tag {
        font-size: 0.68rem;
        padding: 3px 8px;
        border-radius: 6px;
    }

    .hero-display-title {
        font-size: 1.18rem;
        line-height: 1.1;
    }

    .hero-script-Lead {
        font-size: 1.05rem;
        gap: 6px;
    }

    .hero-time-pill {
        font-size: 0.76rem;
        padding: 2px 8px;
    }

    .hero-subtext {
        font-size: 0.76rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 3. Buscadores con font-size 16px para evitar auto-zoom molesto en iOS/Android */
    .search-input-wrap input,
    .feriante-select-wrap select,
    .feriante-quick-input,
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important;
    }

    .search-input-wrap input {
        padding: 10px 34px 10px 36px;
    }

    .feriantes-directory {
        padding: 10px;
    }

    .feriantes-dir-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .feriantes-dir-hint {
        display: block;
        width: 100%;
        font-size: 0.72rem;
    }

    .feriante-quick-input {
        width: 100%;
        min-width: 0;
        padding: 8px 12px;
    }

    .cat-pill {
        padding: 7px 13px;
        font-size: 0.78rem;
    }

    /* 4. Banner de Feriante Seleccionado adaptable a móvil */
    .selected-feriante-cover.has-custom-header {
        height: 125px;
    }

    .selected-feriante-content {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 12px 14px;
        gap: 12px;
    }

    .selected-feriante-avatar {
        width: 64px;
        height: 64px;
        margin-top: -36px;
        font-size: 1.5rem;
    }

    .selected-feriante-info h2 {
        font-size: 1.12rem;
    }

    .selected-feriante-desc {
        font-size: 0.8rem;
    }

    .selected-feriante-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .selected-feriante-actions .btn {
        width: 100%;
        font-size: 0.78rem;
        padding: 9px 8px;
    }

    /* 5. Grilla de 2 Columnas en Celular perfectamente proporcionada */
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .product-card {
        border-width: 2px;
        border-radius: 12px;
    }

    .product-cat-badge {
        top: 6px;
        left: 6px;
        font-size: 0.64rem;
        padding: 2px 7px;
    }

    .product-gallery-count {
        bottom: 6px;
        right: 6px;
        font-size: 0.62rem;
        padding: 2px 6px;
    }

    .product-thumbs-bar {
        padding: 5px 8px 0;
        gap: 4px;
    }

    .product-mini-thumb {
        width: 30px;
        height: 30px;
    }

    .product-body {
        padding: 8px;
    }

    .product-price {
        font-size: 1.02rem;
        padding: 2px 8px;
        border-radius: 8px;
        margin-bottom: 6px;
    }

    .product-title {
        font-size: 0.83rem;
        line-height: 1.25;
        min-height: 2.4em;
        margin-bottom: 4px;
    }

    .product-desc {
        font-size: 0.72rem;
        line-height: 1.3;
        margin-bottom: 6px;
    }

    .product-seller-btn {
        padding: 4px 6px;
        margin-bottom: 6px;
        font-size: 0.7rem;
    }

    .btn-whatsapp {
        padding: 8px 6px;
        font-size: 0.74rem;
        gap: 5px;
    }

    .btn-whatsapp .wa-icon {
        width: 15px;
        height: 15px;
    }

    /* 6. Panel del Feriante y Subida Múltiple en Celular */
    .dashboard-layout {
        padding-top: 12px;
        padding-bottom: 32px;
    }

    .panel-card {
        padding: 14px 12px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .camera-actions-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .btn-camera,
    .btn-gallery-label {
        padding: 11px 12px;
        font-size: 0.86rem;
    }

    .multi-photo-card {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .multi-photo-thumb-wrap {
        width: 100%;
        height: 150px;
    }

    .multi-photo-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .multi-photo-remove {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 30px;
        height: 30px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    /* Listado de Mis Publicaciones en Celular */
    .seller-product-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .seller-product-thumb {
        width: 100%;
        height: 160px;
    }

    .seller-product-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .seller-product-actions .btn,
    .seller-product-actions .inline-form,
    .seller-product-actions .inline-form .btn {
        width: 100%;
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    /* Login en Celular */
    .auth-card {
        padding: 20px 16px;
    }

    .auth-poster-thumb {
        width: 110px;
        height: 110px;
    }
}

/* Pantallas muy angostas (< 360px) */
@media (max-width: 359px) {
    .hero-showcase {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-welcome-panel {
        align-items: center;
    }

    .hero-script-Lead {
        justify-content: center;
    }

    .btn-whatsapp span {
        font-size: 0.7rem;
    }
}

@media (min-width: 640px) {
    .container {
        padding: 0 20px;
    }

    .hero-showcase {
        grid-template-columns: 240px 1fr;
        padding: 18px 22px;
        gap: 22px;
    }

    .hero-display-title {
        font-size: 2.35rem;
    }

    .search-bar-dual {
        grid-template-columns: 1fr 290px;
    }

    .hero-copy h1 {
        font-size: 1.6rem;
    }

    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .product-body {
        padding: 14px;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .product-title {
        font-size: 0.94rem;
    }

    .btn-whatsapp {
        font-size: 0.86rem;
        padding: 10px 12px;
    }
}

@media (min-width: 992px) {
    /* 4 columnas en escritorio */
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 370px 1fr;
        align-items: start;
    }
}

/* ============================================================================
   Vista Detallada de Producto (Estilo Mercado Libre)
   ============================================================================ */
.product-card .product-media,
.product-card .product-title,
.product-card .product-price,
.product-card .product-desc {
    cursor: pointer;
}

.product-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    margin: 2px 0 6px;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.product-detail-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

.pd-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.pd-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 25, 44, 0.72);
    backdrop-filter: blur(4px);
}

.pd-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1020px;
    max-height: 92vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 24px 60px rgba(11, 25, 44, 0.35);
    padding: 18px 16px 26px;
    animation: pdSlideUp 0.2s ease-out;
}

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

.pd-close-btn {
    position: sticky;
    top: 0;
    float: right;
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-main);
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

.pd-close-btn:hover {
    background: #f1f5f9;
}

.pd-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    clear: both;
    padding-top: 6px;
}

.pd-gallery-col {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.pd-main-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 440px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-photo-counter {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.pd-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

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

.pd-prev-btn { left: 10px; }
.pd-next-btn { right: 10px; }

.pd-thumbs-list {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.pd-thumb-item {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    flex-shrink: 0;
    background: #ffffff;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.pd-thumb-item:hover,
.pd-thumb-item.active {
    border-color: var(--primary);
    transform: scale(1.03);
}

.pd-info-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pd-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pd-cat-pill {
    background: var(--primary-soft);
    color: var(--primary-hover);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.pd-status-pill {
    background: #dcfce7;
    color: #166534;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.pd-title {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.25;
    font-weight: 800;
    color: var(--text-main);
}

.pd-price {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.pd-price-note {
    margin: -8px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pd-cta-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-wa-btn {
    padding: 13px 18px;
    font-size: 0.96rem;
    border-radius: 12px;
}

.pd-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 14px;
}

.pd-section-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
}

.pd-description {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-line;
}

.pd-seller-card {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-seller-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pd-seller-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--sky-accent));
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.pd-seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-seller-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pd-seller-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 700;
}

.pd-seller-name {
    font-size: 1rem;
    color: var(--text-main);
}

.pd-seller-ubicacion {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.pd-seller-desc {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.pd-seller-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pd-related {
    margin-top: 22px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pd-related-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.pd-related-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.pd-related-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.pd-related-price {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}

.pd-related-title {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .pd-modal {
        align-items: center;
        padding: 20px;
    }

    .pd-dialog {
        border-radius: 20px;
        max-height: 90vh;
        padding: 24px 28px 28px;
    }

    .pd-layout {
        grid-template-columns: 1.15fr 1fr;
        gap: 28px;
        align-items: start;
    }

    .pd-gallery-col {
        flex-direction: row;
        align-items: flex-start;
    }

    .pd-thumbs-list {
        flex-direction: column;
        width: 68px;
        max-height: 440px;
        overflow-y: auto;
        overflow-x: hidden;
        flex-shrink: 0;
    }

    .pd-main-stage {
        flex: 1;
        aspect-ratio: 1 / 1;
    }

    .pd-title {
        font-size: 1.5rem;
    }

    .pd-price {
        font-size: 2.2rem;
    }

    .pd-related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}


/* ============================================================================
   Sección de Servicios y Oficios Locales
   ============================================================================ */
.btn-services-nav {
    background: linear-gradient(180deg, #ffdd00 0%, #facc15 100%);
    color: #0b192c;
    border: 2px solid #0b192c;
    box-shadow: 0 2px 0 #0b192c;
}
.btn-services-nav:hover {
    background: linear-gradient(180deg, #fef08a 0%, #facc15 100%);
    color: #0b192c;
    transform: translateY(-1px);
}

.cat-pill-servicios {
    border-color: #0284c7;
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
}
.cat-pill-servicios:hover {
    border-color: #0072ff;
    background: #dbeafe;
    color: #0056cc;
}
.cat-pill-servicios.active {
    background: linear-gradient(135deg, #0f766e 0%, #0284c7 100%);
    border-color: #0f766e;
    color: #ffffff;
}

.service-subrubros-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    margin-top: 10px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1.5px solid #7dd3fc;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    scrollbar-width: none;
}
.service-subrubros-bar::-webkit-scrollbar {
    display: none;
}

.services-section {
    padding: 12px 0 44px;
    scroll-margin-top: 82px;
}

.services-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    border: 3px solid #38bdf8;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 18px 14px 20px;
    position: relative;
    overflow: hidden;
}

.services-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 7px;
    background: linear-gradient(90deg, #0f766e 0%, #0284c7 35%, #ffdd00 50%, #0284c7 65%, #0f766e 100%);
}

.services-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
    padding-top: 4px;
}

.services-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0f766e 0%, #0284c7 100%);
    color: #ffffff;
    border: 1.5px solid #bae6fd;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 6px;
}

.services-title {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.15;
}

.services-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 740px;
}

.services-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 440px;
}

.services-search-wrap input {
    width: 100%;
    padding: 10px 36px 10px 38px;
    font-family: inherit;
    font-size: 0.88rem;
    border: 1.5px solid #93c5fd;
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.services-search-wrap input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.services-rubros-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 12px;
    scrollbar-width: thin;
}

.rubro-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rubro-pill:hover {
    border-color: #0284c7;
    color: #0369a1;
    background-color: #f0f9ff;
}

.rubro-pill.active {
    background: linear-gradient(135deg, #0f766e 0%, #0284c7 100%);
    border-color: #0f766e;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.rubro-pill-count {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

.rubro-pill.active .rubro-pill-count {
    background: rgba(255, 255, 255, 0.22);
}

.services-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.service-card {
    border-color: #14b8a6;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
}

.service-card::before {
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 35%, #ffdd00 50%, #0284c7 65%, #0f766e 100%);
}

.service-card:hover {
    border-color: #0f766e;
}

.service-rubro-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: linear-gradient(135deg, #0f766e 0%, #0369a1 100%);
    border: 1.5px solid #ccfbf1;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.product-price-convenir {
    background-color: #ccfbf1;
    color: #0f766e;
    border-color: #0f766e;
    box-shadow: 0 2px 0 #0f766e;
    font-size: 1rem;
}

.service-zone-meta {
    margin: 0 0 8px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #0f766e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.services-empty-state {
    margin: 8px 0 4px;
    padding: 24px 16px;
}

.services-cta-banner {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0b192c 0%, #1e3a5f 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    border: 2px solid var(--gold-accent);
}

.services-cta-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 220px;
}

.services-cta-text strong {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold-accent);
}

.services-cta-text span {
    font-size: 0.83rem;
    color: #e0f2fe;
}

@media (min-width: 768px) {
    .services-panel {
        padding: 24px 24px 26px;
    }

    .services-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .services-title {
        font-size: 1.9rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}


/* Contraste legible para botones ghost en el header azul */
.site-header .btn-ghost {
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    background: rgba(11, 25, 44, 0.18);
}
.site-header .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: #ffffff;
}

/* Gestor de Categorías en Panel Administrador */
.categories-admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.cat-admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.cat-admin-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.86rem;
}


/* ============================================================================
   Identidad Visual "Compras y Servicios" (Logo WebP + Banner Portada WebP)
   ============================================================================ */
.brand-with-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-logo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 12px;
    border: 2px solid rgba(255, 221, 0, 0.9);
    box-shadow: 0 3px 10px rgba(5, 25, 55, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.brand-logo-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(5, 25, 55, 0.28);
}

.brand-logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

.brand-logo-pill-sm {
    padding: 5px 10px;
}

.brand-logo-pill-sm .brand-logo-img {
    height: 28px;
}

.auth-logo-img {
    width: 220px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 6px;
    display: block;
    object-fit: contain;
}

/* Banner Principal Full-Width con Portada Compras y Servicios */
.hero-banner-cs {
    position: relative;
    width: 100%;
    min-height: 250px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    background: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
}

.hero-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    z-index: 0;
}

.hero-banner-cs::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.96) 0%,
        rgba(255, 255, 255, 0.90) 44%,
        rgba(255, 255, 255, 0.35) 68%,
        rgba(255, 255, 255, 0.0) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero-banner-overlay {
    position: relative;
    z-index: 2;
    padding: 22px 20px;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.hero-cs-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0b2545 0%, #0f766e 100%);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(11, 37, 69, 0.2);
}

.hero-cs-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.06;
    color: #0b2545;
    letter-spacing: -0.01em;
}

.hero-cs-title span {
    color: #0d9488;
}

.hero-cs-subtext {
    margin: 0;
    font-size: 0.92rem;
    color: #1e3a5f;
    line-height: 1.48;
    max-width: 460px;
}

.hero-cs-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

@media (min-width: 768px) {
    .brand-logo-img {
        height: 40px;
    }

    .hero-banner-cs {
        min-height: 310px;
    }

    .hero-banner-overlay {
        padding: 32px 36px;
        max-width: 560px;
    }

    .hero-cs-title {
        font-size: 2.65rem;
    }

    .hero-cs-subtext {
        font-size: 0.98rem;
    }
}

@media (min-width: 1024px) {
    .hero-banner-cs {
        min-height: 350px;
    }

    .hero-banner-cs::after {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.75) 36%,
            rgba(255, 255, 255, 0.08) 54%,
            rgba(255, 255, 255, 0.0) 100%
        );
    }
}


/* Botón Instalar App (PWA) y Modal de Ayuda */
.btn-install-app {
    background: linear-gradient(135deg, #0b2545 0%, #0f766e 100%);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.btn-install-app:hover {
    background: linear-gradient(135deg, #0f766e 0%, #0b2545 100%);
    color: #ffffff;
}

.pwa-install-dialog {
    max-width: 420px;
    padding: 22px 20px 24px;
}

.pwa-install-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    clear: both;
    padding-top: 6px;
}

.pwa-install-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    border: 2px solid #93c5fd;
    box-shadow: var(--shadow-sm);
}

.pwa-install-content h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-main);
}

.pwa-install-content p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.pwa-install-steps {
    margin: 4px 0 8px;
    padding-left: 20px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/* ============================================================================
   Responsive Mejorado para Panel Administrador y Panel de Usuarios (< 768px)
   ============================================================================ */
@media (max-width: 767px) {
    html, body {
        overflow-x: clip;
        max-width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dashboard-sidebar,
    .dashboard-content {
        min-width: 0;
        width: 100%;
    }

    .panel-card {
        padding: 14px 12px;
        overflow: hidden;
    }

    .panel-card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .panel-card-header h2 {
        font-size: 1rem;
    }

    /* Convertir tabla de clientes del Administrador en tarjetas limpias en móvil */
    .table-responsive {
        overflow-x: visible;
    }

    .admin-table,
    .admin-table tbody {
        display: block;
        width: 100%;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        margin-bottom: 12px;
        background: #f8fafc;
        border: 1.5px solid #cbd5e1;
        border-radius: var(--radius-sm);
    }

    .admin-table tr.row-suspended {
        background: #fef2f2;
        border-color: #fecaca;
    }

    .admin-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 4px 0;
        border-bottom: 1px dashed #e2e8f0;
        text-align: right;
        word-break: break-word;
    }

    .admin-table td:first-child {
        display: block;
        text-align: left;
        padding-bottom: 8px;
        border-bottom: 1.5px solid #cbd5e1;
    }

    .admin-table td:last-child {
        display: block;
        text-align: left;
        border-bottom: none;
        padding-top: 6px;
        padding-bottom: 0;
    }

    .admin-table td[data-label]::before {
        content: attr(data-label);
        font-size: 0.74rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.02em;
        flex-shrink: 0;
    }

    .admin-table td:first-child::before,
    .admin-table td:last-child::before {
        display: none;
    }

    .admin-actions-cell {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    .admin-actions-cell > .btn,
    .admin-actions-cell > .inline-form,
    .admin-actions-cell > .inline-form .btn {
        width: 100%;
        padding: 9px 10px;
        font-size: 0.82rem;
    }

    .reset-pass-form {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 6px;
        width: 100%;
    }

    .reset-pass-form .input-xs {
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        font-size: 16px !important;
    }

    .reset-pass-form .btn {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    /* Moderación de publicaciones en Admin y Mis Publicaciones en Panel */
    .seller-product-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .seller-product-info {
        min-width: 0;
        width: 100%;
    }

    [data-page="admin"] .seller-product-actions {
        display: flex;
        width: 100%;
    }

    [data-page="admin"] .seller-product-actions .btn {
        width: 100%;
        padding: 9px 10px;
    }

    /* Panel de Usuario: vista previa de portada/logo y formularios */
    .stall-avatar-preview-wrap {
        flex-wrap: wrap;
    }

    .file-input-accessible {
        width: 100%;
        max-width: 100%;
        font-size: 0.82rem;
    }

    /* Chip de "Todos los Puestos" sin emoji */
    .feriante-chip-avatar {
        font-size: 0.72rem;
        padding: 0 4px;
    }
}


/* ============================================================================
   Página de Términos y Condiciones y Aceptación en Login
   ============================================================================ */
.legal-page-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px;
}

.legal-header {
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.legal-header h1 {
    margin: 6px 0;
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1.2;
    color: var(--text-main);
}

.legal-updated {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.legal-notice-box {
    background: #fffbeb;
    border: 1.5px solid #f59e0b;
    border-left: 5px solid #d97706;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: #78350f;
    line-height: 1.5;
}

.legal-section {
    margin-bottom: 20px;
}

.legal-section h2 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.12rem;
    color: #0b2545;
}

.legal-section p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-list {
    margin: 6px 0 10px;
    padding-left: 20px;
    font-size: 0.89rem;
    color: var(--text-secondary);
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-aaip {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.83rem !important;
    color: #0369a1 !important;
}

.legal-footer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.terms-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 10px 11px;
    cursor: pointer;
}

.terms-checkbox-wrap input[type="checkbox"] {
    margin-top: 2px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.terms-checkbox-wrap a {
    font-weight: 700;
    text-decoration: underline;
}

@media (min-width: 768px) {
    .legal-page-card {
        padding: 32px 36px;
    }

    .legal-header h1 {
        font-size: 1.9rem;
    }
}


/* ============================================================================
   Moderación Previa: Bandeja de Pendientes y Página moderar.php
   ============================================================================ */
.pending-approval-card {
    border: 2px solid #f59e0b;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.pending-approval-card.is-empty {
    border-color: var(--border-color);
    background: var(--bg-card);
}

.moderar-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 18px;
}

.moderar-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.moderar-title {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--text-main);
}

.moderar-desc {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.moderar-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.moderar-photo-link {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid #cbd5e1;
    background: #f1f5f9;
}

.moderar-photo {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.moderar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.moderar-nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}


/* ============================================================================
   Estilo Limpio Inspirado en Mercado Libre (Respetando Logo, Portada y Colores)
   ============================================================================ */
body.ml-home {
    background-color: #f3f5f8;
    background-image: none;
}

.site-header-ml {
    background: linear-gradient(90deg, #0066eb 0%, #0099ff 55%, #0066eb 100%);
    border-bottom: 3px solid var(--gold-accent);
    padding: 8px 0 6px;
}

.header-ml-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.header-ml-search {
    flex: 1;
    min-width: 220px;
}

.ml-search-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(11, 25, 44, 0.14);
    overflow: hidden;
}

.ml-search-box input {
    border: none !important;
    box-shadow: none !important;
    padding: 10px 44px 10px 14px !important;
    font-size: 0.92rem;
    background: transparent;
}

.ml-search-box .clear-search {
    right: 40px;
}

.ml-search-icon-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-left: 1px solid #e2e8f0;
    pointer-events: none;
}

.header-ml-subnav {
    margin-top: 6px;
}

.header-ml-links {
    display: flex;
    align-items: center;
    gap: 6px 14px;
    flex-wrap: wrap;
}

.header-nav-link {
    background: none;
    border: none;
    padding: 4px 2px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
}

@media (hover: hover) {
    .header-nav-link:hover {
        color: var(--gold-accent);
    }
}

.header-nav-link.is-active {
    color: var(--gold-accent);
    font-weight: 700;
}

.header-nav-link-accent {
    color: var(--gold-accent);
    font-weight: 700;
}

.header-nav-access {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.header-nav-access:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

/* Banda Hero Limpia */
.hero-ml-band {
    background: linear-gradient(180deg, #dbeeff 0%, #f3f5f8 100%);
    border-bottom: none;
    padding: 16px 0 8px;
}

.hero-banner-ml {
    border: 1px solid rgba(147, 197, 253, 0.45);
    box-shadow: 0 6px 20px rgba(11, 37, 69, 0.08);
    margin-bottom: 14px;
}

/* Barra compacta de Categorías + Selector Comercio */
.ml-filter-strip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ml-filter-strip .categories-scroll {
    flex: 1;
    min-width: 0;
    padding-bottom: 0;
}

.ml-store-select {
    min-width: 210px;
}

.ml-store-select select {
    padding: 8px 12px;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

/* Bloques blancos limpios por sección (Estilo Estanterías Mercado Libre) */
.ml-home .main-catalog {
    padding-top: 12px;
    padding-bottom: 16px;
}

.ml-shelf-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.ml-shelf-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.ml-shelf-title {
    margin: 0 0 2px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0b2545;
    line-height: 1.2;
}

.ml-show-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.ml-show-more-wrap .btn {
    min-width: 240px;
    border-color: var(--primary);
    color: var(--primary);
}

.ml-show-more-wrap .btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Tarjetas Minimalistas Estilo Mercado Libre (sin bordes gruesos ni cintas pesadas) */
.ml-home .product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.ml-home .product-card::before {
    display: none;
}

.ml-home .product-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
}

.ml-home .product-media {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.ml-home .product-cat-badge {
    background: rgba(11, 37, 69, 0.78);
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    box-shadow: none;
}

.ml-home .service-rubro-badge {
    background: rgba(13, 148, 136, 0.90);
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    box-shadow: none;
}

.ml-home .product-body {
    padding: 12px;
}

.ml-home .product-price {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 4px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.32rem;
    font-weight: 700;
    color: #111827;
}

.ml-home .product-price-convenir {
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-bottom: 6px;
}

.ml-home .product-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.35;
    min-height: 2.7em;
    margin-bottom: 6px;
}

.ml-home .product-desc {
    display: none;
}

.ml-home .product-detail-link {
    display: none;
}

.ml-home .product-seller-btn {
    background: transparent;
    border: none;
    padding: 2px 0;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
}

.ml-home .product-seller-btn:hover {
    background: transparent;
    color: var(--primary);
}

.ml-home .btn-whatsapp {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
    box-shadow: none;
    padding: 7px 10px;
    font-size: 0.79rem;
    font-weight: 700;
}

.ml-home .btn-whatsapp:hover {
    background-color: var(--whatsapp);
    color: #ffffff;
    border-color: var(--whatsapp);
}

/* Sección de Servicios limpia */
.ml-home .services-section {
    padding: 8px 0 18px;
}

.services-panel-ml {
    border-top: 4px solid #0d9488;
}

.ml-stores-section {
    padding-bottom: 36px;
}

.ml-stores-section .feriantes-dir-header {
    margin-bottom: 12px;
}

@media (max-width: 639px) {
    .header-ml-top {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .header-ml-top .brand {
        justify-content: center;
    }

    .header-ml-search {
        width: 100%;
        min-width: 0;
    }

    .header-ml-links {
        display: flex !important;
        grid-template-columns: none !important;
        justify-content: center;
        gap: 4px 12px;
    }

    .header-nav-access {
        margin-left: 0;
    }

    .ml-filter-strip {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px;
    }

    .ml-filter-strip .categories-scroll {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        padding: 2px 2px 4px;
    }

    .services-rubros-scroll,
    .service-subrubros-bar,
    .feriantes-cards-scroll {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
    }

    .ml-store-select {
        min-width: 0;
        width: 100%;
    }

    .ml-shelf-card {
        padding: 14px 10px;
    }

    .ml-home .product-price {
        font-size: 1.12rem;
    }

    .ml-home .product-title {
        font-size: 0.82rem;
    }

    .ml-home .btn-whatsapp {
        font-size: 0.74rem;
        padding: 7px 6px;
    }
}

/* ============================================================================
   SISTEMA DE OFERTAS (Cartel OFERTA en Catálogo + Opción en Panel Comerciantes)
   ============================================================================ */

/* Cartel llamativo OFERTA sobre la tarjeta del catálogo */
.product-offer-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', var(--font-sans, sans-serif);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1.5px solid #fef08a;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.38);
    line-height: 1.1;
}

.product-card.is-offer {
    border-color: #fca5a5;
}

/* Píldora OFERTA en la vista detallada del producto */
.pd-offer-pill {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

/* Píldora de filtro Ofertas en el catálogo */
.cat-pill-ofertas {
    border-color: #fca5a5;
    color: #b91c1c;
    background: #fef2f2;
    font-weight: 700;
}

.cat-pill-ofertas:hover,
.cat-pill-ofertas.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    color: #ffffff;
}

/* Badge y botones de Oferta en el Panel de Comerciantes */
.badge-offer {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-offer-nav {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: 1px solid #dc2626;
    font-weight: 700;
}

.btn-offer-nav:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
}

.btn-offer-active {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    font-weight: 700;
}

.btn-offer-active:hover {
    background: #fee2e2;
    color: #991b1b;
}

/* Caja de opción Oferta en el formulario de publicación */
.offer-toggle-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff5f5 0%, #fffbeb 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.offer-toggle-box:hover {
    border-color: #ef4444;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.12);
}

.offer-toggle-box input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #dc2626;
    cursor: pointer;
    flex-shrink: 0;
}

.offer-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.offer-toggle-copy strong {
    color: #991b1b;
    font-size: 0.94rem;
}

.offer-toggle-copy small {
    color: #7f1d1d;
    font-size: 0.78rem;
    line-height: 1.3;
}

.offer-toggle-pill {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 9px;
    border-radius: 999px;
    flex-shrink: 0;
}

.panel-card-header-wrap {
    flex-wrap: wrap;
    gap: 10px;
}

.panel-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 639px) {
    .product-offer-badge {
        top: 6px;
        right: 6px;
        font-size: 0.64rem;
        padding: 3px 8px;
    }
}

/* ============================================================================
   FORMAS DE PAGO Y GOOGLE MAPS (Panel Comerciante, Perfil y Catálogo)
   ============================================================================ */

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.payment-check-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.payment-check-chip:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.payment-check-chip input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

.payments-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.payments-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}

.payment-pill {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.2;
}

.product-payments-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 6px;
}

.payment-pill-sm {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    font-size: 0.66rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.2;
}

.payment-pill-more {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-maps {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
    font-weight: 700;
}

.btn-maps:hover {
    background: #d1fae5;
    color: #065f46;
}

/* ============================================================================
   VISTA DEDICADA: PERFILES DE COMERCIANTES (Botón "Comercios" del Menú)
   ============================================================================ */

.comercios-profiles-section {
    padding-top: 14px;
    padding-bottom: 28px;
}

.comercios-profiles-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.comercios-profiles-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comercios-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.cp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
}

.cp-cover {
    height: 82px;
    background: linear-gradient(135deg, #0066eb 0%, #0ea5e9 60%, #38bdf8 100%);
    position: relative;
    overflow: hidden;
}

.cp-cover.has-img {
    height: 112px;
}

.cp-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cp-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.cp-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.cp-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #0b2545;
    color: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.cp-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-avatar-initial {
    font-size: 1.35rem;
    font-weight: 800;
}

.cp-titles {
    padding-top: 22px;
    min-width: 0;
}

.cp-name {
    margin: 2px 0 0;
    font-size: 1.04rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.cp-handle {
    font-size: 0.78rem;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.cp-desc {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
}

.cp-meta {
    margin: 0;
    font-size: 0.81rem;
    color: #475569;
    line-height: 1.35;
}

.cp-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.cp-actions {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

@media (max-width: 639px) {
    .comercios-profiles-tools {
        width: 100%;
    }
    .comercios-profiles-tools .feriante-quick-input {
        flex: 1;
        min-width: 0;
    }
    .comercios-profiles-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   LOGIN: MOSTRAR CONTRASEÑA Y RECUPERAR CONTRASEÑA
   ============================================================================ */

.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrap input {
    width: 100%;
    padding-right: 94px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: #334155;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.password-toggle-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.auth-forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.auth-link-btn {
    background: none;
    border: none;
    padding: 2px 0;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary, #0072ff);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-link-btn:hover {
    color: var(--primary-hover, #0057c7);
}

.recover-intro {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
}

.recover-intro strong {
    display: block;
    font-size: 0.92rem;
    color: #0b2545;
    margin-bottom: 3px;
}

.recover-intro p {
    margin: 0;
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.4;
}
