/* Product Page Specific Styles */

/* Breadcrumb (reused from catalog) */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
    margin-top: 70px;
    border-bottom: 1px solid #e5e5e5;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-nav a {
    color: #6a6a6a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #1a1a1a;
}

.separator {
    color: #a0a0a0;
}

.current {
    color: #1a1a1a;
    font-weight: 500;
}

/* Product Details Section */
.product-details {
    padding: 3rem 0;
    background: white;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    position: relative;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
}

.main-image img {
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.image-zoom {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image:hover .image-zoom {
    opacity: 1;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover {
    border-color: #1a1a1a;
}

.thumbnail.active {
    border-color: #1a1a1a;
    opacity: 1;
}

.thumbnail:not(.active) {
    opacity: 0.7;
}

/* Product Info */
.product-info {
    padding-left: 1rem;
}

.product-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.featured {
    background: #1a1a1a;
    color: white;
}

.badge.bestseller {
    background: #22c55e;
    color: white;
}

.badge.new {
    background: #3b82f6;
    color: white;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.product-brand {
    font-size: 1.125rem;
    color: #6a6a6a;
    margin-bottom: 1rem;
    font-weight: 500;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stars {
    color: #fbbf24;
    font-size: 1.25rem;
}

.rating-text {
    color: #6a6a6a;
    font-size: 0.9rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.current-price-catalog {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

.original-price {
    font-size: 1.25rem;
    color: #a0a0a0;
    text-decoration: line-through;
}

.original-price-catalog {
    font-size: 1rem;
    color: #a0a0a0;
    text-decoration: line-through;
}

.discount {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.discount-catalog {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-summary {
    margin-bottom: 2rem;
}

.product-summary p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #4a4a4a;
}

.product-features-highlight {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.product-features-highlight h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.product-features-highlight ul {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.product-features-highlight li {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #4a4a4a;
}

/* Product Options */
.product-options {
    margin-bottom: 2rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.color-options {
    display: flex;
    gap: 0.75rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover {
    border-color: #a0a0a0;
}

.color-option.active {
    border-color: #1a1a1a;
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.finish-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.finish-select:focus {
    outline: none;
    border-color: #1a1a1a;
}

/* Quantity Selector */
.quantity-selector {
    margin-bottom: 2rem;
}

.quantity-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.qty-btn:hover {
    background: #e5e5e5;
}

.qty-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.qty-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.qty-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.qty-input:focus {
    outline: none;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.add-to-cart {
    flex: 2;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.remove-from-cart {
    flex: 2;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}

.d__none {
    display: none;
}

.wishlist {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Product Meta */
.product-meta {
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5rem;
    display: grid;
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.meta-item strong {
    color: #1a1a1a;
}

/* Product Tabs */
.product-tabs {
    background: #f8f9fa;
    padding: 3rem 0;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 2rem;
    gap: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6a6a6a;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #1a1a1a;
}

.tab-btn.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.tabs-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e5e5e5;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.tab-panel h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #1a1a1a;
}

.tab-panel p {
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Specifications */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.spec-group h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.specs-table td:first-child {
    font-weight: 500;
    color: #1a1a1a;
    width: 40%;
}

.specs-table td:last-child {
    color: #4a4a4a;
}

/* Installation Steps */
.installation-steps {
    margin-bottom: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 0.5rem;
}

.installation-note {
    background: #f0f8ff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

/* Reviews */
.reviews-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.overall-rating {
    text-align: center;
}

.rating-score {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}

.rating-stars {
    color: #fbbf24;
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.rating-count {
    color: #6a6a6a;
    font-size: 0.9rem;
}

.rating-breakdown {
    display: grid;
    gap: 0.5rem;
}

.rating-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}

.bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.reviews-list {
    display: grid;
    gap: 2rem;
}

.review-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

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

.reviewer-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.review-stars {
    color: #fbbf24;
}

.review-date {
    color: #6a6a6a;
    font-size: 0.9rem;
}

.review-item h4 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.review-item p {
    margin-bottom: 1rem;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.review-helpful button {
    background: none;
    border: 1px solid #e5e5e5;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-helpful button:hover {
    background: #f0f0f0;
}

/* Related Products */
.related-products {
    padding: 4rem 0;
    background: white;
}

.related-products h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }

    .product-info {
        padding: 0;
    }

    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .reviews-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 2rem;
    }

    .current-price {
        font-size: 1.75rem;
    }

    .current-price-catalog {
        font-size: 1.75rem;
    }

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

    .tab-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .tabs-content {
        padding: 1.5rem;
    }

    .step {
        gap: 1rem;
    }

    .related-products .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-price {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .color-options {
        justify-content: center;
    }

    .quantity-controls {
        margin: 0 auto;
    }
}
.extra-info-table {
    margin-top: 1.5rem;
}

.extra-info-empty {
    margin-top: 1rem;
    color: #6a6a6a;
}
/* === Tab "Подробнее о производителе": нормальная таблица + top/bottom блоки === */
/* Разметка: #manufacturer-description, .extra-info-block, .specs-table.extra-info-table */
#manufacturer-description .extra-info-block{
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px 18px;
    line-height: 1.6;
    color: #4a4a4a;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  }
  
  #manufacturer-description .extra-info-bottom{
    margin-top: 14px;
    background: #f8f9fa;
  }
  
  /* прибираем типографику CKEditor внутри блоков */
  #manufacturer-description .extra-info-block > *:first-child{ margin-top: 0; }
  #manufacturer-description .extra-info-block > *:last-child{ margin-bottom: 0; }
  #manufacturer-description .extra-info-block p{ margin: 0 0 10px; }
  #manufacturer-description .extra-info-block ul,
  #manufacturer-description .extra-info-block ol{
    margin: 0 0 10px;
    padding-left: 1.1rem;
  }
  #manufacturer-description .extra-info-block a{
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  #manufacturer-description .extra-info-block a:hover{ color: #1a1a1a; }
  
  /* ---- Таблица ---- */
  #manufacturer-description table.extra-info-table{
    width: 100%;
    margin-top: 14px; /* вместо “прилипает” */
    background: #fff;
  
    /* ключ: нормальная рамка и внутренние линии */
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
  
    /* чтобы работали радиусы + линии без артефактов */
    border-collapse: separate;
    border-spacing: 0;
  
    /* чтобы длинный контент красиво переносился и не ломал ширину */
    table-layout: fixed;
  }
  
  #manufacturer-description table.extra-info-table td{
    padding: 12px 14px;
    vertical-align: top;
    color: #4a4a4a;
  
    border-bottom: 1px solid #e5e5e5;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  
  /* убираем нижнюю линию у последней строки */
  #manufacturer-description table.extra-info-table tr:last-child td{
    border-bottom: none;
  }
  
  /* вертикальный разделитель между колонками */
  #manufacturer-description table.extra-info-table td + td{
    border-left: 1px solid #e5e5e5;
  }
  
  /* левая колонка (лейблы) — чуть “шапочнее” */
  #manufacturer-description table.extra-info-table td:first-child{
    width: 38%;
    font-weight: 500;
    color: #1a1a1a;
    background: #fafafa;
  }
  
  /* зебра, но мягкая (и отдельно для левой колонки, чтобы не спорила с фоном) */
  #manufacturer-description table.extra-info-table tr:nth-child(even) td{
    background: #fcfcfd;
  }
  #manufacturer-description table.extra-info-table tr:nth-child(even) td:first-child{
    background: #f6f7f8;
  }
  
  /* прибираем отступы у контента из CKEditor внутри ячеек */
  #manufacturer-description table.extra-info-table td > *:first-child{ margin-top: 0; }
  #manufacturer-description table.extra-info-table td > *:last-child{ margin-bottom: 0; }
  #manufacturer-description table.extra-info-table td p{ margin: 0 0 10px; }
  #manufacturer-description table.extra-info-table td ul,
  #manufacturer-description table.extra-info-table td ol{
    margin: 0;
    padding-left: 1.1rem;
  }
  
  /* Плейсхолдер “Пока что пусто” — чтобы не выглядел как случайная строка */
  #manufacturer-description .extra-info-empty{
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px dashed #d7d7d7;
    border-radius: 12px;
    background: #fff;
    color: #6a6a6a;
  }
  
  /* Мобилка: чуть плотнее */
  @media (max-width: 768px){
    #manufacturer-description table.extra-info-table td{
      padding: 10px 12px;
    }
    #manufacturer-description table.extra-info-table td:first-child{
      width: 44%;
    }
  }
  