/* catalog-product-detail.css - ОПТИМИЗИРОВАННАЯ ВЕРСИЯ */

/* Базовые стили */
.product-detail {
    background: #f8fafc;
    min-height: 100vh;
    padding: 1rem 0 3rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Хлебные крошки */
.product-breadcrumbs {
    margin-bottom: 2rem;
}

.product-breadcrumbs .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.product-breadcrumbs .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-breadcrumbs .breadcrumb-item a:hover {
    color: var(--primary-green);
}

.product-breadcrumbs .breadcrumb-item.active {
    color: #374151;
    font-weight: 500;
}

/* Основная информация */
.product-main-info {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

/* Галерея */
.product-gallery {
    text-align: center;
}

.product-image {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.product-image__img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
    z-index: 2;
}

/* Информация о товаре */
.product-info {
    padding-left: 2rem;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.product-code {
    color: #6b7280;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.product-code i {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Мета информация */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.product-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    color: #6b7280;
    font-weight: 500;
}

.brand-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.brand-link:hover {
    color: var(--dark-green);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-stars {
    display: flex;
    gap: 0.2rem;
}

.rating-stars i {
    color: #d1d5db;
    font-size: 0.9rem;
}

.rating-stars i.active {
    color: #fbbf24;
}

.rating-text {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Цены */
.product-pricing {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.old-price {
    font-size: 1.2rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

.discount-badge {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.current-price.discounted {
    color: #e53e3e;
}

.savings-text {
    color: #15803d;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* Кнопки действий */
.product-actions {
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

.btn-wishlist {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    flex: none;
}

.btn-wishlist:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
    transform: scale(1.1);
}

/* Документы */
.product-documents {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #e53e3e;
    font-size: 1.1rem;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.document-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.document-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.document-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Цвета фона для разных типов документов */
.doc-icon-bg-certificate { background: rgba(40, 167, 69, 0.1); border: 1px solid rgba(40, 167, 69, 0.2); }
.doc-icon-bg-protocol { background: rgba(23, 162, 184, 0.1); border: 1px solid rgba(23, 162, 184, 0.2); }
.doc-icon-bg-passport { background: rgba(111, 66, 193, 0.1); border: 1px solid rgba(111, 66, 193, 0.2); }
.doc-icon-bg-instruction { background: rgba(32, 201, 151, 0.1); border: 1px solid rgba(32, 201, 151, 0.2); }
.doc-icon-bg-manual { background: rgba(253, 126, 20, 0.1); border: 1px solid rgba(253, 126, 20, 0.2); }
.doc-icon-bg-declaration { background: rgba(232, 62, 140, 0.1); border: 1px solid rgba(232, 62, 140, 0.2); }
.doc-icon-bg-testimony { background: rgba(108, 117, 125, 0.1); border: 1px solid rgba(108, 117, 125, 0.2); }
.doc-icon-bg-permission { background: rgba(32, 201, 151, 0.1); border: 1px solid rgba(32, 201, 151, 0.2); }
.doc-icon-bg-refusal { background: rgba(220, 53, 69, 0.1); border: 1px solid rgba(220, 53, 69, 0.2); }
.doc-icon-bg-analysis { background: rgba(102, 16, 242, 0.1); border: 1px solid rgba(102, 16, 242, 0.2); }
.doc-icon-bg-other { background: rgba(108, 117, 125, 0.1); border: 1px solid rgba(108, 117, 125, 0.2); }

.document-details {
    flex: 1;
}

.document-type {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.document-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.document-meta {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.document-original-name {
    font-style: italic;
    color: #495057;
    display: block;
}

.document-size {
    background: #e9ecef;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.document-country,
.document-language {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-size: 0.8rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.document-btn:hover {
    transform: scale(1.1);
}

.document-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    flex: 1;
}

.document-link:hover {
    background: #f0fdf4;
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateX(5px);
}

.document-link i {
    font-size: 1rem;
}

/* Контент с табами */
.product-content-tabs {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* Навигация табов */
.tabs-navigation {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 2rem;
}

.tabs-nav {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tab-button {
    background: transparent;
    border: none;
    padding: 1.25rem 1.5rem;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--primary-green);
    background: rgba(46, 125, 50, 0.05);
}

.tab-button.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
    background: white;
}

/* Контент табов */
.tabs-content {
    padding: 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* HTML контент */
.content-html {
    line-height: 1.7;
    color: #374151;
    font-size: 1.05rem;
}

.content-html h1,
.content-html h2,
.content-html h3,
.content-html h4 {
    color: #1f2937;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.content-html h2 {
    font-size: 1.5rem;
}

.content-html h3 {
    font-size: 1.25rem;
}

.content-html p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

.content-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.content-html table th {
    background: #f8fafc;
    color: #1f2937;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.content-html table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}

.content-html table tr:last-child td {
    border-bottom: none;
}

.content-html ul,
.content-html ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.content-html li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.content-html blockquote {
    border-left: 4px solid var(--primary-green);
    background: #f0fdf4;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Пустой контент */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #6b7280;
}

.empty-state p {
    color: #9ca3af;
    margin: 0;
}

/* Блок с нотами аромата */
.fragrance-notes-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.fragrance-notes-section .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.fragrance-notes-section .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.fragrance-notes-section .section-title i {
    color: var(--primary-green);
}

.fragrance-notes-section .section-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    margin: 0;
}

/* Пирамида ароматов */
.fragrance-pyramid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.note-layer {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
}

.note-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.note-layer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.note-layer:hover::before {
    opacity: 1;
}

.top-notes { animation-delay: 0.1s; }
.top-notes::before { background: linear-gradient(135deg, #e2d6a6, #f4e8b6); }

.middle-notes { animation-delay: 0.2s; }
.middle-notes::before { background: linear-gradient(135deg, #eabba7, #f8d5c8); }

.base-notes { animation-delay: 0.3s; }
.base-notes::before { background: linear-gradient(135deg, #a3a3a3, #c6c6c6); }

.note-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.note-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.note-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.note-duration {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.note-content p {
    color: #6b7280;
    margin-bottom: 1rem;
    font-style: italic;
    font-size: 0.95rem;
}

.note-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.note-item {
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.note-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.note-item.empty {
    background: #f3f4f6;
    color: #9ca3af;
    font-style: italic;
}

.top-notes .note-item { border-left: 3px solid #e2d6a6; }
.middle-notes .note-item { border-left: 3px solid #eabba7; }
.base-notes .note-item { border-left: 3px solid #a3a3a3; }

/* Легенда */
.fragrance-legend {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid #e5e7eb;
}

.legend-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    text-align: center;
}

.legend-items {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Подсказки */
[tooltip] {
    position: relative;
}

[tooltip]:before {
    content: attr(tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

[tooltip]:hover:before {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 992px) {
    .product-info {
        padding-left: 0;
        margin-top: 2rem;
    }

    .product-main-info {
        padding: 1.5rem;
    }

    .product-title {
        font-size: 1.75rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .btn-wishlist {
        width: 100%;
        height: auto;
        border-radius: 10px;
        padding: 1rem;
    }

    .tabs-navigation {
        padding: 0 1rem;
    }

    .tabs-content {
        padding: 1.5rem;
    }

    .fragrance-notes-section {
        padding: 1.5rem;
    }

    .fragrance-pyramid {
        gap: 1rem;
    }

    .note-layer {
        padding: 1.25rem;
    }

    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .note-title {
        font-size: 1.1rem;
    }

    .note-duration {
        align-self: flex-start;
    }

    .legend-items {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .note-items {
        gap: 0.5rem;
    }

    .note-item {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .document-actions {
        align-self: flex-end;
    }

    .document-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 0.5rem 0 2rem;
    }

    .product-main-info {
        padding: 1rem;
        border-radius: 12px;
    }

    .product-content-tabs {
        border-radius: 12px;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 2rem;
    }

    .tabs-nav {
        flex-wrap: wrap;
    }

    .tab-button {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .product-image__img {
        max-height: 300px;
    }

    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .document-info {
        width: 100%;
    }

    .document-actions {
        align-self: flex-end;
    }

    .document-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }

    .product-main-info {
        padding: 0.75rem;
    }

    .product-pricing {
        padding: 1rem;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .current-price {
        font-size: 1.75rem;
    }

    .tabs-content {
        padding: 1rem;
    }

    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .product-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .product-image__img {
        max-height: 250px;
    }

    .fragrance-notes-section {
        padding: 1rem;
    }

    .fragrance-notes-section .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .note-layer {
        padding: 1rem;
    }
}