/* ============================================
   STORE.CSS — стилі сторінки магазину
============================================ */

:root {
    --shop-text-white: #ffffff;
    --shop-text-gray: #a1a1a1;
    --shop-bg-card: #050505;
    --shop-border-white: #ffffff;
    --shop-border-dark: #2a2a2a;
    --shop-bg-cart: #050505;
    --shop-accent: #a84d6b;
    --placeholder-color: #6b2e3e;
    --font-primary: 'Tiny5', 'Press Start 2P', monospace;
    --font-secondary: 'Jersey 10', 'Press Start 2P', monospace;
    --text-primary: #a27791;
    --text-secondary: #8d8d8d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    font-family: var(--font-secondary);
    color: var(--text-secondary);
    overflow-y: auto;
    padding-top: 70px;
    padding-bottom: 90px;
    min-height: 100vh;
}
.text-primary { font-family: var(--font-primary); color: var(--text-primary); }
.text-secondary { font-family: var(--font-secondary); color: var(--text-secondary); }

/* ========== ВЕРХНЯЯ ПАНЕЛЬ ========== */
.top-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #050505;
    border-bottom: 2px solid #a84d6b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 200;
}

.panel-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.panel-icons {
    display: flex;
    gap: 15px;
    margin-right: auto;
    margin-left: 20px;
}

.icon-btn {
    background: transparent;
    border: 2px solid #a84d6b;
    color: #a84d6b;
    width: 40px;
    height: 40px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.icon-btn:hover {
    background: #a84d6b;
    color: #000;
}
.icon-btn svg {
    width: 24px;
    height: 24px;
}

.panel-close img {
    width: 30px;
    height: 30px;
    image-rendering: pixelated;
}
.panel-close {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}
.panel-close-label {
    margin-top: 3px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: lowercase;
}

/* ========== ОСНОВНОЙ КОНТЕНТ ========== */
.shop-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.cat-card {
    background: #050505;
    border: 1px solid #fff;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.1s;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.cat-card:active { transform: scale(0.97); }
.cat-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b2e3e;
    font-size: 0.5rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.cat-name { font-size: 0.65rem; color: #fff; letter-spacing: 1px; }
.cat-name {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ========== КОРЗИНА ========== */
.cart-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #050505;
    border-top: 2px solid #a84d6b;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
.cart-bottom-btn {
    background: #a27791;
    border: 1px solid #b97272;
    color: #000;
    font-family: var(--font-primary);
    font-size: 0.7rem;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-bottom-btn:active { transform: scale(0.95); background: #b97272; color: #010101; }
.cart-bottom-count { background: #b97272; color: #010101; padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; }
.cart-bottom-total { color: #a1a1a1; font-size: 0.7rem; }
.cart-bottom-total { font-family: var(--font-secondary); color: var(--text-secondary); }

/* ========== МОДАЛКИ ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #a27791;
    border: 4px solid #b97272;
    box-shadow: inset 0 0 0 2px #000, 0 0 0 2px #000;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-header {
    background: #79434a;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
}
.modal-title-text {
    font-size: 11px;
    color: var(--text-primary);
    text-shadow: 2px 2px 0 #000;
    font-family: var(--font-primary);
}
.modal-close-btn {
    background: #000;
    color: #fff;
    border: 2px solid #b97272;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-inner { padding: 20px; background: #a27791; color: var(--text-secondary); font-family: var(--font-secondary); }

.product-modal { max-width: 500px; width: 95%; }
.product-carousel-container { display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 20px; }
.carousel-arrow {
    width: 40px; height: 40px; background: rgba(0,0,0,0.7); border: 1px solid #a84d6b;
    color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-family: monospace; flex-shrink: 0;
}
.product-carousel-track {
    flex: 1; overflow: hidden; border: 2px solid #fff; background: #000; aspect-ratio: 1/1;
}
.product-carousel-slides { display: flex; transition: transform 0.3s ease; height: 100%; }
.product-carousel-slide {
    flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: #0a0a0a; color: #6b2e3e; font-size: 0.6rem; text-align: center; padding: 10px;
    cursor: pointer; object-fit: cover;
    position: relative;
}
.sold-out-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        #140f11,
        #140f11 10px,
        #21171a 10px,
        #21171a 20px
    );
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.product-description { font-size: 0.6rem; line-height: 1.6; color: #a1a1a1; margin: 20px 0; text-align: center; min-height: 60px; }
.product-description { font-family: var(--font-secondary); color: var(--text-secondary); font-size: 1rem; }
.cart-total { margin-top: 20px; padding-top: 10px; border-top: 2px solid #fff; text-align: right; font-size: 0.8rem; color: #fff; }
.remove-item { background: none; border: none; color: #b97272; cursor: pointer; margin-left: 10px; font-size: 0.8rem; }
.cart-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #2a2a2a; font-size: 0.7rem; }
.popup-enter-btn {
    background: #000; border: 2px solid #b97272; color: #a84d6b; font-family: var(--font-primary);
    font-size: 11px; padding: 10px 24px; cursor: pointer; margin-top: 15px; width: 100%; text-transform: uppercase;
}

/* Конструктор и конвертер (взято из журнала) */
.merch-constructor { text-align: center; }
.tshirt-preview { position: relative; width: 200px; margin: 0 auto 15px; }
.tshirt-img { width: 100%; display: block; }
.print-canvas { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; }
.upload-area { margin-top: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.file-upload-label {
    display: inline-block; padding: 10px 18px; background: #000; border: 2px dashed #888; cursor: pointer;
}
.file-upload-text { font-family: 'Press Start 2P', monospace; font-size: 8px; color: #888; text-transform: uppercase; }
.file-upload-text { font-family: var(--font-secondary); color: var(--text-secondary); }
.universal-btn {
    cursor: pointer; border: 2px solid #000; background: #565656; padding: 0 0 4px 0; display: inline-block;
}
.universal-btn .btn-inner {
    display: block; background: #fff; border: 2px solid #a0a0a0; padding: 6px 18px; transform: translateY(-4px);
}
.universal-btn .btn-inner span { font-family: 'Press Start 2P', monospace; font-size: 9px; color: #000; text-transform: uppercase; }
.universal-btn .btn-inner span { font-family: var(--font-primary); }
.universal-btn:active .btn-inner { transform: translateY(0); }
.converter-container { text-align: center; }
.converter-input { width: 100px; background: #000; border: 1px solid #888; color: #fff; padding: 8px; text-align: center; font-family: var(--font-secondary); font-size: 14px; }
.converter-arrow { font-size: 20px; margin: 0 12px; color: #888; }

@media (max-width: 680px) {
    .top-panel { height: 50px; padding: 0 10px; }
    body { padding-top: 60px; }
    .panel-title { font-size: 0.9rem; }
    .panel-icons { margin-left: 10px; gap: 10px; }
    .icon-btn { width: 36px; height: 36px; }
}
