/* product.css */

html,
body {
    height: 100%;
    overflow-y: scroll;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: #111;
}


.product-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1440px;
    width: 100%;
}

.product-page-content {
    margin-top: 70px;
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    background: var(--card);
    border-radius: 10px;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
    padding: 20px;
    overflow: hidden;

}

.product-page-image-container {
    flex: 1;
    max-width: 450px;
    aspect-ratio: 3/4;
    background: #f3f4f6;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.product-page-image-container .fake-img {
    color: #9ca3af;
    font-size: clamp(12px, 1.5vw, 16px);
}

.product-page-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Слайдер на странице товара */
.product-page-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.product-page-slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.product-page-slider-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-page-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    pointer-events: none;
}

/* Миниатюры */
.product-page-slider-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.1);
    padding: 5px;
    gap: 5px;
}

.product-page-slider-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.product-page-slider-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.product-page-slider-thumbnail {
    width: 50px;
    height: 100%;
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, border-color 0.2s;
}

.product-page-slider-thumbnail:hover {
    opacity: 1;
}

.product-page-slider-thumbnail.active {
    border-color: var(--accent);
    opacity: 1;
}

.product-page-slider-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}


.product-page-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* gap: 15px; */
}


.product-page-title {
    margin-top: 10px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.product-page-price {
    margin-top: 10px;
    font-weight: 650;
    font-size: 1.8rem;
    color: var(--primary-price);
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-page-del-price-container {
    display: flex;
    flex-direction: column;
}

.product-page-del-price {
    font-size: 1rem;
    color: var(--muted);
}

.product-page-wb-price-text {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 2px;
}

.product-page-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-page-back-link {
    margin-top: 20px;
    align-self: flex-start;
}

.product-page-back-link a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-page-back-link a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .product-page-content {
        flex-direction: column;
        align-items: center;
    }

    .product-page-title {
        margin-top: 10px;
        font-size: 1.2rem;

    }
    

    .product-page-image-container {
        max-width: 100%;
    }
}

/* Уведомление (копирование) */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(100px);
    pointer-events: none;
    /* Не мешает взаимодействию */
}

.notification.success {
    background: #4CAF50;
    color: white;
}

.notification.error {
    background: #f44336;
    color: white;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}
