/* ============================================================
   PAROK777 — MINIMAL DARK 2026
   ============================================================ */

:root {
  --bg:           #0f0f0f;
  --surface:      #141414;
  --surface-2:    #1a1a1a;
  --border:       rgba(255, 255, 255, 0.06);
  --border-hi:    rgba(255, 255, 255, 0.13);
  --text:         #ededed;
  --text-2:       #707070;
  --text-3:       #383838;
  --red:          #dc2626;
  --red-dim:      rgba(220, 38, 38, 0.12);
  --green:        #22c55e;
  --green-dim:    rgba(34, 197, 94, 0.09);
  --r:            11px;
  --r-lg:         17px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- CONTAINER ---- */
.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1000;
}

.header-logo {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  padding: 7px 14px;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.header-logo:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.header-logo a {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 36px;
  display: block;
}

/* PNG-иконка жидкости (белый на тёмном фоне через инверт+screen) */
.cat-img-blend {
  height: 72px;
  width: auto;
  display: block;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 1;
  transition: transform 0.3s ease;
}

.category-btn:hover .cat-img-blend {
  transform: translateY(-4px);
}

/* ---- SEARCH ---- */
.search-form {
  flex: 1;
  display: flex;
  gap: 8px;
}

.search-wrapper {
  flex: 1;
  position: relative;
}

.search-wrapper input[type="text"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 11px 16px;
  transition: border-color 0.2s;
}

.search-wrapper input[type="text"]:focus {
  outline: none;
  border-color: var(--border-hi);
}

.search-wrapper input[type="text"]::placeholder {
  color: var(--text-3);
}

.btn-icon {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-icon:hover { border-color: var(--border-hi); }
.btn-icon svg { display: block; }

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

.search-dropdown.show { display: block; }

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.search-item:last-child { border-bottom: none; }
.search-item:hover { background: rgba(255, 255, 255, 0.04); }

.search-item-image {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--surface);
}

.search-item-info { flex: 1; min-width: 0; }

.search-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-category {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

.search-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.search-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}

/* ---- NAV ---- */
.header nav {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- BUTTONS ---- */
.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn:hover { opacity: 0.85; }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--border-hi);
  background: rgba(255, 255, 255, 0.04);
}

/* ---- BACK ---- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.2s;
  margin-bottom: 4px;
}
.back:hover { color: var(--text); }

/* ---- TYPOGRAPHY ---- */
.title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 24px 0 6px;
  text-align: center;
}

.subtitle-desc {
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 32px;
}

.subtitle {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-2);
  margin: 28px 0 12px;
}

.muted {
  color: var(--text-2);
  font-size: 14px;
}

/* ============================================================
   HOME — CATEGORY GRID
   ============================================================ */

.grid.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 190px;
  padding: 28px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s;
  cursor: pointer;
}

.category-btn:hover {
  background: var(--surface-2);
}

.cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-svg {
  display: block;
  height: 72px;
  width: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.85;
}

.category-btn:hover .cat-svg {
  transform: translateY(-4px);
  opacity: 1;
}

.cat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.4;
}

/* Per-category colors + hover borders */
.cat--vape         { --cc: #93c5fd; }
.cat--vape-strong  { --cc: #fca5a5; }
.cat--liquid       { --cc: #6ee7b7; }
.cat--liquid-strong{ --cc: #fdba74; }

.cat--vape .cat-svg,
.cat--vape-strong .cat-svg,
.cat--liquid .cat-svg,
.cat--liquid-strong .cat-svg { color: var(--cc); }

.category-btn:hover {
  border-color: color-mix(in srgb, var(--cc, #fff) 22%, transparent);
}

/* ============================================================
   PRODUCT CARDS  (category page)
   ============================================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border-hi); }

.card-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.card-image-wrap img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .card-image-wrap img { transform: scale(1.04); }

.card-no-image {
  width: 100%;
  height: 100px;
  background: var(--surface-2);
}

/* Model detail — image inside card-body */
.card-body > img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 20px;
  margin-bottom: 8px;
  display: block;
}

.price-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid var(--border-hi);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  backdrop-filter: blur(8px);
  letter-spacing: -0.01em;
}

.card-body {
  padding: 14px 16px;
  flex: 1;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 5px;
  line-height: 1.4;
}

.flavors-count {
  font-size: 13px;
  color: var(--text-2);
}

/* Out of stock */
.card--oos { opacity: 0.42; }
.card--oos:hover {
  opacity: 0.65;
  border-color: rgba(220, 38, 38, 0.25);
}

.oos-banner {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(180, 28, 28, 0.96);
  color: #fff;
  text-align: center;
  padding: 9px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-2);
}
.empty-icon { font-size: 40px; margin-bottom: 10px; opacity: 0.35; }
.empty-text { font-size: 15px; }

/* ============================================================
   FLAVOR LIST  (model page)
   ============================================================ */

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.2s;
}

.list-item:hover { border-color: var(--border-hi); }

.flavors-list .list-name {
  flex: 1;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
}

.flavors-list .list-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.flavors-list .list-stock {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 20px;
}

.list-stock.stock-yes {
  color: var(--green);
  background: var(--green-dim);
}

.list-stock.stock-no {
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */

.results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  transition: border-color 0.2s;
}

.result-card:hover { border-color: var(--border-hi); }

.result-card .rc-top,
.result-card .rc-mid,
.result-card .rc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-card .rc-top  { margin-bottom: 4px; }
.result-card .rc-mid  { margin-bottom: 10px; }

.rc-title  { font-size: 15px; font-weight: 600; color: var(--text); }
.rc-price  { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; }
.rc-flavor { font-size: 13px; color: var(--text-2); }
.rc-cat    { font-size: 12px; color: var(--text-3); }

.rc-stock {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.rc-stock.yes { color: var(--green); background: var(--green-dim); }
.rc-stock.no  { color: var(--text-3); background: rgba(255,255,255,0.03); }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  margin-top: 80px;
  padding: 32px 0 20px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  flex-shrink: 0;
}

.footer-badge-18 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-2);
  line-height: 1;
  letter-spacing: -0.03em;
}

.footer-content { flex: 1; }

.footer-warning {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.footer-info {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}

.footer-dev {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   AGE GATE
   ============================================================ */

#ageGate {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.age-gate-box {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 22px;
  padding: 36px 28px 28px;
  text-align: center;
}

.age-gate-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.age-gate-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.age-gate-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 26px;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-btn {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   FORMS  (admin)
   ============================================================ */

.form {
  display: grid;
  gap: 12px;
  max-width: 540px;
}

input, select, button, textarea {
  padding: 11px 14px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-hi);
}

button { cursor: pointer; }

/* Danger button */
.btn-danger {
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.25);
}
.btn-danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.5);
}

/* Alert boxes */
.alert {
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 14px;
  margin-bottom: 14px;
}
.alert-error {
  background: var(--red-dim);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #fca5a5;
}
.alert-success {
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--green);
}

/* Admin label */
.field-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}

/* ---- TABLE ---- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.table th, .table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
}

.table th {
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table tr:last-child td { border-bottom: none; }

/* ============================================================
   ADMIN
   ============================================================ */

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.admin-model-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
  align-items: start;
}

details summary {
  cursor: pointer;
  margin: 8px 0;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.2s;
}

details summary:hover { border-color: var(--border-hi); }

.form-block {
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scroll { max-height: 360px; overflow: auto; }

.models-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.models-list li {
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 13px;
  transition: border-color 0.2s;
}

.models-list li:hover { border-color: var(--border-hi); }

/* ============================================================
   MISC
   ============================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.breadcrumb-sep { color: var(--text-3); }

.glass {
  backdrop-filter: blur(12px);
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid var(--border);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }

/* Selection */
::selection { background: rgba(255,255,255,0.12); color: white; }

/* Focus ring */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 1px solid rgba(255,255,255,0.28);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .container { padding: 14px 16px; }

  .header {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 14px;
  }

  .search-form {
    order: 3;
    flex-basis: 100%;
  }

  .header-logo img { height: 38px; }

  .header nav .btn-outline {
    font-size: 13px;
    padding: 8px 12px;
  }

  .title { font-size: 26px; }

  .grid.category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .category-btn { min-height: 150px; padding: 20px 12px; gap: 12px; }
  .cat-svg { height: 44px !important; }
  .cat-name { font-size: 13px; }

  .cards {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
  }

  .card-image-wrap img { height: 170px; }

  .flavors-list .list-item { flex-wrap: wrap; }
  .flavors-list .list-name { flex-basis: 100%; margin-bottom: 2px; }

  .results { gap: 6px; }
  .result-card .rc-top,
  .result-card .rc-mid { flex-wrap: wrap; }

  .footer-grid { flex-direction: column; align-items: center; gap: 14px; text-align: center; }
  .footer-content { text-align: center; }
  .admin-model-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .grid.category-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .category-btn { min-height: 130px; padding: 16px 10px; }
  .cat-svg { height: 38px !important; }
  .cat-name { font-size: 12px; }
  .title { font-size: 22px; }
  .cards { grid-template-columns: 1fr; }
}
