@charset "UTF-8";
/* ==========================================================
   CATALOGO WEB - Hoja de estilos principal
   Requiere: Bootstrap 5 + Bootstrap Icons
   ========================================================== */

/* ── TOKENS ── */
:root {
    --bg:             #f5f4f1;
    --surface:        #ffffff;
    --surface-raised: #faf9f7;
    --border:         #e4e2dc;
    --border-strong:  #ccc9c1;
    --text-primary:   #1c1b18;
    --text-secondary: #6a6760;
    --text-muted:     #a09d97;
    --accent-light:   #edeae3;
    --danger:         #b83232;
    --danger-bg:      #fdf2f2;
    --danger-border:  #e5c5c5;
    --success:        #2a7d4f;
    --navbar-h:       62px;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      14px;
    --shadow-card:    0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover:   0 6px 24px rgba(0,0,0,0.10);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
}

input[type="submit"],
button {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── NAVBAR ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--navbar-h);
    background: rgba(245, 244, 241, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1.75rem;
}

.nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    white-space: nowrap;
}
.nav-brand:hover { color: var(--text-primary); }

.nav-divider {
    width: 1px;
    height: 18px;
    background: var(--border-strong);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
}

.nav-link-item {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.38rem 0.7rem;
    border-radius: var(--radius-sm);
    transition: color 0.14s, background 0.14s;
}
.nav-link-item:hover {
    color: var(--text-primary);
    background: var(--accent-light);
}
.nav-link-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── HAMBURGUESA ──
   Siempre oculto. El bloque @media (max-width:991px) lo hace visible.
   Se usa display:none con !important para asegurarnos que ningún otro
   estilo lo sobreescriba en desktop. ── */
.nav-hamburger {
    display: none !important;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
}
.nav-hamburger:hover {
    background: var(--accent-light);
    border-color: var(--border-strong);
}

/* Tres barras internas → animan a X con .is-open */
.ham-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.28s ease, opacity 0.22s ease;
    transform-origin: center;
}
.nav-hamburger.is-open .ham-bar--top { transform: translateY(7px)  rotate(45deg); }
.nav-hamburger.is-open .ham-bar--mid { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open .ham-bar--bot { transform: translateY(-7px) rotate(-45deg); }

/* ── MENÚ MOBILE ──
   Oculto por defecto con !important.
   Se muestra agregando la clase .nav-open (2 clases = mayor especificidad
   que la regla de abajo → .nav-open gana el !important). ── */
.nav-mobile-menu {
    display: none !important;
}
.nav-mobile-menu.nav-open {
    display: flex !important;
    flex-direction: column;
    position: sticky;
    top: var(--navbar-h);
    z-index: 999;
    width: 100%;
    background: rgba(245, 244, 241, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 0.75rem;
    gap: 0.1rem;
    animation: menuSlideDown 0.22s ease forwards;
}
@keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nav-mobile-menu .nav-link-item {
    font-size: 14.5px;
    font-weight: 400;
    padding: 0.7rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
}
.nav-mobile-menu .nav-link-item:last-child { border-bottom: none; }
.nav-mobile-menu .nav-link-item:hover {
    background: var(--accent-light);
    color: var(--text-primary);
}

/* ── BOTONES ── */
.btn-primary,
input[type="submit"].btn-primary {
    background: var(--text-primary) !important;
    border: 1.5px solid var(--text-primary) !important;
    color: #fff !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 13.5px;
    font-weight: 500;
    padding: 0.44rem 1.05rem;
    border-radius: var(--radius-sm);
    transition: background 0.14s, border-color 0.14s;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    line-height: 1.5;
}
.btn-primary:hover,
input[type="submit"].btn-primary:hover {
    background: #2e2d29 !important;
    border-color: #2e2d29 !important;
    color: #fff !important;
}

.btn-outline,
input[type="submit"].btn-outline {
    background: transparent !important;
    border: 1.5px solid var(--border-strong) !important;
    color: var(--text-primary) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 13.5px;
    font-weight: 400;
    padding: 0.44rem 1.05rem;
    border-radius: var(--radius-sm);
    transition: border-color 0.14s, background 0.14s;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    line-height: 1.5;
}
.btn-outline:hover {
    border-color: var(--text-primary) !important;
    background: var(--accent-light) !important;
    color: var(--text-primary) !important;
}

.btn-ghost,
input[type="submit"].btn-ghost {
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 13.5px;
    font-weight: 400;
    padding: 0.44rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: color 0.14s, background 0.14s;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    line-height: 1.5;
}
.btn-ghost:hover {
    color: var(--text-primary) !important;
    background: var(--accent-light) !important;
}

.btn-danger-soft,
input[type="submit"].btn-danger-soft {
    background: transparent !important;
    border: 1.5px solid var(--danger-border) !important;
    color: var(--danger) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 13.5px;
    font-weight: 400;
    padding: 0.44rem 1.05rem;
    border-radius: var(--radius-sm);
    transition: background 0.14s, border-color 0.14s;
    cursor: pointer;
    display: inline-block;
    line-height: 1.5;
}
.btn-danger-soft:hover {
    background: var(--danger-bg) !important;
    border-color: var(--danger) !important;
}

.btn-secondary,
input[type="submit"].btn-secondary {
    background: var(--surface-raised) !important;
    border: 1.5px solid var(--border) !important;
    color: var(--text-secondary) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 13.5px;
    font-weight: 400;
    padding: 0.44rem 1.05rem;
    border-radius: var(--radius-sm);
    transition: background 0.14s;
    cursor: pointer;
    display: inline-block;
    line-height: 1.5;
}
.btn-secondary:hover {
    background: var(--accent-light) !important;
    color: var(--text-primary) !important;
}

.btn-select {
    background: transparent !important;
    border: 1.5px solid var(--border) !important;
    color: var(--text-primary) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 12.5px;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s;
}
.btn-select:hover {
    background: var(--accent-light) !important;
    border-color: var(--text-primary) !important;
}

/* ── LAYOUT ── */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* ── PAGE HEADER ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin: 0 0 0.2rem;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 13.5px;
    margin: 0;
}

.btnFavorito {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
}
.btnFavorito i {
    color: var(--text-muted);
    transition: color 0.2s ease;
}
.btnFavorito:hover {
    transform: scale(1.15);
}
.btnFavorito:hover i {
    color: #e03131;
}
.btnFavorito i.fav-activo {
    color: #e03131;
}

/* ── SEARCH BAR ── */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.search-bar .form-control {
    max-width: 300px;
    flex: 1;
    min-width: 140px;
}

/* ── CATALOG CARDS ── */
.catalog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-strong);
}
.catalog-card img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: #ede9e2;
    display: block;
    padding: 1rem;
}
.catalog-card {
    display: flex;
    flex-direction: column;
}
.catalog-card-body {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.catalog-card-title {
    font-weight: 600;
    font-size: 14.5px;
    margin: 0 0 0.3rem;
    color: var(--text-primary);
}
.catalog-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 0.85rem;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── FORMULARIOS ── */
.form-control,
.form-select {
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 13.5px !important;
    padding: 0.48rem 0.8rem !important;
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    transition: border-color 0.14s;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--text-primary) !important;
    box-shadow: none !important;
    outline: none;
}
.form-control::placeholder {
    color: var(--text-muted) !important;
    font-weight: 300;
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.32rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: block;
}

/* ── TABLAS ── */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    /* overflow:hidden recorta el contenido en las esquinas redondeadas */
    overflow: hidden;
    /* overflow-x:auto sobre-escribe sólo el eje X → scroll horizontal cuando hace falta */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
/* Scrollbar delgado y estilizado */
.panel::-webkit-scrollbar        { height: 5px; }
.panel::-webkit-scrollbar-track  { background: var(--surface-raised); }
.panel::-webkit-scrollbar-thumb  { background: var(--border-strong); border-radius: 3px; }
.panel::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* .panel-scroll ya no se usa como wrapper de scroll,
   se mantiene por compatibilidad pero sin overflow */
.panel-scroll { width: 100%; }

.table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
    width: 100%;
    margin: 0 !important;
    /* Ancho mínimo: fuerza scroll horizontal en viewports angostos */
    min-width: 620px;
}
.table thead th {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border) !important;
    border-top: none !important;
    padding: 0.7rem 1rem;
    background: var(--surface-raised);
}
.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border) !important;
    border-top: none !important;
    color: var(--text-primary);
    vertical-align: middle;
}
.table tbody tr:last-child td {
    border-bottom: none !important;
}
.table tbody tr:hover td {
    background: var(--surface-raised);
}

/* Paginación del GridView */
.gridview-pager td {
    padding: 0.75rem 1rem;
    border: none !important;
    background: var(--surface-raised);
    text-align: center;
    border-top: 1px solid var(--border) !important;
}
.gridview-pager a,
.gridview-pager span {
    display: inline-block;
    padding: 0.28rem 0.65rem;
    font-size: 12.5px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 0 2px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.14s, border-color 0.14s;
}
.gridview-pager a:hover {
    background: var(--accent-light);
    border-color: var(--border-strong);
}
.gridview-pager span {
    background: var(--text-primary);
    color: #fff !important;
    border-color: var(--text-primary);
}

/* ── MENSAJES DE VALIDACIÓN ── */
.validation-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 0.28rem;
    display: block;
}

span[style*="color:Red"],
span[style*="color: Red"],
span[style*="color:red"] {
    font-size: 12px !important;
    margin-top: 0.28rem;
    display: block;
}

/* ── AUTH (Login / Registrarse) ── */
.auth-wrapper {
    min-height: calc(100vh - var(--navbar-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: -2.5rem -2rem;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-card);
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}

.auth-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 1.75rem;
}

.auth-footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 1.5rem;
}
.auth-footer a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ── TAG ── */
.tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: var(--accent-light);
    color: var(--text-secondary);
}

/* ── FILTRO AVANZADO ── */
.filter-bar {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.filter-bar .form-label {
    margin-bottom: 0.25rem;
}
/* FIX responsive: columnas del filtro avanzado apilan en mobile */
.filter-bar .row {
    flex-wrap: wrap;
}
.filter-bar .col-auto {
    flex: 1 1 140px;
    min-width: 120px;
}

/* ── ESTADO VACÍO ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 2.25rem;
    display: block;
    margin-bottom: 0.9rem;
    opacity: 0.35;
}
.empty-state p {
    font-size: 14.5px;
    margin: 0;
}

/* ── OCULTO (GridView Id column) ── */
.oculto { display: none !important; }

/* ── SEPARADOR ── */
.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* ── CHECKBOX PERSONALIZADO ── */
.form-check-input:checked {
    background-color: var(--text-primary) !important;
    border-color: var(--text-primary) !important;
}
.form-check-label {
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* ── DETALLE: título responsive ── */
.detalle-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    line-height: 1.2;
    word-break: break-word;
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {

    /* Navbar mobile: ocultar links de escritorio, mostrar hamburguesa */
    .site-nav {
        padding: 0 1rem;
        gap: 1rem;
    }
    .nav-divider { display: none !important; }
    .nav-links   { display: none !important; }
    .nav-actions { margin-left: 0; }

    /* Mostrar hamburguesa — !important necesario para pisar el none !important del default */
    .nav-hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
    }

    /* Layout */
    .main-content { padding: 1.5rem 1rem; }
    .auth-wrapper { margin: -1.5rem -1rem; padding: 1.5rem 1rem; }

    /* Page header */
    .page-header { flex-direction: column; align-items: flex-start; }

    /* Search bar: input ocupa toda la fila */
    .search-bar .form-control {
        max-width: 100%;
        width: 100%;
    }

    /* Detalle: título más chico */
    .detalle-titulo { font-size: 1.5rem; }

    /* Auth card: menos padding en pantallas chicas */
    .auth-card { padding: 1.5rem; }

    /* Filtro avanzado: cada campo ocupa su fila */
    .filter-bar .col-auto {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .page-title { font-size: 1.5rem; }
    .catalog-card img { height: 200px; }
}
