/* brand_products.css - Стили для карусели товаров бренда проекта PART-CODES */

.brand-products-page {
    min-height: 100vh;
    background: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Героический заголовок */
.brand-hero {
    position: relative;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 50px 5%;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.brand-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.brand-hero-content {
    display: flex; 
    align-items: center; 
    gap: 25px; 
    position: relative; 
    z-index: 1; 
    flex: 1;
}

.brand-hero-logo {
    height: 90px; 
    width: auto; 
    max-width: 200px; 
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-hero-placeholder {
    width: 90px; 
    height: 90px; 
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 45px; 
    font-weight: bold;
    border: 2px dashed rgba(255, 255, 255, 0.4);
}

.brand-hero-text h1 {
    margin: 0; 
    font-size: 2.2em; 
    font-weight: 700; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.brand-hero-info { 
    margin: 8px 0 0 0; 
    font-size: 1.05em; 
    opacity: 0.9; 
}

.btn-back-hero {
    background: rgba(255, 255, 255, 0.15); 
    color: white; 
    padding: 10px 18px;
    border-radius: 8px; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 8px;
    font-weight: 600; 
    transition: all 0.25s ease; 
    position: relative; 
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 14px;
}

.btn-back-hero:hover {
    background: rgba(255, 255, 255, 0.3); 
    border-color: white; 
    transform: translateX(-3px);
}

/* Контейнер рабочей области */
.brand-products-container {
    max-width: 1400px; 
    margin: 30px auto 0; 
    padding: 0 20px 40px; 
    position: relative;
}

.products-toolbar {
    background: white; 
    padding: 15px 25px; 
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 25px;
}

.toolbar-label { 
    font-size: 15px; 
    font-weight: 600; 
    color: #4a5568; 
}

.products-count-badge { 
    background: #1e3c72; 
    color: white; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-weight: 600; 
    font-size: 13px; 
}

/* Слайдер / Карусель */
.carousel-wrapper {
    position: relative; 
    display: flex; 
    align-items: center; 
    width: 100%;
}

.products-carousel {
    display: flex; 
    gap: 20px; 
    overflow-x: auto; 
    scroll-behavior: smooth;
    padding: 10px 4px; 
    width: 100%;
    scrollbar-width: none;
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

/* Элемент товара в карусели */
.product-item {
    flex: 0 0 calc((100% - (3 * 20px)) / 4);
    min-width: 270px; 
    background: white; 
    border-radius: 10px; 
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); 
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #e2e8f0;
}

.product-item:hover {
    transform: translateY(-4px); 
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.product-item-link { 
    text-decoration: none; 
    color: inherit; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

.product-image-wrapper {
    position: relative; 
    width: 100%; 
    height: 190px; 
    background: #ffffff;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.product-image { 
    max-width: 80%; 
    max-height: 80%; 
    object-fit: contain; 
    transition: transform 0.3s ease; 
}

.product-item:hover .product-image { 
    transform: scale(1.04); 
}

/* Статусы наличия на складе */
.stock-badge { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    padding: 4px 8px; 
    border-radius: 6px; 
    font-size: 11px; 
    font-weight: 600; 
}
.in-stock-badge { background: #e6f4ea; color: #137333; }
.low-stock-badge { background: #fef7e0; color: #b06000; }
.out-of-stock-badge { background: #fce8e6; color: #c5221f; }

/* Текстовый контент детали */
.product-details { 
    padding: 16px; 
    display: flex; 
    flex-direction: column; 
    flex: 1; 
}

.product-name { 
    margin: 0 0 6px 0; 
    font-size: 14px; 
    font-weight: 600; 
    color: #1a202c; 
    line-height: 1.4; 
    min-height: 38px; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.product-meta { 
    margin-bottom: 10px; 
}

.product-sku { 
    font-size: 11px; 
    color: #64748b; 
    background: #f1f5f9; 
    padding: 3px 6px; 
    border-radius: 4px; 
    font-family: monospace;
}

.product-desc { 
    font-size: 12px; 
    color: #64748b; 
    margin: 0 0 14px 0; 
    line-height: 1.4; 
    flex: 1; 
}

/* Цена и добавление в корзину */
.product-price-section { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-top: 10px; 
    border-top: 1px solid #f1f5f9; 
}

.product-price { 
    font-size: 16px; 
    font-weight: 700; 
    color: #0f172a; 
}

.btn-add-to-cart {
    background: #1e3c72; 
    color: white; 
    border: none; 
    width: 32px; 
    height: 32px;
    border-radius: 6px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s;
}

.btn-add-to-cart:hover { 
    background: #2a5298; 
}

.btn-add-to-cart.disabled { 
    background: #cbd5e1; 
    color: #94a3b8; 
    cursor: not-allowed; 
}

/* Кнопки навигации карусели */
.carousel-btn {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 40px; 
    height: 40px;
    background: white; 
    border: 1px solid #cbd5e1; 
    border-radius: 50%; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    cursor: pointer; 
    z-index: 5; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #334155; 
    font-size: 14px; 
    transition: all 0.2s ease;
}

.carousel-btn:hover { 
    background: #1e3c72; 
    color: white; 
    border-color: #1e3c72; 
}

.prev-btn { left: -20px; }
.next-btn { right: -20px; }

/* Пустой результат */
.empty-state { 
    max-width: 500px; 
    margin: 60px auto; 
    text-align: center; 
    padding: 45px 30px; 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); 
    border: 1px solid #e2e8f0;
}

.empty-state-icon { 
    font-size: 50px; 
    color: #94a3b8; 
    margin-bottom: 15px; 
}

.empty-state h2 { 
    margin: 0 0 10px 0; 
    font-size: 20px; 
    color: #1e293b; 
}

.empty-state p { 
    color: #64748b; 
    font-size: 14px; 
    margin: 0 0 25px 0; 
}

.btn-back-empty { 
    display: inline-block; 
    background: #1e3c72; 
    color: white; 
    padding: 10px 24px; 
    border-radius: 6px; 
    text-decoration: none; 
    font-weight: 600; 
    transition: all 0.25s ease; 
}

.btn-back-empty:hover { 
    background: #2a5298; 
}

/* Медиа-запросы адаптивности */
@media (max-width: 1200px) {
    .product-item { flex: 0 0 calc((100% - (2 * 20px)) / 3); }
}
@media (max-width: 900px) {
    .product-item { flex: 0 0 calc((100% - 20px) / 2); }
    .prev-btn { left: -10px; }
    .next-btn { right: -10px; }
}
@media (max-width: 600px) {
    .product-item { flex: 0 0 85%; }
    .carousel-btn { display: none; }
}
