/* static/css/product_detail.css */

/* ========== PRODUCT DETAIL STYLES ========== */

/* Основен контейнер за снимката */
.product-detail-image-container {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Снимка на продукта */
.product-detail-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-in;
}

.product-detail-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Ценова кутия */
.product-price-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

/* Описание на продукта */
.product-description {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
}

/* Таблица със спецификации */
.product-specifications table {
    background: #fff;
}

.product-specifications th {
    background: #f8f9fa;
    width: 40%;
}

/* ========== БУТОНИ И ГРУПИ ========== */

/* Група бутони */
.btn-group .btn {
    border-radius: 8px;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Администраторски бутони */
.btn-warning, .btn-danger {
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Бутон за количка */
.btn-success {
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Бутон за любими */
.btn-outline-danger {
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

/* Бутон за връщане */
.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Разделител */
hr {
    margin: 1rem 0;
}

/* ========== ПРЕПОРЪЧАНИ ПРОДУКТИ ========== */

/* Контейнер за снимка на препоръчан продукт */
.product-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
}

.product-image-container img {
    transition: transform 0.3s ease;
}

.product-image-container:hover img {
    transform: scale(1.05);
}

/* Икона за уголемяване (lightbox ефект) */
.product-image-container .expand-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.product-image-container:hover .expand-icon {
    opacity: 1;
}

/* Карти за препоръчани продукти */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* ========== АНИМАЦИИ ========== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE ДИЗАЙН ========== */

/* Таблет и телефон */
@media (max-width: 768px) {
    .product-detail-image-container {
        min-height: 300px;
    }

    .product-detail-image {
        max-height: 300px;
        margin: 10px auto;
    }

    /* Бутоните да са подредени вертикално на телефон */
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-group .btn {
        border-radius: 8px !important;
        width: 100%;
    }

    .product-price-box h2 {
        font-size: 1.5rem;
    }

    .product-description p {
        font-size: 0.9rem;
    }
}

/* Голям екран */
@media (min-width: 1200px) {
    .product-detail-image {
        max-height: 500px;
    }

    .product-detail-image-container {
        min-height: 500px;
    }
}