
    /* --- VARIABLES --- */
:root {
    --brand-color: #A1488E;
    --brand-dark: #7a356b;
    --brand-light: #d29ec7;
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

/* --- ESTILOS BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.premium-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Gradiente sutil morado sobre blanco */
    background: radial-gradient(circle at 50% 0%, rgba(161, 72, 142, 0.08) 0%, #ffffff 70%);
    z-index: -1;
}

/* NAVBAR */
.navbar {
    padding: 15px 40px; /* Reduje un poco el padding vertical */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000000; /* Fondo negro sólido */
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil claro en lugar de oscuro */
}

.logo {
    font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700;
    color: var(--brand-color); text-decoration: none; display: flex; align-items: center; gap: 10px;
}

.btn-back {
    color: #ffffff !important; /* Fuerza el color blanco para el texto */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}
.btn-back:hover {
    color: var(--brand-light) !important; /* O un gris claro como #cbd5e1 */
    opacity: 0.8;
}

.btn-back:hover i {
    color: var(--brand-light);
}

/*.btn-back i {
    color: var(--brand-color); !* Mantenemos el morado en el icono para que resalte *!
}*/
.btn-back i {
    color: #ffffff; /* Color blanco para la flecha */
    font-size: 1.1rem; /* Ajuste opcional de tamaño */
}

/* HEADER */
.header-section { text-align: center; padding: 40px 20px; }

.badge {
    display: inline-block;
    background: rgba(161, 72, 142, 0.1); color: var(--brand-color);
    padding: 8px 16px; border-radius: 50px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    border: 1px solid rgba(161, 72, 142, 0.2); margin-bottom: 20px;
}

.main-title {
    font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 10px; color: var(--text-main);
}

.subtitle {
    color: var(--text-secondary); font-size: 1rem; max-width: 600px;
    margin: 0 auto; line-height: 1.6;
}

/* BUSCADOR */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 24px auto 0;
    align-items: center;
}

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

.search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 13px 44px 13px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.95rem;
    color: #1f2937;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Inter', sans-serif;
}
.search-input::placeholder { color: #94a3b8; }
.search-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(161, 72, 142, 0.1);
}

.search-clear-btn {
    position: absolute;
    right: 14px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.7rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.search-clear-btn:hover { background: #ef4444; color: #fff; }

.search-submit-btn {
    padding: 13px 22px;
    border-radius: 50px;
    background: var(--brand-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
}
.search-submit-btn:hover { background: var(--brand-dark); transform: translateY(-1px); }

@media (max-width: 480px) {
    .search-submit-btn span { display: none; }
    .search-submit-btn { padding: 13px 16px; }
}

/* TABS */
.tabs-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; margin-top: 30px; }

.tab-btn {
    background: #ffffff;
    border: 1px solid var(--brand-color);
    color: var(--brand-color); padding: 12px 24px; border-radius: 50px;
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: all 0.3s ease; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 2px 5px rgba(161, 72, 142, 0.08);
}
.tab-btn:hover { background: rgba(161, 72, 142, 0.07); }

.tab-btn.active {
    background: var(--brand-color); color: #ffffff; border-color: var(--brand-color);
    box-shadow: 0 5px 15px rgba(161, 72, 142, 0.3);
}

.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }

/* AVISO DE FILTRO */
.filter-alert {
    max-width: 600px; margin: 0 auto 30px;
    background: #ffffff; border: 1px solid var(--brand-color);
    border-radius: 12px; padding: 15px; display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 4px 15px rgba(161, 72, 142, 0.1);
}
.filter-text { color: var(--text-main); font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }

.filter-clear {
    color: var(--brand-color); text-decoration: none; font-size: 0.75rem;
    font-weight: 700; text-transform: uppercase;
    background: rgba(161, 72, 142, 0.1); padding: 6px 14px; border-radius: 20px; transition: 0.3s;
}
.filter-clear:hover { background: var(--brand-color); color: white; }

/* GRID SYSTEM */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; }
.grid-vinicolas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.wines-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }

/* --- VINICOLA CARD --- */
.vinicola-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: 20px;
    overflow: hidden; transition: all 0.3s ease; cursor: pointer;
    text-decoration: none; display: block; position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.vinicola-card:hover {
    transform: translateY(-8px);
    border-color: var(--brand-color);
    box-shadow: 0 15px 30px rgba(161, 72, 142, 0.15);
}

.card-image { position: relative; height: 180px; background: #f1f5f9; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.vinicola-card:hover .card-image img { transform: scale(1.05); }

.card-image-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}
.card-image-placeholder i { color: #94a3b8; font-size: 3rem; }

.card-content { padding: 20px; }
.card-region {
    color: var(--brand-color); font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 5px;
}
.card-name {
    font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.2rem;
    color: var(--text-main); line-height: 1.3; margin-bottom: 5px;
}

/* --- WINE CARD PREMIUM --- */
.wine-card-premium {
    background-color: var(--bg-card); border-radius: 16px; overflow: hidden; position: relative;
    border: 1px solid var(--border-color); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex; flex-direction: column; padding-bottom: 15px;
    text-decoration: none; color: inherit;
}
.wine-card-premium:hover {
    transform: translateY(-5px);
    border-color: var(--brand-color);
    box-shadow: 0 15px 30px rgba(161, 72, 142, 0.15);
}

.wine-badge-corner {
    position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800;
    text-transform: uppercase; padding: 4px 8px; border-radius: 4px; z-index: 10; letter-spacing: 0.5px;
}
/* Ajuste de badges para modo claro */
.badge-tinto { background-color: #fce7f3; color: #be185d; }
.badge-blanco { background-color: #fef9c3; color: #a16207; }
.badge-rosado { background-color: #ffe4e6; color: #be123c; }
.badge-postre { background-color: #ffedd5; color: #c2410c; }

.wine-photo-area {
    width: 100%; height: 200px; display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: transparent;
}
.wine-photo-area img {
    height: 100%; width: auto; max-width: 100%; object-fit: contain;
    transition: transform 0.3s;
}
.wine-card-premium:hover .wine-photo-area img { transform: scale(1.08); }

.wine-details { text-align: center; padding: 0 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.winery-label { color: var(--brand-color); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; line-height: 1.2; }
.wine-title { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--text-main); margin: 2px 0; line-height: 1.1; text-transform: uppercase; }
.wine-price-tag { color: var(--text-secondary); font-size: 16px; font-weight: 700; margin-top: 2px; }

/* --- MODAL --- */
#wine-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); /* Overlay más claro */
    z-index: 3000; align-items: flex-end; justify-content: center; backdrop-filter: blur(5px);
}
@media (min-width: 768px) { #wine-modal { align-items: center; } }

.modal-content {
    background: #ffffff; /* Fondo blanco */
    width: 100%; max-width: 550px;
    border-radius: 30px 30px 0 0; border: none;
    padding: 0; position: relative; max-height: 90vh; overflow: hidden;
    display: flex; flex-direction: column; animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
@media (min-width: 768px) { .modal-content { border-radius: 24px; } }

.modal-scroll-area { overflow-y: auto; flex: 1; width: 100%; scrollbar-width: none; overscroll-behavior: contain; }
.modal-scroll-area::-webkit-scrollbar { display: none; }

.modal-close {
    position: absolute; top: 20px; right: 20px; width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-main); z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.modal-close:active { transform: scale(0.9); }

.modal-wine-header {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    /* Header modal claro */
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    border-radius: 30px 30px 0 0;
}

.modal-wine-img {
    width: 100%; height: 350px; margin-bottom: 25px;
    background-color: #ffffff; border-radius: 20px;
    display: flex; align-items: center; justify-content: center; position: relative;
    /* Sombra suave */
    box-shadow: 0 10px 30px rgba(161, 72, 142, 0.1);
    cursor: pointer; transition: transform 0.2s ease;
}
.modal-wine-img:active { transform: scale(0.98); }
.modal-wine-img img { height: 90%; width: auto; object-fit: contain; filter: none; }
.expand-icon {
    position: absolute; top: 15px; left: 15px; width: 32px; height: 32px;
    background: #f1f5f9; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px;
}

/* ESTILO BOTÓN FAVORITOS (CORAZÓN) */
.wine-fav-btn {
    position: absolute; bottom: 15px; right: 15px; width: 44px; height: 44px;
    background: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--brand-color); box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    cursor: pointer; transition: transform 0.2s; z-index: 10;
}
.wine-fav-btn:active { transform: scale(0.9); }
.wine-fav-btn i.fas { color: #ef4444; }

.modal-info-container { padding: 0 30px 30px; }

.modal-details-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 25px;
    background: #f8fafc; padding: 20px; border-radius: 20px;
    border: 1px solid #e2e8f0;
}
.detail-item { font-size: 13px; color: var(--text-secondary); }
.detail-value { font-size: 15px; color: var(--text-main); font-weight: 600; margin-top: 2px; }

/* GALERÍA PREVIEW EN MODAL */
.wine-gallery-preview {
    width: 100%; height: 200px; margin-top: 20px; margin-bottom: 25px;
    border-radius: 16px; overflow: hidden; position: relative; cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); border: 1px solid #e2e8f0;
}
.wine-gallery-preview img { width: 100%; height: 100%; object-fit: cover; }
.gallery-badge {
    position: absolute; bottom: 15px; right: 15px;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
    color: var(--brand-color); padding: 6px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 600; border: 1px solid rgba(161, 72, 142, 0.2);
}

/* PAGINACIÓN SIMPLE (Anterior / Siguiente) */
.pagination-wrapper {
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Anula el margen izquierdo que Bootstrap 4 inyecta por defecto en el ul */
.pagination-wrapper .pagination {
    display: flex !important;
    justify-content: center !important;
    list-style: none !important;
    gap: 20px !important;        /* separación generosa entre Anterior y Siguiente */
    padding: 0 !important;
    margin: 0 !important;
}

/* Botones: píldoras con color de marca */
.pagination-wrapper .page-item .page-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 140px;
    padding: 11px 28px;
    border-radius: 50px;           /* píldora */
    border: 2px solid var(--brand-color) !important;
    background: #ffffff !important;
    color: var(--brand-color) !important;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pagination-wrapper .page-item .page-link:hover {
    background: var(--brand-color) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(161, 72, 142, 0.25);
    transform: translateY(-2px);
}

/* Botón deshabilitado (primera/última página) */
.pagination-wrapper .page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* PROTECCIÓN DE IMÁGENES */
.protected-image {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}
.image-protected-wrapper {
    position: relative;
    display: block;
    line-height: 0;
    width: 100%;
    -webkit-touch-callout: none;
    user-select: none;
}
.image-protected-wrapper::after {
    content: '© Vinitácora';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: rgba(255, 255, 255, 0.25);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
    letter-spacing: 4px;
}
.image-shield {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3;
    background: transparent;
    cursor: default;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Gallery cover en modal: hereda dimensiones de .wine-gallery-preview */
.wine-gallery-preview .protected-image {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
}

/* LIGHTBOX (Mantenemos oscuro para foco) */
#lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 4000; align-items: center; justify-content: center; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: white; font-size: 30px; cursor: pointer; padding: 20px; z-index: 4001; }
.lb-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 30px; cursor: pointer; z-index: 4002; }
#lightbox-content { width: 95%; max-width: 900px; max-height: 80vh; position: relative; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }

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

/* ═══ ACORDEÓN DE FILTROS ═══ */
#filtros-vinicolas-wrapper,
#filtros-vinos-wrapper {
    max-width: 800px;
    margin: 14px auto 0;
}
#filtros-region-wrapper {
    max-width: 800px;
    margin: 20px auto 0;
}
/* (Alias por compatibilidad con JS antiguo) */
#filtros-acordeon-wrapper {
    max-width: 800px;
    margin: 14px auto 0;
}

.filtros-acordeon {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

/* Summary (trigger del acordeón) */
.filtros-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}
.filtros-trigger::-webkit-details-marker { display: none; }
.filtros-trigger:hover { background: #fafafa; }

.filtros-trigger-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

/* Badge con conteo de filtros activos */
.filtros-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--brand-color);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
}

.filtros-trigger-chevron {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: transform 0.22s ease;
}
details[open] > .filtros-trigger .filtros-trigger-chevron {
    transform: rotate(180deg);
}

/* Cuerpo expandido */
.filtros-body {
    border-top: 1px solid var(--border-color);
    padding: 14px 16px 16px;
}

.filtros-grupos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Título de cada categoría */
.filtros-grupo-titulo {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: #94a3b8;
    margin-bottom: 7px;
}

/* ── Contenedor: grid denso, auto-fill 52px mínimo ── */
.filtros-pills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 5px;
    align-items: start;
}

/* ── Pill icono-arriba / texto-abajo ── */
.filtro-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    padding: 8px 4px 7px;
    height: 60px;
    border-radius: 10px;
    border: 1px solid #edf0f3;
    background: #f8fafc;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
    user-select: none;
    overflow: hidden;
}
/* Ocultar inputs reales (checkbox y radio) dentro de las pills */
.filtro-pill input[type="checkbox"],
.filtro-pill input[type="radio"] { display: none; }

/* Punto de color para tipos de vino y variedades de uva */
.vino-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid rgba(0,0,0,0.1);
}
.filtro-pill.active .vino-color-dot { border-color: rgba(255,255,255,0.4); }

/* Pill "Todos" (limpiar radio) — estilo discreto */
.filtro-pill--limpiar {
    border-style: dashed;
    opacity: 0.75;
}
.filtro-pill--limpiar:hover { opacity: 1; }

/* Icono centrado */
.filtro-pill i {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

/* Etiqueta de texto: 2 líneas máx, centrada */
.filtro-pill-label {
    font-size: 0.6rem;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
}

.filtro-pill:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
    background: rgba(161, 72, 142, 0.04);
    box-shadow: 0 2px 8px rgba(161, 72, 142, 0.1);
}

.filtro-pill.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(161, 72, 142, 0.28);
}

/* Botón "+ N más" — ocupa toda la fila del grid */
.ver-mas-btn {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 12px;
    border: none;
    background: transparent;
    color: var(--brand-color);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border-radius: 20px;
    transition: background 0.15s;
    line-height: 1.3;
    width: fit-content;
    margin-top: 2px;
}
.ver-mas-btn:hover { background: rgba(161, 72, 142, 0.07); }

/* Footer con limpiar filtros */
.filtros-footer {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}
.filtros-clear {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ef4444;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 20px;
    border: none;
    background: rgba(239, 68, 68, 0.07);
    transition: background 0.2s;
    cursor: pointer;
}
.filtros-clear:hover { background: rgba(239, 68, 68, 0.14); }

/* ═══ AMENIDADES MINI EN TARJETAS ═══ */
.card-amenidades {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.amenidad-mini {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(161, 72, 142, 0.08);
    color: var(--brand-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    border: 1px solid rgba(161, 72, 142, 0.15);
    flex-shrink: 0;
    transition: background 0.2s;
}
.vinicola-card:hover .amenidad-mini { background: rgba(161, 72, 142, 0.14); }

.amenidad-more {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: #f1f5f9;
    border-color: var(--border-color);
}

@media (max-width: 768px) {
    .main-title { font-size: 2.2rem; }
    .navbar { padding: 15px 20px; }
    .grid-vinicolas { grid-template-columns: 1fr; }
    .wines-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

.logo-img{ width: 50%; height: auto; }
@media (min-width: 992px){ .logo-img{ width: 50%; } }

.btn-main {
    flex: 1; max-width: 500px;
    background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-dark) 100%);
    color: #ffffff; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    padding: 14px; border-radius: 50px; text-align: center; text-decoration: none;
    box-shadow: 0 0 20px rgba(161, 72, 142, 0.3);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; transition: all 0.3s ease;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(161, 72, 142, 0.5);
}

.btn-main:active { transform: translateY(0); }

/* ── CONTROLES DE VISTA (TOGGLE PAGINADO / VER TODOS) ────────── */
.catalogo-view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.results-count {
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
    font-weight: 600;
}
.view-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}
.toggle-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.toggle-btn.active {
    background: var(--brand-color, #a1488e);
    color: #fff;
    box-shadow: 0 2px 8px rgba(161, 72, 142, 0.3);
}
.toggle-btn:hover:not(.active) {
    color: var(--brand-color, #a1488e);
}

/* ── SPINNER COLOR UVA ─────────────────────────────────────────── */
.infinite-scroll-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
}
.spinner-uva {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top-color: var(--brand-color, #a1488e);
    border-radius: 50%;
    animation: spin-uva 0.8s linear infinite;
}
@keyframes spin-uva {
    to { transform: rotate(360deg); }
}

/* ── MENSAJE FIN DEL CATÁLOGO ─────────────────────────────────── */
.infinite-scroll-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 0 20px;
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
}
.infinite-scroll-end i {
    font-size: 2rem;
    opacity: 0.3;
    color: var(--brand-color, #a1488e);
}

/* ── SENTINEL (invisible, target del IntersectionObserver) ──── */
.infinite-scroll-sentinel {
    height: 1px;
    width: 100%;
}

/* ── BOTÓN FLOTANTE "IR ARRIBA" ──────────────────────────────── */
.back-to-top-btn {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--brand-color, #A1488E), var(--brand-dark, #7a356b));
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(161, 72, 142, 0.45);
    opacity: 0;
    transform: translateY(12px) scale(0.85);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.back-to-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.back-to-top-btn:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 20px rgba(161, 72, 142, 0.55);
}
@media (max-width: 768px) {
    .back-to-top-btn { bottom: 74px; right: 16px; width: 42px; height: 42px; }
}

/* ═══════════════════════════════════════════════════════════════════
   FILTRO REGIÓN / VALLE — Acordeón + Alpine.js + AJAX
   ═══════════════════════════════════════════════════════════════════ */

/* Pistas de píldoras — wrap, sin scroll */
.region-pills-track,
.valle-pills-track {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-bottom: 4px;
}

/* Barra de carga AJAX */
.region-loading-bar {
    height: 3px;
    background: rgba(161, 72, 142, 0.12);
    border-radius: 3px;
    margin-bottom: 12px;
    overflow: hidden;
}
.region-loading-progress {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--brand-color, #A1488E), #C9A84C);
    border-radius: 3px;
    animation: region-progress 1.2s ease-in-out infinite;
}
@keyframes region-progress {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* Estado vacío (sin resultados tras filtro AJAX) */
.catalog-empty-msg {
    text-align: center;
    padding: 50px 20px;
    color: #64748b;
}
.catalog-empty-msg i {
    display: block;
    font-size: 2.5rem;
    opacity: 0.3;
    margin-bottom: 14px;
    color: var(--brand-color, #A1488E);
}

/* ── Pills de Región ──────────────────────────────────────────── */
.region-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
    white-space: nowrap;
    letter-spacing: 0.1px;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.region-pill:hover:not(.is-active) {
    border-color: rgba(161, 72, 142, 0.45);
    color: var(--brand-color, #A1488E);
    background: rgba(161, 72, 142, 0.07);
    transform: translateY(-1px);
}

.region-pill.is-active {
    background: linear-gradient(135deg, var(--brand-color, #A1488E) 0%, var(--brand-dark, #7a356b) 100%);
    border-color: #C9A84C;
    color: #fff;
    box-shadow:
        0 0 0 2px rgba(201, 168, 76, 0.22),
        0 4px 14px rgba(161, 72, 142, 0.38);
    transform: translateY(-2px);
}

/* ── Sub-sección de Valles ────────────────────────────────────── */
.valle-pills-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(161, 72, 142, 0.22);
}

.valle-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #A1488E;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.75;
}

/* ── Pills de Valle (más pequeñas y elegantes) ────────────────── */
.valle-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(226, 232, 240, 0.85);
    background: transparent;
    color: #64748b;
    white-space: nowrap;
    letter-spacing: 0.1px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.valle-pill:hover:not(.is-active) {
    border-color: rgba(161, 72, 142, 0.4);
    color: var(--brand-color, #A1488E);
    background: rgba(161, 72, 142, 0.07);
    transform: translateY(-1px);
}

.valle-pill.is-active {
    background: rgba(161, 72, 142, 0.11);
    border-color: var(--brand-color, #A1488E);
    color: var(--brand-color, #A1488E);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(161, 72, 142, 0.18);
    transform: translateY(-1px);
}

/* ── Botón "Ver más / Ver menos" geográfico ──────────────────── */
.geo-ver-mas-btn {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--brand-color, #A1488E);
    background: rgba(161, 72, 142, 0.07);
    border: 1px solid rgba(161, 72, 142, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.geo-ver-mas-btn:hover {
    background: rgba(161, 72, 142, 0.13);
    border-color: rgba(161, 72, 142, 0.4);
}

.geo-ver-mas-btn--valle {
    margin-top: 8px;
    font-size: 11px;
}

/* ── Transición de apertura del bloque Valles (Alpine) ───────── */
.valle-enter {
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.valle-enter-start {
    opacity: 0;
    transform: translateY(-6px);
}
.valle-enter-end {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive móvil ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .region-filter-section {
        margin: 12px 0 0;
        padding: 12px 0 4px;
    }

    .region-pill {
        padding: 6px 14px;
        font-size: 12.5px;
    }

    .valle-pill {
        padding: 5px 11px;
        font-size: 11.5px;
    }

    .region-filter-title {
        font-size: 9.5px;
    }
}
