/* ===========================
   NAVBAR BASE
   (Las variables de color y la fuente Google Fonts ya NO se
   declaran aquí — vivían duplicadas con valores distintos a los
   de style.css, p.ej. --radius: 8px aquí vs 10px en style.css.
   Ahora todo el sitio usa el único :root de style.css.)
=========================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, #0f0f16 0%, #1a1620 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    transition: transform 0.3s ease;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.navbar-left {
    flex-shrink: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.nav-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.navbar-center {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
    max-width: 900px;
}

.nav-search {
    display: flex;
}

#hideNAButton {
  background-color: transparent;
  color: #c9a84c;
  border: 1px solid #c9a84c;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#hideNAButton:hover {
  background-color: rgba(201, 168, 76, 0.1);
}

#hideNAButton.active {
  background-color: #c9a84c;
  color: #0a0a0a;
}

.nav-search input {
    flex: 1;
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    transition: border-color 0.25s;
}

.nav-search input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.nav-search input:focus {
    border-color: var(--gold-dim);
}

.nav-search button{
    padding: 0.5rem 1.2rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--bg-deep);
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s;
    white-space: nowrap;
}

.nav-search button:hover {
    background: var(--gold-light);
    box-shadow: 0 0 16px rgba(201, 168, 76, 0.3);
}

.nav-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-select {
    padding: 0.3rem 1.5rem 0.3rem 0.6rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a6230'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-color: var(--bg-card);
}

.nav-select:focus,
.nav-select:hover {
    border-color: var(--gold-dim);
    color: var(--text-primary);
}

.nav-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===========================
   SLIDER DE PRECIO
=========================== */
.nav-price-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
    flex: 1;
    max-width: 260px;
}

#priceSlider {
    flex: 1;
}

#minPrice,
#maxPrice {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--gold);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    width: 55px;
    text-align: center;
    padding: 0.2rem 0.3rem;
    outline: none;
    transition: border-color 0.2s;
}

#minPrice:focus,
#maxPrice:focus {
    border-color: var(--gold-dim);
}

#minPrice::-webkit-inner-spin-button,
#maxPrice::-webkit-inner-spin-button,
#minPrice::-webkit-outer-spin-button,
#maxPrice::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.noUi-target {
    background: var(--border);
    border: none;
    box-shadow: none;
    height: 4px;
}

.noUi-connect {
    background: var(--gold);
}

.noUi-handle {
    background: var(--gold);
    border: 2px solid var(--gold-light);
    box-shadow: none;
    border-radius: 50%;
    width: 14px !important;
    height: 14px !important;
    top: -5px !important;
    right: -7px !important;
    cursor: pointer;
    transition: background 0.2s;
}

.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

.noUi-handle:hover {
    background: var(--gold-light);
}

.nav-clear {
    padding: 0.3rem 0.75rem;
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-clear:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* ===========================
   DERECHA — LOGIN Y MENÚ
=========================== */
.navbar-right {
    flex-shrink: 0;
    position: relative;
}

.nav-login {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.1rem;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-login:hover {
    background: var(--gold);
    color: var(--bg-deep);
    box-shadow: 0 0 16px rgba(201, 168, 76, 0.3);
}

.user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 180px;
    z-index: 300;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.user-menu.active {
    display: block;
}

.user-menu-item {
    padding: 0.75rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.user-menu-item:hover {
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold);
}

.user-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* ===========================
   MODAL DE INICIO DE SESIÓN
=========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.active {
    display: flex;
}

.modal p a {
    color: var(--gold);
    text-decoration: none;
}

.modal p a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border);
}

.modal-content h2 {
    font-family: var(--font-display);
    color: var(--gold);
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
}

.modal-content input {
    width: 100%;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--bg-deep);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.25s;
}

.modal-content input:focus {
    border-color: var(--gold-dim);
}

.modal-content button {
    padding: 0.5rem 1.2rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--bg-deep);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s;
    white-space: nowrap;
}

.modal-content button:hover {
    background: var(--gold-light);
    box-shadow: 0 0 16px rgba(201, 168, 76, 0.3);
}

.modal-content .close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--gold);
}

/* ===========================
   RESPONSIVE — MÓVIL
=========================== */
@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .navbar-left {
        text-align: center;
    }

    .navbar-center {
        max-width: 100%;
    }

    .nav-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        min-width: 0;        /* permite que el grid container se ajuste */
    }

     .nav-select {
        min-width: 0;        /* clave: anula el min-width:auto por defecto */
        width: 100%;         /* asegura que ocupe toda su columna */
    }

    .nav-price-filter {
        grid-column: 1 / -1;
        max-width: 100%;
    }

    #minPrice,
    #maxPrice {
        width: 70px;
    }

    .nav-clear {
        grid-column: 1 / -1;
        text-align: center;
    }

    .navbar-right {
        text-align: right;
    }

    .modal-content {
        padding: 1.5rem;
    }
}