:root {
    --text-main: 13px;
    --text-sub: 12px;
    --header-size: 22px;
    --max-width: 1100px;
}

body {
    font-size: var(--text-main);
    background-color: #050505;
    color: #ddd;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Кнопка повернення */
.back-nav {
    width: 100%;
    max-width: var(--max-width);
    margin: 20px 0 0 0;
    padding: 0 2.5%;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    color: var(--zx-cyan);
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.2s;
}

.btn-back:hover {
    color: var(--zx-yellow);
    transform: translateX(-5px);
}

.btn-back::before {
    content: "←";
    margin-right: 8px;
    font-size: 14px;
}

.container-wide {
    width: 95%;
    max-width: var(--max-width);
    margin: 10px auto 40px auto;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2px;
    background-color: #222;
    border: 1px solid #222;
}

.product-grid>div {
    background: #000;
    padding: 30px;
}

/* Галерея */
.main-viewer {
    width: 100%;
    aspect-ratio: 4/3;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
    background: #111;
}

.main-viewer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbs-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.thumb {
    aspect-ratio: 1;
    border: 1px solid #333;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
    object-fit: cover;
    width: 100%;
}

.thumb:hover,
.thumb.active {
    opacity: 1;
    border-color: var(--zx-cyan);
}

/* Контент */
.product-h1 {
    font-size: var(--header-size);
    color: #fff;
    text-transform: uppercase;
    margin: 0;
}

.sku {
    color: var(--zx-cyan);
    font-size: 10px;
    margin-bottom: 25px;
}

.spec-table {
    width: 100%;
    margin-bottom: 25px;
    border-collapse: collapse;
}

.spec-table td {
    padding: 10px 0;
    border-bottom: 1px solid #1a1a1a;
    font-size: var(--text-sub);
}

.label {
    color: #777;
}

.val {
    color: #fff;
    text-align: right;
}

.price-tag {
    font-size: 28px;
    color: var(--zx-yellow);
    margin: 20px 0;
    font-weight: bold;
}

.btn-action {
    display: block;
    background: var(--zx-red);
    color: #fff;
    text-align: center;
    padding: 16px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-action:hover {
    background: var(--zx-magenta);
    transform: translateY(-2px);
}

.full-description {
    background: #000;
    border: 1px solid #222;
    margin-top: 2px;
    padding: 40px;
}

.full-description h2 {
    color: var(--zx-yellow);
    font-size: 16px;
    border-left: 4px solid var(--zx-red);
    padding-left: 15px;
    margin-bottom: 20px;
}

.text-content {
    column-count: 2;
    column-gap: 40px;
    font-size: 13px;
    color: #aaa;
    text-align: justify;
}

/* Коментарі */
.comment-box {
    background: #0a0a0a;
    padding: 20px;
    border: 1px solid #222;
    margin-top: 20px;
}

.comment-input {
    width: 100%;
    height: 80px;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    font-size: 12px;
    resize: none;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.btn-comment {
    background: var(--zx-cyan);
    border: none;
    color: #000;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

.comment-item {
    border-bottom: 1px solid #1a1a1a;
    padding: 15px 0;
}

.comment-user {
    color: var(--zx-green);
    font-size: 11px;
    font-weight: bold;
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .text-content {
        column-count: 1;
    }

    .back-nav {
        padding: 0 5%;
    }
}

#zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

#zoom-modal img {
    max-width: 90%;
    max-height: 90%;
}