/* ============================================================
   PRODUCT.CSS – Стили карточки товара и интерактивных тегов
   ============================================================ */

.product-wrapper {
    display: flex;
    gap: 50px;
    margin-bottom: 60px;
    align-items: flex-start;
}

/* Галерея слева */
.product-gallery {
    flex: 1;
    max-width: 550px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-premium);
    position: relative;
}
.product-gallery .main-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--accent-blue);
    position: relative;
    cursor: pointer;
}
.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
    position: relative;
}
.product-gallery .main-image:hover img {
    transform: scale(1.04);
}
.product-gallery .main-image .zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}
.product-gallery .main-image:hover .zoom-icon {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.product-gallery .main-image .zoom-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--bg-dark);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.product-gallery .main-image img.img-exit {
    opacity: 0;
    transform: scale(0.85);
}
.product-gallery .main-image img.img-enter {
    opacity: 0;
    transform: scale(1.15);
    animation: imageZoomIn 0.35s ease forwards;
}
@keyframes imageZoomIn {
    0% { opacity: 0; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}
.product-gallery .thumbnails {
    display: flex;
    gap: 15px;
}
.product-gallery .thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-gallery .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-gallery .thumbnail.active {
    border-color: var(--bg-dark);
    box-shadow: 0 0 0 3px rgba(14, 41, 66, 0.1);
}
.product-gallery .thumbnail:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

/* Модальное окно зума */
.zoom-modal {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(14, 41, 66, 0.92);
    backdrop-filter: blur(8px);
    z-index: 9999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 20px;
    box-sizing: border-box;
}

.zoom-modal.active { opacity: 1; visibility: visible; }

.zoom-modal img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    background: #fff;
    padding: 10px;
}

.zoom-modal.active img { transform: scale(1); }

.zoom-modal .close-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    z-index: 10;
    border: none !important;
    outline: none !important;
    padding: 0;
}

.zoom-modal .close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--accent-gold);
}

.zoom-modal .close-btn svg {
    width: 22px; 
    height: 22px;
    stroke: var(--bg-dark);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Информация о товаре */
.product-info {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.product-info h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--bg-dark);
    letter-spacing: 0.02em;
}
.product-info .product-article {
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-info .product-article strong {
    color: var(--bg-dark);
}
.product-text-block {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: var(--shadow-premium);
    border: 1px solid #e2e8f0;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 5px; 
}
.product-text-block h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--bg-dark);
    margin: 18px 0 5px 0;
}
.product-text-block h4:first-child {
    margin-top: 0;
}
.product-text-block p {
    margin: 0 0 15px 0;
}
.product-text-block p:last-child {
    margin-bottom: 0;
}

/* БЛОК ТЕГОВ ТОВАРА */
.product-tags-block {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.product-tags-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.product-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-tag-chip {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    color: var(--bg-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.product-tag-chip:hover {
    background: var(--accent-gold);
    color: #1e293b;
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 179, 107, 0.25);
}

.product-action {
    background: var(--bg-light);
    padding: 20px 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid #e2e8f0;
}
.action-info {
    font-size: 16px;
    font-weight: 500;
    color: var(--bg-dark);
}
.action-info span {
    color: #64748b;
    font-weight: 400;
}
.btn-request {
    background-color: var(--accent-gold);
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-request:hover {
    background-color: #cfa150;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 179, 107, 0.4);
}

/* Смотрите также */
.also-see {
    margin: 60px 0 80px;
}
.also-see h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--bg-dark);
    margin-bottom: 25px;
}
.also-see-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.also-see-item {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.also-see-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-hover);
}
.also-see-item .img-wrap {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fafafa;
    border: 2px dashed var(--accent-blue);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border-bottom: none;
    position: relative;
}
.also-see-item .img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.also-see-item:hover .img-wrap img {
    transform: scale(1.08);
    border-color: var(--bg-dark);
}

.also-see-item .title {
    padding: 12px 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--bg-dark);
    background: #fff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-left: 2px dashed transparent;
    border-right: 2px dashed transparent;
    border-bottom: 2px dashed transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: -2px;
}
.also-see-item:hover .title {
    background-color: var(--bg-dark);
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
    border-right-color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

@media (max-width: 1024px) {
    .also-see-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .product-wrapper { flex-direction: column; align-items: center; }
    .product-gallery { max-width: 100%; width: 100%; }
    .product-info { width: 100%; }
    .product-action { flex-direction: column; align-items: stretch; }
    .btn-request { width: 100%; text-align: center; }
    .also-see-grid { grid-template-columns: repeat(2, 1fr); }
    .zoom-modal .close-btn { top: 15px; right: 15px; width: 42px; height: 42px; }
    .zoom-modal img { max-width: 90vw; max-height: 75vh; }
}
@media (max-width: 480px) {
    .also-see-grid { grid-template-columns: 1fr; }
    .product-gallery .thumbnails { justify-content: center; }
}
