/* Стили для страницы товара */

/* Основные стили страницы продукта */
.product-page {
    background: #f8f9fa;
}

.main-content {
    padding-top: 0;
}

/* Хлебные крошки */
.breadcrumbs {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.breadcrumb-item {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-item:hover {
    color: #007bff;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #adb5bd;
}

/* Hero секция продукта */
.product-hero {
    padding: 3rem 0;
    background: white;
}

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

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

.product-description {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
}

.product-price--free {
    color: #28a745;
}

.product-price-old {
    font-size: 1.25rem;
    color: #6c757d;
    text-decoration: line-through;
}

.product-timer {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 2rem;
}

.timer-label {
    font-weight: 600;
    color: #856404;
    margin-bottom: 0.5rem;
}

.timer-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: #856404;
}

.product-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.product-btn--primary {
    background: #007bff;
    color: white;
}

.product-btn--primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.product-btn--secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.product-btn--secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Карусель продукта */
.product-gallery {
    position: relative;
    max-width: 100%;
    width: 100%;
}

.gallery-main {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    background: #f8f9fa;
    width: 100%;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image-container:hover {
    transform: scale(1.01);
}

.gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-image-container:hover .gallery-main-image {
    transform: scale(1.02);
}

.gallery-zoom-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(5px);
    text-decoration: none;
    border: none;
}

.gallery-image-container:hover .gallery-zoom-btn {
    opacity: 1;
}

.gallery-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

.gallery-zoom-btn i {
    font-size: 14px;
}

/* Миниатюры */
.gallery-thumbnails {
    margin-top: 8px;
}

.thumbnail-swiper {
    padding: 3px;
}

.thumbnail-item {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    height: 45px;
    opacity: 0.7;
    background: #f8f9fa;
}

.thumbnail-item:hover {
    border-color: #007bff;
    transform: translateY(-1px);
    opacity: 1;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

.thumbnail-item.active {
    border-color: #007bff;
    box-shadow: 0 3px 15px rgba(0, 123, 255, 0.4);
    opacity: 1;
}

.thumbnail-item img,
.thumbnail-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 6px;
    backdrop-filter: blur(3px);
}

/* Навигация карусели */
.swiper-button-next,
.swiper-button-prev {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #333;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 12px;
    font-weight: bold;
}

.swiper-pagination {
    bottom: 10px;
}

.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #007bff;
    transform: scale(1.2);
}

/* Характеристики товара */
.product-specs {
    padding: 3rem 0;
    background: white;
}

.product-specs h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 2rem;
    text-align: center;
}

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

.specs-table {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 2rem;
}

.specs-table h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1.5rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: #495057;
}

.spec-value {
    color: #212529;
    text-align: right;
}

.spec-value.old-price {
    color: #6c757d;
    text-decoration: line-through;
}

/* Описание товара */
.product-content {
    padding: 3rem 0;
    background: #f8f9fa;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.content-tabs {
    display: flex;
    gap: 0.5rem;
    background: white;
    border-radius: 0.375rem;
    padding: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #007bff;
}

.tab-btn.active {
    background: #007bff;
    color: white;
}

.content-tabs-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

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

.content-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #495057;
}

.content-text h1,
.content-text h2,
.content-text h3,
.content-text h4,
.content-text h5,
.content-text h6 {
    color: #212529;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.content-text p {
    margin-bottom: 1.5rem;
}

.content-text ul,
.content-text ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content-text li {
    margin-bottom: 0.5rem;
}

.content-text blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.content-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content-text th, .content-text td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.content-text th {
    background: #f8f9fa;
    font-weight: 600;
}

.content-text a {
    color: #007bff;
    text-decoration: none;
}

.content-text a:hover {
    text-decoration: underline;
}

.content-text strong {
    font-weight: 600;
}

.content-text em {
    font-style: italic;
}

.product-highlights {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.product-highlights h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1.5rem;
}

.highlights-grid {
    display: grid;
    gap: 1rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.highlight-item i {
    color: #28a745;
    font-size: 1.25rem;
}

/* Рекомендуемые товары */
.related-products {
    padding: 3rem 0;
    background: white;
}

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

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

/* Адаптивность */
@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-price {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .product-hero {
        padding: 2rem 0;
    }
    
    .product-layout {
        gap: 1.5rem;
    }
    
    .product-title {
        font-size: 1.75rem;
    }
    
    .product-description {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .gallery-image-container {
        height: 200px;
    }
    
    .thumbnail-item {
        height: 35px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 25px;
        height: 25px;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 10px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .content-tabs {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    .product-buttons {
        flex-direction: column;
    }
    
    .product-btn {
        min-width: 100%;
    }
    
    .gallery-image-container {
        height: 160px;
    }
    
    .thumbnail-item {
        height: 30px;
    }
    
    .gallery-zoom-btn {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
    }
    
    .gallery-zoom-btn i {
        font-size: 12px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Стили для стрелок навигации Fancybox */
.fancybox__nav {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    pointer-events: none !important;
    z-index: 99999 !important;
}

.fancybox__nav .carousel__button {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 60px !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    z-index: 99999 !important;
}

.fancybox__nav .carousel__button:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

.fancybox__nav .carousel__button.is-prev {
    left: 20px !important;
    right: auto !important;
}

.fancybox__nav .carousel__button.is-next {
    right: 20px !important;
    left: auto !important;
}

.fancybox__nav .carousel__button svg {
    width: 24px !important;
    height: 24px !important;
    fill: #333 !important;
    stroke: #333 !important;
    stroke-width: 2 !important;
}

.fancybox__nav .carousel__button:hover svg {
    fill: #000 !important;
    stroke: #000 !important;
}

/* Скрываем кастомные стрелки, если встроенные работают */
.fancybox__nav:not(:empty) ~ .custom-fancybox-arrow {
    display: none !important;
}
