/* Scope: .lloguer-catalog */

.lloguer-catalog {
    width: 100%;
    margin-top: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Header & Filters --- */
.lloguer-catalog .catalog-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    gap: 1rem;
    max-width: 1200px;
    width: 100%;
}

.lloguer-catalog .page-title {
    font-size: 2rem; /* approx h1 size */
    font-weight: bold;
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.lloguer-catalog .category-filters {
    text-align: left;
    margin-left: 1em;
}

.lloguer-catalog .filter-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    color: var(--primary-color);
    font-size: 1rem;
    padding: 0;
    text-decoration: underline; /* Mimic link behavior */
}

.lloguer-catalog .filter-btn.active {
    font-weight: bold;
    text-decoration: none;
}

.lloguer-catalog .vbar {
    border-left: 3px solid #000;
    height: 1em;
    display: inline-block;
    margin: 0 0.5em;
    vertical-align: middle;
}

/* --- Search Bar --- */
.lloguer-catalog .search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lloguer-catalog .input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.lloguer-catalog input[type="text"] {
    padding: 8px 30px 8px 10px; /* space for icon */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-family);
    min-width: 200px;
}

.lloguer-catalog .search-icon {
    position: absolute;
    right: 10px;
    color: #ccc;
    pointer-events: none;
}

/* --- Product Grid --- */
.lloguer-catalog .product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Centers items if row isn't full */
    gap: 20px; /* Space between items */
    max-width: 1200px;
}

/* Card Styling (Adapted from your legacy CSS) */
.lloguer-catalog .product-card {
    /* Flex-basis calculation:
       100% / 5 items = 20%. 
       Minus gap adjustment. 
    */
    flex: 0 0 calc(20% - 16px); 
    min-width: 250px; /* Legacy constraint */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lloguer-catalog .card-box {
    height: 250px;
    width: 250px; /* Fixed width per legacy */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbdbdb; /* Light grey border */
    padding: 10px;
    transition: all 0.2s ease;
}

.lloguer-catalog .card-box:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #b5b5b5;
}

.lloguer-catalog .card-box img {
    max-height: 240px;
    max-width: 100%;
    height: auto;
    width: auto;
}

.lloguer-catalog .card-content {
    text-align: center;
    margin-top: 10px;
    width: 250px;
}

.lloguer-catalog .card-title {
    font-size: 18px;
    height: 2.8em; /* Limit height for 2 lines */
    overflow: hidden;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--secondary-color);
}

.lloguer-catalog .more-info {
    color: grey;
    font-size: 0.9em;
    text-decoration: none;
}

/* --- Responsiveness --- */

/* Tablet: 3 columns */
@media screen and (max-width: 1350px) {
    .lloguer-catalog .product-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

/* Mobile: 1 column (centered) */
@media screen and (max-width: 800px) {
    .lloguer-catalog .product-card {
        flex: 0 0 auto;
        width: 250px;
    }
    
    .lloguer-catalog .catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lloguer-catalog #search-bar {
        display: none; /* Keep legacy hide behavior? Or remove this to keep search on mobile */
    }
}