/* --- СТРУКТУРА СТОРІНКИ --- */
.catalog-page { padding: 40px 0 80px; }

/* ЗАГОЛОВОК І СОРТУВАННЯ */
.catalog-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.catalog-title { font-size: 2rem; font-weight: 800; color: #fff; margin: 0; display: flex; align-items: baseline; gap: 15px; }
.products-count { font-size: 1.1rem; color: rgba(255, 255, 255, 0.4); font-weight: 400; margin-left: 10px;}

.sort-select {
    background: rgba(255, 255, 255, 0.05); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px; border-radius: 8px; font-size: 0.95rem; cursor: pointer; outline: none;
}
.sort-select option { background: #1a1a1a; color: #fff; }

.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; }

/* --- САЙДБАР З ФІЛЬТРАМИ --- */
.catalog-sidebar { padding: 25px 20px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.05); }

.filter-block { margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 20px; }
.filter-block:last-of-type { border-bottom: none; margin-bottom: 15px; }
.filter-title { font-size: 1.1rem; color: #fff; font-weight: 600; margin-bottom: 15px; }

.filter-price-inputs { display: flex; align-items: center; gap: 10px; }
.price-input {
    width: 100%; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
    color: #fff; padding: 8px 10px; border-radius: 6px; outline: none; text-align: center;
}
.price-submit-btn {
    background: rgba(255,255,255,0.1); color: #fff; border: none;
    padding: 9px 12px; border-radius: 6px; cursor: pointer; transition: 0.2s;
}
.price-submit-btn:hover { background: var(--accent, #f97316); }

.custom-checkbox {
    display: flex; align-items: center; position: relative; padding-left: 30px;
    margin-bottom: 12px; cursor: pointer; font-size: 0.95rem; color: rgba(255,255,255,0.8); user-select: none;
}
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark {
    position: absolute; top: 0; left: 0; height: 20px; width: 20px;
    background-color: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; transition: 0.2s;
}
.custom-checkbox:hover input ~ .checkmark { border-color: var(--accent, #f97316); }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--accent, #f97316); border-color: var(--accent, #f97316); }
.checkmark:after {
    content: ""; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px;
    border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.custom-checkbox input:checked ~ .checkmark:after { display: block; }

.btn-reset-filters {
    display: block; text-align: center; background: rgba(255,255,255,0.05); color: #fff;
    padding: 10px; border-radius: 8px; text-decoration: none; transition: 0.2s; font-size: 0.9rem;
}
.btn-reset-filters:hover { background: rgba(255,255,255,0.1); }

/* --- ПІДКАТЕГОРІЇ --- */
.catalog-subcategories {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; margin-bottom: 30px;
}
.catalog-subcat-item {
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 15px 10px; display: flex; flex-direction: column;
    align-items: center; text-align: center; text-decoration: none; color: #fff; transition: 0.2s;
}
.catalog-subcat-item:hover {
    background: rgba(249, 115, 22, 0.05); border-color: var(--accent, #f97316); transform: translateY(-3px);
}
.subcat-icon-placeholder { margin-bottom: 10px; height: 45px; display: flex; align-items: center; justify-content: center; }
.subcat-icon-placeholder img { max-height: 45px; object-fit: contain; }
.subcat-name { font-size: 0.85rem; line-height: 1.3; font-weight: 500; }

/* --- СІТКА ТА КАРТКИ ТОВАРІВ --- */
.rz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.product-card-rz {
    position: relative; padding: 15px; border-radius: 16px;
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255,255,255,0.05);
    display: flex; flex-direction: column; transition: 0.3s;
}
.product-card-rz:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.15); transform: translateY(-3px); }

/* Бейджі */
.rz-badges { 
    position: absolute; top: 12px; left: 12px; display: flex; flex-direction: row; 
    flex-wrap: wrap; gap: 6px; z-index: 10; pointer-events: none; 
}
.rz-badges .badge { 
    position: static !important; display: inline-flex; align-items: center; justify-content: center;
    padding: 4px 8px; margin: 0 !important; border-radius: 6px; font-size: 0.75rem; 
    font-weight: 800; text-transform: uppercase; line-height: 1; white-space: nowrap;
}
.rz-badges .badge-yellow { background: #ffa900; color: #000 !important; }
.rz-badges .badge-red { background: #f84147; color: #fff !important; }

/* Кнопки дій (Оновлені) */
.rz-actions-top-right {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.rz-action-btn {
    background: rgba(0, 0, 0, 0.3); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255,255,255,0.5); 
    cursor: pointer; 
    transition: 0.2s;
    backdrop-filter: blur(4px);
}

.rz-action-btn:hover { 
    background: rgba(255, 255, 255, 0.1);
    color: #fff; 
}

.rz-action-btn.is-active { 
    fill: var(--accent, #f97316); 
    color: var(--accent, #f97316); 
    border-color: var(--accent, #f97316);
}
.rz-favorite-btn.is-active { fill: #f84147; color: #f84147; border-color: #f84147; }


/* Зображення та текст */
.rz-image-wrap { display: flex; justify-content: center; align-items: center; height: 180px; margin-bottom: 15px; margin-top: 10px;}
.rz-image-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }

.rz-title {
    font-size: 0.95rem; color: #fff; text-decoration: none; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; /* stylelint-disable-next-line value-no-vendor-prefix */ -webkit-box-orient: vertical; 
    overflow: hidden; word-break: break-word; height: 2.8em; margin-bottom: 8px; transition: 0.2s;
}
.rz-title:hover { color: var(--accent, #f97316); }
.rz-rating { color: #ffa900; font-size: 0.9rem; margin-bottom: 10px; }

/* Блок ціни, статусу та кошика */
.rz-price-cart-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; margin-top: auto; }
.rz-price-block { display: flex; flex-direction: column; }
.rz-old-price { color: rgba(255,255,255,0.4); font-size: 0.9rem; text-decoration: line-through; margin-bottom: 2px; }
.rz-current-price { font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.rz-current-price.red-price { color: #f84147; }

.rz-stock-status { font-size: 0.85rem; color: #10b981; font-weight: 500; }
.rz-stock-status.out-of-stock { color: rgba(255,255,255,0.4); }

.rz-cart-btn {
    background: var(--accent, #f97316); border: none; border-radius: 12px; width: 44px; height: 44px;
    display: flex; justify-content: center; align-items: center; color: white;
    cursor: pointer; transition: 0.2s;
}
.rz-cart-btn:hover { background: #ea580c; transform: scale(1.05); }

/* Пагінація та порожній стан */
.empty-catalog { text-align: center; padding: 50px 20px; color: rgba(255,255,255,0.6); grid-column: 1/-1; }
.catalog-pagination { display: flex; justify-content: center; margin-top: 40px; }
.btn-load-more {
    background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 40px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-load-more:hover { background: rgba(255,255,255,0.1); border-color: var(--accent, #f97316); color: var(--accent, #f97316); }

/* Скрол для списку брендів */
.brands-scroll-list {
    max-height: 220px; overflow-y: auto; padding-right: 5px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.brands-scroll-list::-webkit-scrollbar { width: 4px; }
.brands-scroll-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

/* АДАПТАЦІЯ */
@media (max-width: 1024px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { display: none; }
}
@media (max-width: 600px) {
    .catalog-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .rz-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card-rz { padding: 12px; }
    .rz-image-wrap { height: 130px; }
    .rz-current-price { font-size: 1.3rem; }
    .rz-cart-btn { width: 36px; height: 36px; border-radius: 8px;}
    .rz-title { font-size: 0.85rem; }
    .catalog-subcategories { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
    .rz-action-btn { width: 30px; height: 30px; }
    .rz-action-btn svg { width: 16px; height: 16px; }
}