/* Products Grid and List View Styles */

/* Grid View - 6 колонок на весь экран */
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

/* List View */
.products-list {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.products-list.active {
    display: flex;
}

.products-grid.hidden {
    display: none;
}

/* List Item Styling */
.product-list-item {
    display: flex;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-list-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    margin-right: 1.5rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.product-list-image .product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
}

.product-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.product-list-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.3;
}

.product-list-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success-color);
    margin: 0;
}

.product-list-description {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-list-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-list-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-list-item {
        flex-direction: column;
        text-align: center;
    }
    
    .product-list-image {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* View Toggle Buttons */
.btn-group .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-group .btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

/* Product Meta Information */
.product-meta {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.product-meta small {
    font-size: 0.8rem;
    line-height: 1.3;
}

.product-list-meta-detailed {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
    margin-top: 0.5rem;
}

.product-list-meta-detailed small {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Row View Styling */
.products-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-row-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.product-row-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-row-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    margin-right: 1rem;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
}

.product-row-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.product-row-info {
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

.product-row-name {
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.product-row-meta {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

.product-row-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-color);
    margin: 0;
    white-space: nowrap;
}

.product-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.product-row-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.product-row-btn:hover {
    background: #e55a2b;
    transform: scale(1.05);
}
