/* Department Page Styles */

:root {
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

.department-container {
    padding: 40px 0;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.shop-layout {
    display: flex;
    gap: 30px;
}

/* Sidebar */
.shop-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.sidebar-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.sidebar-box:hover {
    transform: translateY(-5px);
}

.sidebar-box h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #fce863;
    padding-bottom: 10px;
}

.filter-list {
    list-style: none;
    padding: 0;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    transition: var(--transition-speed);
    border-radius: 6px;
}

.filter-link:hover {
    color: var(--primary-color);
    padding-left: 8px;
    background: rgba(252, 232, 99, 0.05);
}

.filter-link span.count {
    background: #f8f9fa;
    color: #999;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* Price Filter */
.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: 0.3s;
}

.price-inputs input:focus {
    border-color: var(--primary-color);
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(252, 232, 99, 0.2);
}

.btn-filter {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 12px;
}

.btn-filter:hover {
    background: var(--primary-color);
    color: #1a1a1a;
    transform: scale(0.98);
}

/* Main Content */
.shop-main {
    flex-grow: 1;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.shop-header h2 {
    font-size: 28px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.sort-select {
    padding: 12px 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
}

.sort-select:hover {
    border-color: var(--primary-color);
}

/* Product Grid */
.product-listing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Mobile Menu Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

/* Responsive Updates */
@media (max-width: 1200px) {
    .product-listing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .shop-layout {
        flex-direction: column;
    }

    .shop-sidebar {
        display: none;
        /* Ocultamos sidebar en favor del menú hamburguesa */
    }

    .product-listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* CORRECCIÓN iPhone 14: Evitar que el select se salga (Imagen 3) */
    .shop-header {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 15px;
    }

    .sort-select {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .product-listing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* PAGINACIÓN LIMPIA (Tus ajustes originales) */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 30px 0;
    gap: 8px;
}

/* Ocultar textos automáticos de Laravel (Imagen 4) */
.pagination-container nav div:first-child,
.pagination li:first-child,
.pagination li:last-child {
    display: none !important;
}

.pagination li a,
.pagination li span {
    padding: 10px 18px;
    border: 1px solid #eee;
    color: #444;
    text-decoration: none;
    border-radius: 8px;
    background: white;
    font-weight: 600;
    transition: 0.3s;
}

.pagination li.active span {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #1a1a1a;
}