﻿/* Файл wwwroot\css\cable-details.css */

/* Стили для карточки товара */
.cable-details-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 20px;
    color: #999;
    font-size: 14px;
}

    .breadcrumbs a {
        color: #666;
        text-decoration: none;
        transition: color 0.2s;
    }

        .breadcrumbs a:hover {
            color: #cc0000;
            text-decoration: underline;
        }

    .breadcrumbs span {
        color: #333;
        font-weight: bold;
    }

/* Основной контент */
.cable-details-content {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Левая колонка с изображением */
.cable-image-section {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.main-image-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.main-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

    .thumbnail:hover {
        border-color: #999;
    }

    .thumbnail.active {
        border-color: #cc0000;
    }

/* Правая колонка с информацией */
.cable-info-section {
    flex: 1;
    min-width: 300px;
}

.cable-title {
    color: #333;
    font-size: 28px;
    margin: 0 0 10px 0;
}

.cable-sku {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
}

.cable-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 20px;
}

    .cable-status.in-stock {
        background: #e6f7e6;
        color: #00aa00;
    }

    .cable-status.out-of-stock {
        background: #ffeeee;
        color: #cc0000;
    }

/* Цена и действия */
.cable-price-block {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 25px;
    width: fit-content; /* панель будет по ширине содержимого */
    max-width: 100%; /* но не шире родительского контейнера */
}

.cable-price {
    margin-bottom: 15px;
}

.price-value {
    font-size: 32px;
    font-weight: bold;
    color: #cc0000;
}

.price-currency {
    font-size: 16px;
    color: #666;
    margin-left: 5px;
}

.cable-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* Контролы количества (копируем из корзины) */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s;
}

    .quantity-btn:hover {
        background: #f5f5f5;
        border-color: #cc0000;
        color: #cc0000;
    }

.quantity-input {
    width: 70px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: white;
    -moz-appearance: textfield;
}

    .quantity-input::-webkit-outer-spin-button,
    .quantity-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .quantity-input:focus {
        outline: none;
        border-color: #cc0000;
    }

/* Кнопка добавления в корзину */
.add-to-cart-detail-btn {
    background: #cc0000;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 120px; /* было 200px, уменьшено до 120px */
    width: auto; /* чтобы не растягивалась */
}

    .add-to-cart-detail-btn:hover {
        background: #990000;
    }

    .add-to-cart-detail-btn svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

/* Описания */
.cable-description,
.cable-detailed-description {
    margin-bottom: 25px;
}

    .cable-description h3,
    .cable-detailed-description h3 {
        color: #333;
        font-size: 18px;
        margin: 0 0 10px 0;
        padding-bottom: 5px;
        border-bottom: 1px solid #ddd;
    }

    .cable-description p,
    .cable-detailed-description p {
        color: #666;
        line-height: 1.6;
        margin: 0;
    }

/* Таблица характеристик */
.cable-specifications {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

    .cable-specifications h2 {
        color: #333;
        font-size: 22px;
        margin: 0 0 20px 0;
    }

/*.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

    .specs-table tr {
        border-bottom: 1px solid #eee;
    }

        .specs-table tr:last-child {
            border-bottom: none;
        }

    .specs-table th {
        width: 250px;
        padding: 12px 20px;
        background: #f5f5f5;
        color: #333;
        font-weight: bold;
        font-size: 14px;
        text-align: left;
        border-right: 1px solid #ddd;
    }

    .specs-table td {
        padding: 12px 20px;
        color: #666;
        font-size: 14px;
    }

    .specs-table tr:hover td {
        background: #fafafa;
    }*/

/* Уведомление */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #00aa00;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .cable-details-content {
        flex-direction: column;
    }

    .cable-image-section {
        max-width: 100%;
    }

    .cable-title {
        font-size: 24px;
    }

    .price-value {
        font-size: 28px;
    }

    .cable-actions {
        flex-direction: column;
    }

    .add-to-cart-detail-btn {
        width: 100%;
    }

    .specs-table th {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .specs-table th {
        display: block;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .specs-table td {
        display: block;
        width: 100%;
    }
}

/* Стили для кнопки перехода в корзину */
.goto-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

    .goto-cart-btn:hover {
        background: #45a049;
    }

    .goto-cart-btn svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

/* Компактный блок действий 
.cable-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

 Уменьшенные контролы количества 
.quantity-control {
    display: flex;
    align-items: center;
    gap: 3px;
    background: white;
    border-radius: 4px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .quantity-btn:hover {
        background: #f5f5f5;
        border-color: #cc0000;
        color: #cc0000;
    }

.quantity-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    -moz-appearance: textfield;
}

 Уменьшенная кнопка добавления 
.add-to-cart-detail-btn {
    background: #cc0000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

    .add-to-cart-detail-btn:hover {
        background: #990000;
    }
*/

/* Компактная таблица */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

    .specs-table tr {
        border-bottom: 1px solid #eee;
    }

        .specs-table tr:last-child {
            border-bottom: none;
        }

    .specs-table th {
        width: 200px;
        padding: 6px 12px;
        background: #f5f5f5;
        color: #333;
        font-weight: bold;
        font-size: 14px;
        text-align: left;
        border-right: 1px solid #ddd;
    }

    .specs-table td {
        padding: 6px 12px;
        color: #666;
        font-size: 14px;
    }

    .specs-table tr:hover td {
        background: #fafafa;


/*Уменьшенный блок с ценой
.cable-price-block {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}


.price-value {
    font-size: 28px;
    font-weight: bold;
    color: #cc0000;
}*/
        /* Адаптивность для мобильных */
        @media (max-width: 768px) {
            .cable-actions {
                flex-direction: column;
                align-items: stretch;
            }

            .goto-cart-btn,
            .add-to-cart-detail-btn {
                width: 100%;
            }
        }
