:root {
  --bg: #f7f8fa;
  --card-bg: #ffffff;
  --text: #1c1f26;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  /* Official Kornekilik brand palette (from логобук) */
  --primary: #404272;      /* indigo — main logo color, primary UI actions */
  --primary-dark: #2e2f54; /* darker indigo for hover/active */
  --accent-yellow: #ffd64c;
  --accent-orange: #ec6e45;
  --accent-teal: #29adb2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --header-h: 128px;
}

* { box-sizing: border-box; }

/* Custom select styling — replaces the OS-default dropdown look with
   a consistent site-themed appearance (border, radius, chevron icon)
   across every <select> on the site (filters, admin forms, feedback
   type, etc.). Individual rules below can still override padding/size. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--border);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding: 10px 34px 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}
select:focus { border-color: var(--primary); outline: none; }
select::-ms-expand { display: none; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

/* ============================================================
   HEADER — taller ("bulky"), logo row + nav/dropdown row +
   search/filter row all stacked, sticky.
   ============================================================ */
header.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 10px rgba(20,20,40,0.05);
}

.header-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 10px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-title { display: flex; align-items: center; text-decoration: none; white-space: nowrap; }
.site-title img { height: 42px; width: auto; display: block; }

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.search-icon-btn:hover { border-color: var(--primary); }
.header-search input {
  width: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 22px;
  font-size: 14.5px;
  outline: none;
  background: var(--bg);
  opacity: 0;
  margin-left: 0;
  transition: width .18s ease, opacity .18s ease, padding .18s ease, margin .18s ease;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.header-search.expanded input {
  width: 280px;
  max-width: 60vw;
  padding: 10px 16px;
  opacity: 1;
  margin-left: 10px;
  border-color: var(--border);
  position: static;
  transform: none;
}
.header-search input:focus { border-color: var(--primary); background: #fff; }
@media (max-width: 720px) {
  .header-search.expanded input { width: 55vw; }
}

/* On narrow phones the logo + search + lang-toggle + account button used
   to sit on one unwrapped flex row and simply run off the right edge of
   the screen (hidden, not scrollable) — lang toggle and the login/register
   button were invisible. Wrapping to a second row, forced full-width so
   it doesn't fight for space with the logo, fixes that. */
@media (max-width: 640px) {
  .header-top { flex-wrap: wrap; gap: 8px 10px; padding: 12px 16px 8px; }
  .site-title img { height: 34px; }
  .header-actions { flex: 1 1 100%; margin-left: 0; justify-content: space-between; }
  .lang-toggle button { padding: 7px 10px; font-size: 12px; }
  .account-btn { padding: 7px 12px; font-size: 12.5px; }
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-toggle button {
  border: none;
  background: var(--card-bg);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
}
.lang-toggle button.active { background: var(--primary); color: #fff; }

.account-widget { position: relative; }
.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 22px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}
.account-btn:hover { border-color: var(--primary); }
.account-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(20,20,40,0.14);
  min-width: 190px;
  overflow: hidden;
  z-index: 40;
}
.account-menu.open { display: block; }
.account-menu a, .account-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.account-menu a:last-child, .account-menu button:last-child { border-bottom: none; }
.account-menu a:hover, .account-menu button:hover { background: var(--bg); }
.account-menu-status { font-size: 13px !important; font-weight: 700 !important; }
.account-menu-status.subscribed { color: #15803d; cursor: default; }
.account-menu-status.subscribe-link { color: var(--primary) !important; }

.download-btn-fill {
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.download-btn-fill:hover { background: var(--primary-dark); }

/* Nav row with dropdowns */
.header-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-item { position: relative; }
.nav-item > a, .nav-item > button.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.nav-item > a:hover, .nav-item > button.nav-toggle:hover { background: var(--bg); }
.nav-item .caret { font-size: 10px; color: var(--text-muted); transition: transform .15s ease; }
.nav-item.open .caret { transform: rotate(180deg); }

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20,20,40,0.14);
  min-width: 260px;
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  z-index: 40;
}
.dropdown-panel.open { display: block; }
.dropdown-panel a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--text);
}
.dropdown-panel a:hover { background: var(--bg); }

.mode-banner {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  text-align: center;
  padding: 6px 12px;
}

/* ============================================================
   FILTER BAR (catalog page)
   ============================================================ */
.filter-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-bar select { font-size: 13.5px; padding: 8px 34px 8px 12px; }
.filter-clear {
  border: none;
  background: none;
  color: var(--accent-orange);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 6px;
}

/* ============================================================
   LAYOUT / SIDEBAR / GRID (catalog page)
   ============================================================ */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

.sidebar { align-self: start; position: sticky; top: calc(var(--header-h) + 12px); }

.category-header {
  display: none;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 20px;
}
.category-header-icon { font-size: 34px; line-height: 1; }
.category-header-title { margin: 0 0 4px; font-size: 19px; }
.category-header-desc { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.5; }

.group-block { margin-bottom: 22px; }
.group-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 0 8px 4px;
}

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.35;
  font-family: inherit;
}
.cat-list button:hover { background: rgba(64, 66, 114, 0.08); }
.cat-list button.active { background: var(--primary); color: #fff; }

.all-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 18px;
  font-family: inherit;
}
.all-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.results-heading {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}
.results-count { color: var(--text-muted); font-weight: 400; font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }

/* Wraps just the thumbnail image, so overlay badges (ribbon/lock/heart)
   are positioned against the IMAGE only — never against the whole card.
   Previously the heart sat 8px from the bottom of the entire card, which
   put it right on top of the file-type badge in .card-meta below the
   image. Confining the positioning context to this wrapper fixes that. */
.card-thumb-wrap { position: relative; }

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}

.card-body { padding: 12px 14px; }
.card-title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
}
.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Ribbon (hit/top/new), lock badge, and file-type badge are deliberately
   given the exact same box model (padding/radius/font-size/weight) so
   they read as one consistent "badge" family wherever they appear
   together (product page tag row, card meta row) — only the fill color
   changes per type/file-type. */
.file-badge,
.lock-badge,
.ribbon {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 10.5px;
  line-height: 1.5;
  white-space: nowrap;
}
.file-badge { text-transform: uppercase; }

.lock-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(28,31,38,0.72);
  color: #fff;
}
.ribbon {
  position: absolute;
  top: 8px; left: 8px;
  color: #fff;
}
.ribbon.hit { background: var(--accent-orange); }
.ribbon.top { background: var(--accent-teal); }
.ribbon.new { background: var(--accent-yellow); color: #1c1f26; }

.fav-heart {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .1s ease;
  z-index: 2;
}
.fav-heart:hover { transform: scale(1.08); }
.fav-heart.active { background: #fff; }
.product-gallery .fav-heart, .product-title-row .fav-heart {
  position: static; width: 38px; height: 38px; font-size: 18px;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* ============================================================
   MODAL (kept for any inline previews)
   ============================================================ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(15, 18, 25, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal {
  background: var(--card-bg);
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
}
.modal-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px 14px 0 0; }
.modal-body { padding: 22px 26px 28px; }
.modal-close {
  position: absolute; top: 14px; right: 18px;
  background: rgba(0,0,0,0.45); color: #fff; border: none;
  width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer;
}
.modal-title { font-size: 21px; font-weight: 700; margin: 0 0 6px; }
.modal-meta { color: var(--text-muted); font-size: 13.5px; margin-bottom: 14px; }
.modal-desc { font-size: 14.5px; line-height: 1.55; margin-bottom: 20px; }
.tag {
  display: inline-block;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  margin: 0 6px 6px 0;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.tag:hover { background: var(--primary); color: #fff; }
.download-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
}
.download-btn:hover { background: var(--primary-dark); }
.download-btn:disabled { opacity: 0.6; cursor: not-allowed; }
/* Holds one button per available file format (pdf/docx/...) — most
   products have just one, so this is a single button most of the time,
   but wraps cleanly onto its own line for each format when there's more. */
.download-btn-group { display: flex; flex-wrap: wrap; gap: 10px; }

/* ============================================================
   HOMEPAGE — banner carousel + hit rails
   ============================================================ */
.home-wrap { max-width: 1280px; margin: 0 auto; padding: 24px 24px 60px; }

.banner-carousel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 1;
  background: var(--primary);
  margin-bottom: 40px;
}
.banner-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  text-decoration: none;
}
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-caption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 20px 28px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}
/* On phones the banner shrinks to ~125px tall (aspect-ratio 3/1 at
   ~375px wide) but the caption kept its desktop padding/font-size, so
   the text block ate most of the visible banner. Taller aspect-ratio
   + smaller caption gives the image room to actually show. */
@media (max-width: 640px) {
  .banner-carousel { aspect-ratio: 16 / 10; }
  .banner-caption { padding: 12px 16px; font-size: 14.5px; }
}
.banner-dots {
  position: absolute; bottom: 14px; right: 20px;
  display: flex; gap: 7px;
}
.banner-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.5); cursor: pointer; padding: 0;
}
.banner-dots button.active { background: #fff; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35); color: #fff; border: none;
  width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer;
}
.banner-arrow.prev { left: 14px; }
.banner-arrow.next { right: 14px; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 16px;
}
.section-heading h2 { font-size: 19px; margin: 0; }
.section-heading a { font-size: 13.5px; color: var(--primary); text-decoration: none; font-weight: 600; }

.rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 44px; }

.category-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 44px;
}
.category-chip {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  transition: border-color .12s ease;
}
.category-chip:hover { border-color: var(--primary); }

/* ============================================================
   PRODUCT / DOWNLOAD PAGE
   ============================================================ */
.product-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.product-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
}
@media (max-width: 760px) { .product-grid { grid-template-columns: 1fr; } }

.product-thumb {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: cover;
  aspect-ratio: 4/3;
  background: #f0f0f0;
}

.gallery-strip { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumb {
  border: 2px solid transparent; border-radius: 8px; padding: 0; cursor: pointer; background: none; width: 60px; height: 46px; overflow: hidden;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; }
.gallery-thumb.active { border-color: var(--primary); }

.preview-toggle { margin-top: 12px; }
.preview-toggle summary {
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--primary);
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; list-style: none;
}
.preview-toggle summary::-webkit-details-marker { display: none; }
.drive-preview {
  width: 100%; aspect-ratio: 4/3; border: 1px solid var(--border); border-radius: 10px; margin-top: 10px;
}

.product-title { font-size: 24px; font-weight: 700; margin: 0 0 10px; }
.product-tags { margin-bottom: 14px; }
.product-desc { font-size: 15px; line-height: 1.6; margin-bottom: 20px; }

.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 22px; font-size: 13.5px; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table td { padding: 9px 0; }
.spec-table td:first-child { color: var(--text-muted); width: 42%; }
.spec-table td:last-child { font-weight: 600; }

.auth-required-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14px;
  color: #9a3412;
  margin-bottom: 16px;
}
.auth-required-box a { color: var(--primary-dark); font-weight: 700; text-decoration: underline; }

/* ============================================================
   PRODUCT PAGE — "similar materials" carousel
   ============================================================ */
.similar-section { margin-top: 46px; }
.similar-section .section-heading { margin-bottom: 14px; }
.similar-section .section-heading h2 { font-size: 18px; margin: 0; }

.similar-rail-wrap { position: relative; }

.similar-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: thin;
  /* room on the sides so cards don't sit flush under the nav arrows */
  padding-left: 2px; padding-right: 2px;
}
.similar-rail .card {
  flex: 0 0 200px;
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .similar-rail .card { flex-basis: 216px; }
}

.rail-nav-btn {
  position: absolute;
  /* Centered on the thumbnail image (roughly the top 3/4 of card height),
     not the whole card, so the arrow sits over the picture, not the text. */
  top: 84px;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.rail-nav-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.rail-nav-btn.prev { left: -14px; }
.rail-nav-btn.next { right: -14px; }
/* On touch screens the rail already swipes natively — arrows would just
   sit awkwardly half-off the edge of a narrow viewport, so hide them and
   let the horizontal scroll (with snap) do the job. */
@media (max-width: 640px) {
  .rail-nav-btn { display: none; }
  .similar-rail { margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
}

/* ============================================================
   AUTH PAGE (login/register)
   ============================================================ */
.auth-wrap {
  max-width: 420px;
  margin: 60px auto;
  padding: 0 20px;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.auth-tabs { display: flex; gap: 6px; margin-bottom: 22px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.auth-tabs button {
  flex: 1; border: none; background: #fff; padding: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; color: var(--text-muted); font-family: inherit;
}
.auth-tabs button.active { background: var(--primary); color: #fff; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none;
}
.field input:focus { border-color: var(--primary); }
.field select { width: 100%; }
.auth-submit {
  width: 100%; background: var(--primary); color: #fff; border: none; padding: 12px;
  border-radius: 8px; font-size: 14.5px; font-weight: 700; cursor: pointer; margin-top: 6px;
}
.auth-submit:hover { background: var(--primary-dark); }
.auth-error { color: #b91c1c; font-size: 13.5px; margin-top: 10px; }
.auth-success { color: #15803d; font-size: 13.5px; margin-top: 10px; }

.consent-box { margin-bottom: 10px; }
.consent-check {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px;
  color: var(--text-muted); line-height: 1.5; cursor: pointer;
}
.consent-check input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 15px; height: 15px; cursor: pointer; }
.consent-check a { color: var(--primary); }

/* ============================================================
   ADMIN PAGE
   ============================================================ */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 24px 60px; }

.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border); padding-bottom: 10px;
}
.admin-tabs button {
  border: 1px solid var(--border); background: #fff; padding: 9px 16px; border-radius: 20px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text-muted); font-family: inherit;
}
.admin-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

.admin-list-wide { max-height: none; }
.admin-list-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; }
.admin-list-row .auth-submit { display: inline-block; color: #fff; text-decoration: none; border-radius: 6px; font-size: 12.5px; flex-shrink: 0; }

/* ============================================================
   STATIC CONTENT PAGES (about / privacy / send-material / feedback)
   ============================================================ */
.static-wrap { max-width: 820px; margin: 0 auto; padding: 36px 24px 70px; }
.static-wrap h1 { font-size: 26px; margin: 0 0 22px; }
.static-wrap h2 { font-size: 18px; margin: 30px 0 10px; color: var(--primary); }
.static-wrap p { font-size: 14.5px; line-height: 1.75; margin: 0 0 14px; }
.static-wrap ul, .static-wrap ol { font-size: 14.5px; line-height: 1.75; margin: 0 0 14px; padding-left: 22px; }
.static-wrap li { margin-bottom: 6px; }
.static-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 26px 28px; margin-bottom: 20px;
}
.notice-box {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px;
  padding: 16px 18px; font-size: 13.5px; line-height: 1.6; margin: 18px 0;
}
.consent-box {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; border-radius: 10px;
  padding: 16px 18px; font-size: 13.5px; line-height: 1.6; margin: 18px 0;
}
.checkbox-row.big { align-items: flex-start; }
.checkbox-row.big input { margin-top: 3px; }
.checkbox-row.big label { font-weight: 500; font-size: 13.5px; line-height: 1.5; }

/* ============================================================
   SUBSCRIBE PAGE
   ============================================================ */
.plan-toggle { display: flex; gap: 12px; margin-bottom: 18px; }
.plan-btn {
  flex: 1; border: 2px solid var(--border); background: #fff; border-radius: 12px;
  padding: 16px; cursor: pointer; font-family: inherit; text-align: center;
  display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text);
}
.plan-btn strong { font-size: 19px; color: var(--primary); }
.plan-btn.active { border-color: var(--primary); background: rgba(64,66,114,0.06); }

.lock-badge.subscription-lock { background: rgba(64,66,114,0.85); }
.tag-subscription { background: rgba(64,66,114,0.12); color: var(--primary); font-weight: 700; }
.subscription-required-box { background: #f5f3ff; border-color: #ddd6fe; color: #4c1d95; }
.subscription-required-box a { color: var(--primary-dark); }

/* ============================================================
   SHOP PAGE
   ============================================================ */
.shop-wrap { max-width: 1280px; margin: 0 auto; padding: 30px 24px 60px; }
.shop-wrap h1 { font-size: 24px; margin: 0 0 10px; }
.shop-intro { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; max-width: 720px; margin: 0 0 20px; }

.shop-search-input {
  width: 100%; padding: 11px 16px; border: 1px solid var(--border); border-radius: 22px;
  font-size: 14px; outline: none; margin-bottom: 16px; background: #fff;
}
.shop-search-input:focus { border-color: var(--primary); }

.shop-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .shop-layout { grid-template-columns: 1fr; } }

.shop-sidebar { position: sticky; top: calc(var(--header-h) + 12px); }

.shop-card .card-body { padding: 10px 12px; }
.shop-qty-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; color: var(--primary); line-height: 1;
}
.qty-btn:hover { border-color: var(--primary); }
.shop-qty-row span { font-weight: 700; min-width: 18px; text-align: center; }

.cart-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.cart-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

.admin-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px;
}
.admin-card h2 { font-size: 17px; margin: 0 0 18px; }
.admin-card .field { margin-bottom: 14px; }
.admin-card select, .admin-card textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; font-family: inherit;
}
.admin-card textarea { resize: vertical; min-height: 70px; }
.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.checkbox-row label { font-size: 13.5px; font-weight: 600; }
.thumb-preview {
  width: 100%; aspect-ratio: 4/3; border-radius: 8px; border: 1px dashed var(--border);
  object-fit: cover; margin-bottom: 10px; background: var(--bg);
}
/* Small strip of preview thumbnails after picking several gallery
   images at once — deliberately overrides .thumb-preview's full-width
   4:3 block above (same element carries both classes) so each pick
   shows as a compact square instead of stacking full-width. */
.gallery-thumb-preview { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumb-preview:empty { display: none; }
.gallery-thumb-preview-item {
  width: 70px; height: 52px; aspect-ratio: unset; margin-bottom: 0; flex-shrink: 0;
}
.admin-list { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.admin-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.admin-list img { width: 44px; height: 34px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.admin-list .grow { flex: 1; }
.admin-list button {
  border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 5px 10px;
  font-size: 12.5px; cursor: pointer;
}
.admin-denied { text-align: center; padding: 80px 20px; color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
footer.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.88);
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}
.footer-ornament {
  position: absolute;
  bottom: -30px;
  right: 30px;
  width: 150px;
  height: auto;
  opacity: 0.35;
  pointer-events: none;
}
@media (max-width: 760px) { .footer-ornament { width: 90px; right: 10px; } }

.section-heading-ornament {
  height: 30px;
  width: auto;
  margin-right: 4px;
  vertical-align: middle;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }

.footer-inner-v2 { grid-template-columns: 1.1fr 0.8fr 1.7fr 0.9fr 0.8fr; }
@media (max-width: 1100px) {
  .footer-inner-v2 { grid-template-columns: 1fr 1fr 1fr; }
  .footer-inner-v2 .footer-center { grid-column: span 3; order: 5; }
}
@media (max-width: 760px) {
  .footer-inner-v2 { grid-template-columns: 1fr 1fr; }
  .footer-inner-v2 .footer-center { grid-column: span 2; }
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-yellow);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 9px;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col p { font-size: 13.5px; line-height: 1.6; margin: 0 0 10px; color: rgba(255,255,255,0.75); }
.footer-logo img { height: 34px; margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 16px 24px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
}

.footer-legal {
  text-align: center;
  font-size: 12px;
  padding: 0 24px 14px;
  color: rgba(255,255,255,0.55);
}
.footer-legal a { color: rgba(255,255,255,0.75); text-decoration: underline; }

/* Center "main categories" block in the footer, with mini dropdown lists */
.footer-cat-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .footer-cat-groups { grid-template-columns: repeat(3, 1fr); max-width: 640px; } }
@media (max-width: 560px) { .footer-cat-groups { grid-template-columns: 1fr 1fr; } }
.footer-cat-groups .fcg-title { font-size: 12.5px; font-weight: 700; color: #fff; margin: 10px 0 6px; }
.footer-cat-groups .fcg-title:first-child { margin-top: 0; }
.footer-cat-groups a { font-size: 12.5px; margin-bottom: 5px; }

