/* layout.css - Navbar, search, main content layout */
/* Generado automáticamente a partir de styles.css */

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(138, 43, 226, 0.1);
    transition: var(--transition);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 4px;
    padding-right: 4px;
    gap: 16px;
    width: 95%;
    max-width: 95%;
    margin: 0 auto;
    position: relative;
}

.nav-brand {
    font-weight: 700;
    color: var(--dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-brand:hover {
    transform: scale(1.05);
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.hamburger:hover {
    background: rgba(138,43,226,0.08);
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Nav content (toolbar wrapper) */
.nav-content {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-content {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 1rem;
        z-index: 1000;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        border-radius: 0 0 12px 12px;
    }
    .nav-content.open {
        display: flex;
    }
    .nav-inner {
        flex-wrap: wrap;
    }
    .search-container {
        width: 100%;
    }
    .toolbar-controls {
        flex-direction: column;
        width: 100%;
    }
    .toolbar-group {
        width: 100%;
        justify-content: center;
    }
    .toolbar-search {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* Keep backward compat for Bootstrap navbar-brand in admin */
.navbar-brand {
    font-weight: 700;
    color: var(--dark);
    transition: var(--transition);
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
}

/* === Controles del toolbar (navbar) === */
.search-container {
    position: relative;
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    margin-left: auto;
    max-width: 100%;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* View toggle buttons */
.view-toggle {
    display: flex;
}
.view-toggle .btn {
    border: 2px solid #e0e0e0;
    background: transparent;
    color: #666;
    font-size: 0.85rem;
    padding: 0 1.4rem;
    height: 36px;
    min-width: 73px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.view-toggle .btn:first-child {
    border-radius: 10px 0 0 10px;
}
.view-toggle .btn:last-child {
    border-radius: 0 10px 10px 0;
    margin-left: -1px;
}
.view-toggle .btn:hover {
    color: var(--primary);
    z-index: 1;
}
.view-toggle .btn.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    z-index: 1;
}
.view-toggle .btn.active:hover {
    background: var(--primary);
    filter: brightness(1.1);
}

/* Select dropdowns unificados */
.toolbar-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.4rem 1.75rem 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    height: 36px;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    min-width: 80px;
}
.toolbar-select:hover {
    border-color: #bbb;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.toolbar-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138,43,226,0.15);
}
.toolbar-select option {
    color: #444;
    background: #fff;
}

/* Barra de búsqueda + botón filtros */
.toolbar-search {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 140px;
    max-width: 320px;
    position: relative;
}
.toolbar-search input {
    flex: 1;
    width: 100%;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #444;
    background: #fff;
    height: 36px;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    outline: none;
}
.toolbar-search input::placeholder {
    color: #999;
    font-weight: 400;
}
.toolbar-search input:hover {
    border-color: #bbb;
}
.toolbar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138,43,226,0.15);
    z-index: 1;
}
.toolbar-search .btn-filter {
    flex-shrink: 0;
    border: none;
    border-radius: 0 10px 10px 0;
    height: 36px;
    padding: 0.4rem 0.75rem;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    position: relative;
}
.toolbar-search .btn-filter:hover {
    background: var(--gradient-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(138,43,226,0.25);
}
.toolbar-search .btn-filter:active {
    transform: translateY(0) scale(0.97);
}

.btn-fav {
    flex-shrink: 0;
    border: none;
    border-radius: 10px;
    min-height: 36px;
    padding: 0.4rem 0.7rem;
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.btn-fav:hover {
    background: linear-gradient(135deg, #f5af19 0%, #e65100 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,175,25,0.25);
}
.btn-fav:active {
    transform: translateY(0) scale(0.97);
}
.btn-fav.active {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    box-shadow: 0 0 0 3px rgba(245,175,25,0.4), 0 4px 12px rgba(245,175,25,0.3);
}

/* Search results dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    border-radius: 0.5rem;
    margin-top: 0.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.search-results.show {
    max-height: 300px;
    opacity: 1;
    overflow-y: auto;
    border: 1px solid #dee2e6;
}

.search-result-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.search-result-item:hover {
    background-color: var(--light-gray);
}

.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
}

.search-result-item div {
    overflow: hidden;
}

.search-result-item h6 {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item .price {
    color: var(--primary);
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding-top: 20px;
    padding-bottom: 80px;
    min-height: calc(100vh - 200px);
    width: 95%;
    max-width: 95%;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--grid-gap);
}

.grid-item {
    min-width: 0;
}

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

@media (max-width: 992px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid.columns-3,
    .products-grid.columns-4 { grid-template-columns: repeat(2, 1fr); }
    .products-grid.columns-5,
    .products-grid.columns-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
    .products-grid,
    .products-grid.columns-3,
    .products-grid.columns-4,
    .products-grid.columns-5,
    .products-grid.columns-6 { grid-template-columns: 1fr; }
}

/* List view */
.products-list {
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
}

/* === Pagination Controls === */
#paginationControls {
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}
#paginationControls:hover {
    box-shadow: 0 -2px 16px rgba(0,0,0,0.08), 0 6px 28px rgba(0,0,0,0.10);
}
#paginationControls .pagination-info-text {
    color: var(--text-muted, #6c757d);
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
}
#paginationControls .pagination {
    margin-bottom: 0;
    gap: 0.25rem;
}
#paginationControls .page-link {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary, #0d6efd);
    background: transparent;
    transition: all 0.2s ease;
    position: relative;
    min-width: 40px;
    text-align: center;
}
#paginationControls .page-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(138,43,226,0.3);
}
#paginationControls .page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(138,43,226,0.35);
    font-weight: 600;
}
#paginationControls .page-item:not(.active):not(.disabled) .page-link:active {
    transform: scale(0.95);
}
#paginationControls .page-item.disabled .page-link {
    color: #adb5bd;
    background: transparent;
    cursor: not-allowed;
    opacity: 0.5;
}
/* Page transition animation */
#paginationControls.page-changing .pagination {
    animation: paginationPulse 0.3s ease;
}
@keyframes paginationPulse {
    0% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 0.8; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 576px) {
    #paginationControls {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.6rem 0.75rem;
        border-radius: 10px;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    #paginationControls .page-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.8rem;
        min-width: 34px;
    }
}

.section-title {
    color: var(--dark);
    position: relative;
    padding-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    /* Usar la tipografÃ­a principal consistente */
    text-align: left !important; /* Alinear tÃ­tulos de secciones a la izquierda */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
