/* ── RESET & VARIABLES ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0d0d0d;
    --surface: #161616;
    --surface2: #1f1f1f;
    --border: #2a2a2a;
    --accent: #7fff00;
    --text: #f0f0f0;
    --text-muted: #888;
    --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
header {
    background: rgba(22,22,22,0.92);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    gap: 16px;
}

.site-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.site-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--accent);
}

.site-logo-text span { color: var(--text); }

/* ── HERO ── */
.hero {
    text-align: center;
    padding: 52px 20px 40px;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
}

.hero h1 em { color: var(--accent); font-style: normal; }

.hero p {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
}

/* ── FILTERS ── */
.filters-bar {
    max-width: 1300px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 70px;
}

.filter-pills { display: flex; gap: 7px; flex-wrap: wrap; }

.filter-pill {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.filter-pill:hover { border-color: rgba(127,255,0,0.4); color: var(--text); }
.filter-pill.active { background: rgba(127,255,0,0.12); border-color: var(--accent); color: var(--accent); }

/* ── GRID ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

/* ── CARD ── */
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(127,255,0,0.5);
    box-shadow: 0 8px 32px rgba(127,255,0,0.07);
}

.product-card:active { transform: scale(0.98); }

.product-thumbnail {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: var(--surface2);
}

.product-thumbnail-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #1a1a1a, #222);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-info { padding: 14px; }

.product-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

.badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-price { background: rgba(127,255,0,0.12); color: var(--accent); border: 1px solid rgba(127,255,0,0.25); }
.badge-category { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }

.product-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-farm { font-size: 0.78rem; color: var(--text-muted); }

/* ── MODAL OVERLAY ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overscroll-behavior: contain;
}

.modal-overlay.active { display: flex; }

/* ── MODAL BOX ── */
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 700px;
    max-height: 95dvh;
    max-height: 95vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@media (min-width: 640px) {
    .modal-overlay { align-items: center; padding: 20px; }
    .modal { border-radius: 20px; animation: modalIn 0.28s cubic-bezier(0.32, 0.72, 0, 1); }

    @keyframes modalIn {
        from { transform: scale(0.94) translateY(16px); opacity: 0; }
        to   { transform: scale(1)    translateY(0);    opacity: 1; }
    }
}

.modal-media { width: 100%; overflow: hidden; background: #000; border-radius: 20px 20px 0 0; }
.modal-media img, .modal-media video { width: 100%; max-height: 340px; object-fit: cover; display: block; }

.modal-body { padding: 20px; }
@media (min-width: 640px) { .modal-body { padding: 28px; } }

.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.modal-title { font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 800; line-height: 1.2; }

.modal-close {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.modal-close:hover { background: #333; }

.modal-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge-cat-modal { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }
.badge-farm-modal { background: rgba(255,165,0,0.08); color: #ffa500; border: 1px solid rgba(255,165,0,0.2); }

.modal-description { color: var(--text-muted); font-size: 0.93rem; line-height: 1.65; margin-bottom: 22px; }

.prices-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 10px; }

.prices-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-bottom: 24px; }

.price-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 6px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.price-item:hover { border-color: var(--accent); background: rgba(127,255,0,0.04); }
.price-qty { font-size: 0.82rem; font-weight: 700; color: var(--accent); }
.price-val { font-size: 0.88rem; color: var(--text); font-weight: 600; margin-top: 3px; }

/* ── TELEGRAM BUTTON ── */
.btn-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: #229ed9;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.btn-telegram:hover  { background: #1a8abf; }
.btn-telegram:active { transform: scale(0.98); }
.tg-icon { width: 24px; height: 24px; flex-shrink: 0; }

/* ── SITE NAV ── */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.site-nav-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.site-nav-link:hover  { color: var(--text); border-color: var(--border); }
.site-nav-link.active { color: var(--text); background: var(--surface2); border-color: var(--border); }

.info-header {
    position: relative;
    z-index: 10;
    background: rgba(10,10,10,0.7);
    border-bottom-color: rgba(255,255,255,0.08);
}

/* ── FILTER SELECT ── */
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 32px 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s;
}

.filter-select:focus { outline: none; border-color: var(--accent); }
.filter-select option { background: #1f1f1f; }

/* ── INFO PAGE ── */
.info-body { overflow-x: hidden; }

.info-bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.25);
    transform: scale(1.06);
    z-index: 0;
}

.info-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.info-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.info-back {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
    white-space: nowrap;
}

.info-back:hover { color: #fff; }

.info-logo-img { height: 32px; width: auto; object-fit: contain; margin-left: auto; }
.info-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--accent);
    margin-left: auto;
}
.info-logo-text span { color: #fff; }

.info-title {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.info-cards-1 { grid-template-columns: 1fr; max-width: 500px; margin-left: auto; margin-right: auto; }
.info-cards-2 { grid-template-columns: repeat(2, 1fr); max-width: 800px; margin-left: auto; margin-right: auto; }

.info-card {
    --card-color: #7fff00;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--card-color);
    border-radius: 20px;
    padding: 26px 24px;
    color: #fff;
}

.info-card-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    background: color-mix(in srgb, var(--card-color) 15%, transparent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.info-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card-content {
    font-size: 0.88rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.78);
}

.info-card-content p { margin-bottom: 8px; }
.info-card-content ul, .info-card-content ol { padding-left: 18px; margin-bottom: 8px; }
.info-card-content li { margin-bottom: 4px; }
.info-card-content strong { color: #fff; font-weight: 700; }

.info-tg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #229ed9;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    max-width: 400px;
    margin: 0 auto;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.info-tg-btn:hover  { background: #1a8abf; }
.info-tg-btn:active { transform: scale(0.98); }

.info-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 9px 20px;
    border-radius: 10px;
    background: var(--card-color);
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.info-card-btn:hover  { opacity: 0.82; }
.info-card-btn:active { transform: scale(0.97); }

/* ── MODAL BUTTONS ── */
.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}
.btn-modal-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: #229ed9;
    color: #fff;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-modal-link:hover  { background: #1a8abf; }
.btn-modal-link:active { transform: scale(0.98); }

@media (max-width: 800px) {
    .info-cards, .info-cards-2 { grid-template-columns: 1fr; }
    .info-container { padding: 24px 16px 48px; }
    header { padding: 0 16px; gap: 8px; }
    .site-nav { gap: 2px; }
    .site-nav-link { padding: 6px 11px; font-size: 0.78rem; }
}

@media (max-width: 500px) {
    header {
        height: auto;
        min-height: 52px;
        padding: 8px 14px;
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 6px;
    }
    .site-logo-img { height: 28px; }
    .site-logo-text { font-size: 1.2rem; }
    .site-nav {
        margin-left: 0;
        order: 3;
        width: 100%;
        justify-content: center;
        padding-bottom: 4px;
    }
    .site-nav-link { padding: 5px 14px; font-size: 0.8rem; }
    .info-tg-btn { width: 100%; justify-content: center; }
}

/* ── ADMIN CSS EXTRAS ── */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface2, #1e1e1e);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: border-color 0.2s;
}
.radio-option:has(input:checked) { border-color: var(--accent, #7fff00); }
.radio-option input[type="radio"] { accent-color: var(--accent, #7fff00); }

.info-card-editor {
    background: var(--surface2, #1e1e1e);
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 12px;
    padding: 18px;
    margin-top: 16px;
}
.info-card-editor-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted, #777);
    margin-bottom: 14px;
}
.info-content-area { min-height: 120px; font-family: monospace; font-size: 0.82rem; }

/* ── MISC ── */
.no-products, .no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    grid-column: 1 / -1;
    font-size: 1rem;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
