/* Стили для страницы товара McPlantsNavan */
/* Основаны на дизайне каталога растений */

/* Design Tokens - Используем глобальные переменные из style.css */
/* Не переопределяем :root, чтобы не конфликтовать с другими страницами */

/* Основной контейнер страницы */
.plant-detail-container {
    background: transparent;
    padding: 0;
    margin: 0;
}

/* Галерея изображений */
.plant-gallery-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Главное изображение */
.main-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    margin-bottom: 20px;
}

.main-image-wrapper {
    position: relative;
    padding-bottom: 75%; /* Соотношение 4:3 */
    overflow: hidden;
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.main-image:hover {
    transform: scale(1.05);
}

/* Миниатюры галереи */
.thumbnail-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-olive) #f1f1f1;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: white;
    border-radius: 3px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: var(--color-olive);
    border-radius: 3px;
}

.thumbnail-item {
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-item.primary {
    border-color: var(--color-olive);
    box-shadow: 0 0 0 2px rgba(184, 199, 106, 0.2);
}

.thumbnail-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.thumbnail-item:hover .thumbnail-img {
    transform: scale(1.1);
}

.thumbnail-img.active {
    opacity: 0.7;
}

/* Контейнер с характеристиками растения */
.plant-features-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* Заголовок растения */
.plant-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--color-sky);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.scientific-name {
    font-family: 'Outfit', sans-serif;
    font-style: italic;
    color: var(--color-light-gray);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

/* Секция цены - как в каталоге */
.price-section {
    margin: 20px 0;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.old-price {
    text-decoration: line-through;
    color: var(--color-light-gray);
    font-size: 14px;
    font-weight: 400;
}

.new-price {
    color: var(--color-olive);
    font-size: 18px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.price {
    color: var(--color-dark-gray);
    font-size: 18px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

/* Секция наличия */
.availability-section {
    margin-bottom: 20px;
}

.availability-badge {
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

/* Быстрые характеристики как в каталоге */
.quick-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
}

.feature-cold {
    background: rgba(135, 206, 235, 0.2);
    color: var(--color-sky);
}

.feature-care {
    background: rgba(107, 142, 35, 0.2);
    color: var(--color-olive);
}

.feature-height {
    background: rgba(107, 107, 107, 0.2);
    color: var(--color-light-gray);
}

.feature-icon {
    font-size: 10px;
}

/* Мета информация */
.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 12px;
}

.category-link {
    color: var(--color-olive);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-link:hover {
    color: var(--color-sky);
    text-decoration: underline;
}

.rating-info {
    color: var(--color-light-gray);
    font-size: 0.9rem;
}

.admin-actions {
    margin-left: auto;
}

.admin-actions a {
    color: var(--color-light-gray);
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 12px;
    transition: color 0.3s ease;
}

.admin-actions a:hover {
    color: var(--color-sky);
}

.admin-actions a.text-danger {
    color: var(--danger-color);
}

.admin-actions a.text-danger:hover {
    color: #c82333;
}

/* Вкладки */
.plant-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 24px;
}

.nav-tabs .nav-link {
    color: var(--color-dark-gray);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    padding: 12px 24px;
    margin-right: 8px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    transition: all 0.3s ease;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--color-olive);
    background: rgba(184, 199, 106, 0.1);
    border-bottom-color: var(--color-olive);
}

.nav-tabs .nav-link.active {
    color: var(--color-sky);
    background: transparent;
    border-bottom-color: var(--color-sky);
    font-weight: 600;
}

/* Контент вкладок */
.tab-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-top: -1px;
}

.tab-content-inner {
    color: var(--color-dark-gray);
    line-height: 1.7;
}

.plant-description {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
}

/* Таблицы характеристик */
.care-table {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
}

.care-table th {
    color: var(--color-sky);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
    width: 30%;
}

.care-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.care-table tr:last-child th,
.care-table tr:last-child td {
    border-bottom: none;
}

/* Секция выбора размера */
.size-selection-section {
    background: linear-gradient(135deg, rgba(43, 77, 156, 0.05) 0%, rgba(184, 199, 106, 0.05) 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(43, 77, 156, 0.1);
}

.size-select {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.size-select:focus {
    border-color: var(--color-olive);
    box-shadow: 0 0 0 3px rgba(184, 199, 106, 0.1);
}

/* Контейнер с кнопками */
.plant-actions-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.btn-full-rounded {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-full-rounded:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    max-width: 200px;
}

.input-group button {
    background: var(--color-sky);
    border-color: var(--color-sky);
    color: white;
    border-radius: 0;
    transition: all 0.3s ease;
}

.input-group button:hover {
    background: var(--color-sky);
    border-color: var(--color-sky);
    transform: translateY(-1px);
}

.input-group button:focus {
    box-shadow: 0 0 0 3px rgba(43, 77, 156, 0.1);
}

.qty_input {
    text-align: center;
    font-weight: 600;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

/* Кнопки действий */
.btn-outline-black {
    background: transparent;
    border-color: #333;
    color: #333;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-black:hover {
    background: #333;
    border-color: #333;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--color-light-gray);
    color: var(--color-light-gray);
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: var(--color-light-gray);
    border-color: var(--color-light-gray);
    color: white;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-sky);
    border-color: var(--color-sky);
    color: white;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-sky);
    border-color: var(--color-sky);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 77, 156, 0.3);
}

/* Бейджи для тегов */
.badge.bg-secondary {
    background: var(--color-olive) !important;
    color: var(--color-dark-gray) !important;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 6px;
}

/* Иконки для характеристик */
.fa-check,
.fa-times {
    margin-right: 6px;
}

.fa-check {
    color: var(--color-olive);
}

.fa-times {
    color: var(--color-light-gray);
}

/* Модальное окно изображений */
#imageModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#imageModal .modal-header {
    background: linear-gradient(135deg, var(--color-sky) 0%, var(--color-olive) 100%);
    border-radius: 16px 16px 0 0;
    border: none;
    padding: 20px 24px;
}

#imageModal .modal-body {
    padding: 0;
    background: #000;
}

#imageCarousel .carousel-item img {
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0;
}

#imageModal .carousel-control-prev,
#imageModal .carousel-control-next {
    width: 5%;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 50%);
}

#imageModal .carousel-control-next {
    background: linear-gradient(to left, rgba(0,0,0,0.8) 0%, transparent 50%);
}

#imageModal .carousel-control-prev-icon,
#imageModal .carousel-control-next-icon {
    background-image: none;
    filter: brightness(0) invert(1);
}

#imageModal .carousel-control-prev-icon::after {
    content: '‹';
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#imageModal .carousel-control-next-icon::after {
    content: '›';
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.image-counter {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    .plant-gallery-container,
    .plant-details-container {
        padding: 20px;
    }
    
    .plant-name {
        font-size: 2rem;
    }
    
    .base-price {
        font-size: 1.5rem;
    }
    
    .meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .admin-actions {
        margin-left: 0;
        margin-top: 12px;
    }
}

@media (max-width: 768px) {
    .plant-detail-container {
        padding: 1rem 0;
    }
    
    .plant-gallery-container,
    .plant-details-container,
    .form-row {
        padding: 16px;
        margin-bottom: 1rem;
    }
    
    .plant-name {
        font-size: 1.5rem;
    }
    
    .scientific-name {
        font-size: 1rem;
    }
    
    .base-price {
        font-size: 1.25rem;
    }
    
    .nav-tabs .nav-link {
        padding: 10px 16px;
        font-size: 0.9rem;
        margin-right: 4px;
    }
    
    .tab-content {
        padding: 16px;
    }
    
    .care-table th,
    .care-table td {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .input-group {
        max-width: 150px;
    }
    
    .btn-outline-black,
    .btn-outline-secondary,
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .thumbnail-gallery {
        gap: 8px;
    }
    
    .thumbnail-img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .plant-name {
        font-size: 1.25rem;
    }
    
    .base-price {
        font-size: 1.1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
        margin-right: 2px;
    }
    
    .tab-content {
        padding: 12px;
    }
    
    .care-table th,
    .care-table td {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .thumbnail-gallery {
        gap: 6px;
    }
    
    .thumbnail-img {
        width: 50px;
        height: 50px;
    }
    
    .form-row {
        padding: 12px;
    }
    
    .input-group {
        max-width: 120px;
    }
    
    .btn-outline-black,
    .btn-outline-secondary,
    .btn-primary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Навигация галереи */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(43, 77, 156, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 14px;
}

.gallery-nav:hover {
    background: var(--color-sky);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 77, 156, 0.3);
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

/* Скрываем навигацию на мобильных устройствах */
@media (max-width: 768px) {
    .gallery-nav {
        display: none;
    }
}

/* Дополнительные утилиты */
.text-plant-primary {
    color: var(--color-sky) !important;
}

.text-plant-secondary {
    color: var(--color-olive) !important;
}

.bg-plant-primary {
    background-color: var(--color-sky) !important;
}

.bg-plant-secondary {
    background-color: var(--color-olive) !important;
}

.border-plant-primary {
    border-color: var(--color-sky) !important;
}

.border-plant-secondary {
    border-color: var(--color-olive) !important;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plant-gallery-container,
.plant-details-container,
.form-row {
    animation: fadeInUp 0.6s ease-out;
}

.plant-gallery-container {
    animation-delay: 0.1s;
}

.plant-details-container {
    animation-delay: 0.2s;
}

.form-row {
    animation-delay: 0.3s;
}

/* Цена с НДС */
.price-with-vat {
    font-size: 14px;
    color: var(--color-light-gray);
    margin-top: 4px;
    display: block;
}

.vat-label {
    font-size: 12px;
    color: var(--color-olive);
    font-weight: 500;
}