.single-product {
    max-width: 1500px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.product-container {
    display: grid;
    grid-template-columns: 112px 1fr 1fr;
    gap: 1.5rem;
    background: #fdfcfc;
    padding: 1.7rem;
    border-radius: 8px;
    box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.12);
}

/* ================== ЛЕВАЯ КОЛОНКА: МИНИАТЮРЫ ================== */
.product-thumbnails {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 540px;
    gap: 0.5rem;
}

.thumbnails-wrapper {
    width: 100%;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

.thumbnails-wrapper::-webkit-scrollbar { width: 6px; }
.thumbnails-wrapper::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
.thumbnails-wrapper::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.thumbnails-wrapper::-webkit-scrollbar-thumb:hover { background: #999; }

.thumbnails-list { display: flex; flex-direction: column; gap: 0.5rem; }

.thumbnail-item {
    width: 100px;
    height: 133px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail-item:hover { border-color: #999; transform: scale(0.95); }
.thumbnail-item.active { border-color: #222; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.thumbnail-item img { width: 100%; height: 100%; object-fit: cover; }

.thumb-scroll-btn {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #f3f3f3;
    border-radius: 30%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.thumb-scroll-btn:hover { background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

/* ================== ЦЕНТРАЛЬНАЯ КОЛОНКА: ГЛАВНОЕ ИЗОБРАЖЕНИЕ ================== */
.product-main-image-section { display: flex; flex-direction: column; align-items: center; }

.main-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: zoom-in;
}
.main-image-wrapper {
    touch-action: pan-y;
}
.product-main-image {
    -webkit-user-drag: none;
    user-select: none;
}
@media (max-width: 768px) {
    .main-image-wrapper {
        cursor: default;
    }
}
.product-main-image { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s ease; }

.image-counter { margin-top: 1rem; font-size: 0.9rem; color: #666; font-weight: 500; }

/* ================== ПРАВАЯ КОЛОНКА: ИНФОРМАЦИЯ О ТОВАРЕ ================== */
.product-details { display: flex; flex-direction: column; margin: 10px; overflow: hidden; }

/* ★ Бренд */
.product-brand {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #888;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 20px;
    line-height: 1.3;
}

.product-price-single { font-size: 1.5rem; margin-top: 1rem; font-weight: 700; color: #222; }

.product-meta { margin: 20px 0 12px 10px; border-radius: 6px; }
.product-meta p {
    margin: 0.5rem 0;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
}
.product-meta p strong { color: #222; font-weight: 600; }

/* ★ Блок характеристик в правой колонке */
.product-attributes-preview {
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
}

.attribute-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px dotted #ddd;
    gap: 1rem;
}

.attribute-label {
    color: #777;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.attribute-value {
    color: #222;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: right;
}

.attributes-more-link {
    display: inline-block;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    color: #222;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.attributes-more-link:hover { opacity: 0.6; }

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
 }

.btn-add-to-cart-single {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-to-cart-single:hover { 
    background: var(--primary-h);
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-buy-now {
    width: 100%;
    background: var(--second-light);
    border: 1px solid #ddd;
    color: var(--light);
    padding: 20px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-buy-now a { 
    text-decoration: none;
    color: var(--light); }

.btn-buy-now:hover { 
    background: var(--second-light-h);
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-buy-now:disabled,
.btn-add-to-cart-single.out-of-stock {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ================== ★ ВКЛАДКИ: ОПИСАНИЕ И ХАРАКТЕРИСТИКИ ================== */
.product-tabs-section {
    margin-top: 3rem;
    background: #fff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.08);
    scroll-margin-top: 2rem;
}

.tabs-header {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
    justify-content: space-between;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0 0.4rem 0.5rem 0.4rem;
    font-size: 1rem;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover { color: #222; }
.tab-btn.active {
    color: #222;
    font-weight: 600;
    border-bottom-color: #222;
}

.tab-content { font-size: 1.1rem; line-height: 1.8; color: #555; }
.tab-content p { margin-bottom: 1.5rem; }

/* Таблица всех характеристик */
.attributes-table { width: 100%; border-collapse: collapse; }
.attributes-table tr:nth-child(even) { background: #fafafa; }
.attributes-table td { padding: 0.85rem 1rem; font-size: 1rem; }
.attributes-table .attr-name { color: #777; width: 40%; }
.attributes-table .attr-val { color: #222; font-weight: 500; }
.attributes-empty { color: #999; font-style: italic; }

/* ================== МОДАЛЬНОЕ ОКНО + ЛУПА ================== */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.image-modal.open { display: flex; }

.modal-image-wrapper { overflow: hidden; max-width: 92vw; max-height: 90vh; }

#modalImage {
    display: block;
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

#modalImage.zoomed { cursor: zoom-out; }

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 10000;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-close:hover { transform: scale(1.2); }

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-nav:hover { background: rgba(255, 255, 255, 0.35); }

.modal-prev { left: 20px; }
.modal-next { right: 20px; }

.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.product-price-block-details {
    margin: 8px; 
}
.product-price-details {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
    transform: scaleY(0.85);
    letter-spacing: -1px;
    font-family: sans-serif;
    white-space: nowrap;
}
/* ============================================ */
/* 🆕 БЛОК "СПОСОБЫ ПОЛУЧЕНИЯ"                  */
/* ============================================ */
.delivery-methods-block {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 8px;
}

.delivery-methods-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.delivery-methods-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.delivery-method-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.delivery-method-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 6px;
    flex-shrink: 0;
}

.delivery-method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.delivery-method-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
}

.delivery-method-desc {
    font-size: 0.8rem;
    color: #888;
}

.delivery-methods-empty {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
    padding: 0.5rem 0;
}
.delivery-method-icon { border: 1px solid #e8e8e8; }

.product-code-price-row {
display: flex;
    justify-content: space-between;
    /* margin-top: 0; */
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
}

.product-code-price-row .product-meta {
    margin: 0;
}

.product-code-price-row .product-price-block-details {
    margin: 0;
    text-align: center;
    display: grid;
    justify-items: end;
}

.product-code-price-row .product-price-details {
    margin: 1px 8px;
    background: var(--danger);
    font-size: 1.3rem;
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 8px;
    transform: scaleY(0.9);
}

.old-price-details {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    font-weight: 700;
    margin-right: 12px;
}

.discount-badge-details {
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 12px;
}

/* ================== АДАПТИВНОСТЬ ================== */
@media (max-width: 840px) {
    .tabs-header { display: flow; }
    .product-container { grid-template-columns: 100px 1fr; gap: 1.5rem; }
    .product-details { grid-column: 1 / -1; }
    .thumbnail-item { width: 80px; height: 107px; }
}

@media (max-width: 768px) {
    .site-main { padding: 10px 0; }
    .sub-nav { border-bottom: none; }
    .modal-nav { width: 42px; height: 42px; font-size: 1.6rem; }
    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
    .product-container { 
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
        min-width: 300px;
    }
    .product-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding-bottom: 1rem;
    }
    .single-product { padding: 0; margin: 0; }
    .thumbnails-wrapper { max-height: none; overflow-y: hidden; overflow-x: auto; }
    .thumbnails-list { flex-direction: row; }
    .thumbnail-item { width: 80px; height: 107px; }
    .thumb-scroll-btn { display: none; }
    .product-price-single { font-size: 2rem; }
    .product-tabs-section { padding: 2rem; margin-top: 2rem; }
    .tab-btn { font-size: 1.1rem; padding: 0.75rem 1rem; }
    .attributes-table .attr-name { width: 50%; }
    .delivery-methods-block { padding: 1rem; }
    .delivery-methods-list { gap: 0.5rem; }
}

/* ================== ЗАГЛУШКИ ДЛЯ РАЗДЕЛОВ В РАЗРАБОТКЕ ================== */
.tab-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.tab-placeholder .placeholder-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
}

.tab-placeholder h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #444;
    margin: 0 0 0.75rem 0;
}

.tab-placeholder p {
    font-size: 1rem;
    line-height: 1.6;
    color: #777;
    margin: 0;
}

@media (max-width: 480px) {
    .site-main { padding: 0; margin-top:0; }
    .product-container { padding: 0.5rem; }
    .product-title { font-size: 1.3rem; }
    .product-price-single { font-size: 1.7rem; }
    .product-tabs-section
    .productTabsSection {
        padding: 1.2rem;
        margin-top: 1.5rem;
    }
}
