* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #e4ebf5;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #e4ebf5;
    box-shadow: 5px 5px 10px #cbced1, -5px -5px 10px #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: bold;
    font-size: 22px;
    color: #333;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    background: #e4ebf5;
    border: none;
    border-radius: 10px;
    box-shadow: inset 3px 3px 6px #cbced1, inset -3px -3px 6px #ffffff;
    font-size: 15px;
    outline: none;
    color: #333;
}

.header-right {
    width: 100px;
}

.controls-bar {
    max-width: 1400px;
    margin: 20px auto 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-start;
}

.sort-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.neumo-btn {
    padding: 10px 18px;
    background: #e4ebf5;
    border: none;
    border-radius: 8px;
    box-shadow: 4px 4px 8px #cbced1, -4px -4px 8px #ffffff;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    font-weight: 600;
    transition: all 0.2s ease;
}

.neumo-btn:hover {
    color: #007bff;
}

.neumo-btn.active {
    box-shadow: inset 3px 3px 6px #cbced1, inset -3px -3px 6px #ffffff;
    color: #007bff;
}

.main-content {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Пагинация стилове със стрелки и точки */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.top-pagination {
    margin-bottom: 20px;
}

.bottom-pagination {
    margin-top: 30px;
}

.page-btn {
    padding: 8px 12px;
    background: #e4ebf5;
    border: none;
    border-radius: 6px;
    box-shadow: 3px 3px 6px #cbced1, -3px -3px 6px #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    color: #444;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    color: #007bff;
}

.page-btn.active {
    box-shadow: inset 2px 2px 4px #cbced1, inset -2px -2px 4px #ffffff;
    color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    padding: 8px 6px;
    font-size: 13px;
    color: #666;
    font-weight: bold;
}

.products-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(4, 1fr);
}

.product-card {
    display: flex;
    background: #e4ebf5;
    border-radius: 12px;
    box-shadow: 6px 6px 12px #cbced1, -6px -6px 12px #ffffff;
    overflow: hidden;
    height: 140px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: scale(1.02);
    box-shadow: 8px 8px 16px #bcbfc2, -8px -8px 16px #ffffff;
}

/* Лупа ефект (Magnifying glass zoom) при ховър */
.product-image {
    width: 40%;
    cursor: zoom-in;
    overflow: hidden;
    background-color: #ddd;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}

.product-info {
    width: 60%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-title {
    font-size: 15px;
    margin-bottom: 6px;
    color: #333;
    font-weight: bold;
}

/* Син лейбъл за каталожния номер */
.product-catalog-badge {
    display: inline-block;
    background-color: #007bff;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    width: fit-content;
    box-shadow: 2px 2px 4px rgba(0, 123, 255, 0.3);
}

.product-price {
    font-size: 15px;
    font-weight: bold;
    color: #28a745;
    margin-top: auto;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(255,255,255,0.2);
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
    
    .search-bar {
        width: 100%;
        margin: 0;
    }
    
    .header-right {
        display: none;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}