@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --zx-blue: #0000AA;
    --zx-black: #000;
    --zx-white: #FFF;
    --zx-yellow: #FFFF00;
    --zx-cyan: #00FFFF;
    --zx-magenta: #FF00FF;
    --zx-red: #FF0000;
    --zx-green: #00FF00;
}

body {
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    background: var(--zx-blue);
    color: var(--zx-white);
    overflow-x: hidden;
}

/* CRT Scanlines */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .1) 0, rgba(0, 0, 0, .1) 2px, transparent 2px, transparent 4px);
    pointer-events: none;
    z-index: 1000;
}

header {
    background: #000;
    color: #FFFF00;
    padding: 25px;
    text-align: center;
    border-bottom: 6px solid #FF00FF;
    text-shadow: 3px 3px #FF0000;
}

header h1 {
    margin: 0;
    font-size: 18px;
    text-transform: uppercase;
}

.container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    padding: 20px;
}

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

/* ИНСТРУКЦИЯ */
.sidebar-box {
    background: #000;
    border: 4px solid var(--zx-cyan);
    padding: 20px;
    margin-bottom: 20px;
}

.box-title {
    color: var(--zx-yellow);
    border-bottom: 2px solid var(--zx-yellow);
    margin-bottom: 15px;
    padding-bottom: 5px;
    font-size: 12px;
}

.guide-text {
    font-size: 10px;
    line-height: 1.8;
    color: var(--zx-white);
}

.guide-line {
    color: var(--zx-green);
    margin-right: 5px;
}

.contact-link {
    display: block;
    color: var(--zx-cyan);
    text-decoration: none;
    margin: 10px 0;
    font-size: 10px;
}

.contact-link:hover {
    color: var(--zx-magenta);
}

/* КАТАЛОГ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: #000;
    border: 4px solid var(--zx-white);
    padding: 10px;
    cursor: pointer;
    transition: 0.1s;

    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.card-link {
    display: flex;
    height: 100%;
}

.card h3 {
    min-height: 58px;
    line-height: 1.5;
}

.card-price {
    margin-top: auto;
}

.card:hover {
    border-color: var(--zx-yellow);
    background: #111;
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 4px solid var(--zx-cyan);
}

.card-price {
    color: var(--zx-green);
    margin: 10px 0;
    font-size: 14px;
}

/* МОДАЛЬНОЕ ОКНО */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 15px;
}

.modal-content {
    background: #000;
    border: 4px solid var(--zx-white);
    padding: 25px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

#modal-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border: 2px solid var(--zx-cyan);
    cursor: zoom-in;
}

.gallery {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid var(--zx-magenta);
    cursor: pointer;
}

.price-tag {
    font-size: 20px;
    color: var(--zx-yellow);
    background: var(--zx-blue);
    padding: 10px;
    display: inline-block;
    margin: 15px 0;
}

.full-view {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.full-view img {
    max-width: 100%;
    max-height: 100%;
}

/* БЕГУЩАЯ СТРОКА */
.marquee {
    background: var(--zx-red);
    color: #fff;
    padding: 5px;
    white-space: nowrap;
    overflow: hidden;
    font-size: 10px;
}

.marquee-content {
    display: inline-block;
    animation: scroll 15s linear infinite;
}

@keyframes scroll {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }
}

.btn {
    background: var(--zx-green);
    border: none;
    padding: 12px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 4px 4px 0 #333;
    margin-top: 10px;
}

.btn:hover {
    background: var(--zx-yellow);
}

.contact-image {
    margin-top: 15px;
    text-align: center;
    opacity: 0.85;
    /* було 0.35 → стало нормально видно */
    pointer-events: none;
    user-select: none;
}

.contact-image img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border: 2px solid var(--zx-cyan);
    filter: contrast(1.05) saturate(1.1);
    /* прибрали "вбитість" */
}



/* 📱 мобільний — НЕ ховаємо повністю, просто зменшуємо */
@media (max-width: 900px) {
    .contact-image {
        display: none;
    }
}

/* ПАГІНАЦІЯ */
.pagination-container {
    grid-column: 1 / -1;
    /* Розтягує блок на всю ширину (і під сіткою, і під сайдбаром) */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 40px 0;
    width: 100%;
}

.page-btn {
    background: var(--zx-black);
    color: var(--zx-yellow);
    border: 4px solid var(--zx-yellow);
    padding: 10px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 6px 6px 0 var(--zx-red);
}

.page-btn:hover:not(:disabled) {
    background: var(--zx-yellow);
    color: var(--zx-black);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: gray;
    box-shadow: none;
}

#page-info {
    font-size: 10px;
    color: var(--zx-white);
}

/* Виправлення для мобілок */
@media (max-width: 900px) {
    .pagination-container {
        grid-column: auto;
        flex-direction: column;
        gap: 10px;
    }
}

/* ЛОГОТИП В ХЕДЕРЕ */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-inner h1 {
    margin: 0;
    text-align: center;
    flex: 1;
}

.logo {
    height: 60px;
    position: absolute;
    right: 20px;
}

/* 📱 мобилка */
@media (max-width: 1100px) {
    .logo {
        display: none;
    }
}

