:root {
  --bg: #121016;
  --card-bg: #1d1a24;
  --card-border: #2e2a38;
  --text: #f5f3f8;
  --muted: #a79fb3;

  --paper: #f2e6cd;
  --paper-line: rgba(60, 45, 20, 0.08);
  --ink: #241f14;
  --ink-muted: #6b5f47;
  --red: #e8402f;
  --yellow: #ffca3a;
  --green: #7bc142;
  --blue: #3aa1e0;
  --purple: #7d4fbf;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, sans-serif;
}

.bg-rainbow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at top, rgba(255, 0, 122, 0.12), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(0, 170, 255, 0.1), transparent 60%);
}

/* ---- Public page: crumpled-paper / sticker design, matches the logo art ---- */

body.public-page {
  background-color: var(--paper);
  color: var(--ink);
  background-image:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px),
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.5), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(0, 0, 0, 0.05), transparent 55%);
  background-size: 26px 26px, 26px 26px, auto, auto;
  overflow-x: hidden;
}

.decor {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

.decor-rainbow-top {
  top: -60px;
  right: -80px;
  width: 340px;
  transform: rotate(8deg);
}

.decor-rainbow-bottom {
  bottom: -70px;
  left: -100px;
  width: 300px;
  transform: rotate(-172deg) scaleY(-1);
  opacity: 0.6;
}

.decor-burst {
  top: 6%;
  left: 4%;
  width: 46px;
  transform: rotate(-18deg);
  opacity: 0.85;
}

.decor-splat {
  bottom: 8%;
  right: 6%;
  width: 60px;
  opacity: 0.85;
}

.decor-star {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: 22px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.brand {
  margin-bottom: 8px;
  text-align: center;
}

.logo-img {
  max-width: 320px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(60, 40, 10, 0.18));
}

.logo-fallback {
  font-family: 'Permanent Marker', cursive;
  font-size: 42px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ff4d4d, #ffb84d, #ffe14d, #4dff88, #4dc3ff, #b84dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-fallback .dot {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.logo-fallback .eu-badge {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  vertical-align: middle;
  background: #ffe14d;
  color: #1a1a1a;
  -webkit-text-fill-color: #1a1a1a;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  transform: rotate(-4deg);
}

.tagline {
  font-family: 'Permanent Marker', cursive;
  color: var(--ink);
  font-size: 18px;
  margin: 4px 0 28px;
  opacity: 0.85;
  transform: rotate(-1deg);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.link-list li:nth-child(odd) .link-card {
  transform: rotate(-1deg);
}

.link-list li:nth-child(even) .link-card {
  transform: rotate(1deg);
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: #fffdf7;
  border: 3px solid var(--ink);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: rotate(0deg) translateY(-3px) !important;
  box-shadow: 7px 7px 0 var(--ink);
}

.link-icon-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  border: 2px solid var(--ink);
  background: var(--yellow);
}

.link-icon-badge.icon-instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7); }
.link-icon-badge.icon-viber { background: var(--purple); }
.link-icon-badge.icon-signal { background: var(--blue); }
.link-icon-badge.icon-threema { background: var(--green); }
.link-icon-badge.icon-link { background: var(--yellow); }

.link-label {
  flex: 1;
}

.showroom-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Permanent Marker', cursive;
  font-size: 19px;
  transform: rotate(-1deg);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.showroom-cta:hover,
.showroom-cta:focus-visible {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 7px 7px 0 var(--ink);
}

.back-link {
  align-self: flex-start;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

.back-link:hover {
  color: var(--ink);
}

.showroom-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.showroom-card {
  position: relative;
  background: #fffdf7;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
}

.showroom-list li:nth-child(odd) .showroom-card { transform: rotate(-0.6deg); }
.showroom-list li:nth-child(even) .showroom-card { transform: rotate(0.6deg); }

.showroom-video {
  width: 100%;
  max-height: 420px;
  display: block;
  background: #000;
}

.showroom-body {
  padding: 16px 18px 18px;
}

.showroom-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.showroom-title {
  font-weight: 700;
  font-size: 18px;
  margin: 0;
}

.price-tag {
  flex-shrink: 0;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  transform: rotate(3deg);
  white-space: nowrap;
}

.showroom-desc {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.showroom-empty {
  text-align: center;
  color: var(--ink-muted);
  font-size: 15px;
  padding: 40px 0;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 4px 0 20px;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 14px);
  opacity: 0.35;
}

.section-divider span {
  font-family: 'Permanent Marker', cursive;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
}

.footer a {
  color: var(--ink-muted);
  font-size: 12px;
  text-decoration: none;
  opacity: 0.7;
}

.footer a:hover {
  opacity: 1;
}

.powered-by {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
  opacity: 0.75;
}

.powered-by a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  opacity: 1;
}

.powered-by a:hover {
  text-decoration: underline;
}

/* ---- Admin ---- */

.admin-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

.admin-title {
  font-family: 'Permanent Marker', cursive;
  font-size: 30px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #ff4d4d, #ffb84d, #ffe14d, #4dff88, #4dc3ff, #b84dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 4px;
}

input[type="text"],
input[type="url"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: #16131c;
  color: var(--text);
  font-size: 14px;
}

button, .btn {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  background: #ff4d4d;
  color: #fff;
  margin-top: 12px;
}

button.secondary, .btn.secondary {
  background: #2e2a38;
  color: var(--text);
}

button.danger {
  background: #7a1f2b;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--card-border);
}

.link-row:last-child {
  border-bottom: none;
}

.link-row.disabled {
  opacity: 0.45;
}

.link-row-main {
  flex: 1;
  min-width: 0;
}

.link-row-main .label {
  font-weight: 600;
}

.link-row-main .url {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.link-row-actions button {
  margin-top: 0;
  padding: 6px 10px;
  font-size: 12px;
}

.message {
  background: #1f3a2b;
  border: 1px solid #2f5c40;
  color: #a6f0bf;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.edit-fields {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--card-border);
}

.edit-fields.open {
  display: block;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.checkbox-row input {
  width: auto;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.top-bar form {
  margin: 0;
}

/* ---- Category filter tabs (public showroom) ---- */

.category-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 20px;
}

.cat-tab {
  flex: 1;
  padding: 10px 8px;
  background: #fffdf7;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  font-family: 'Permanent Marker', cursive;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cat-tab:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.cat-tab.active {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.cat-tab.tab-weed.active {
  background: var(--green);
  color: var(--ink);
  border-color: #3e6b1e;
}

.cat-tab.tab-hash.active {
  background: #c97d2a;
  color: #fff;
  border-color: #7a4a10;
}

/* ---- Category badges (public showroom cards) ---- */

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.category-badge.cat-weed {
  background: var(--green);
  color: var(--ink);
}

.category-badge.cat-hash {
  background: #c97d2a;
  color: #fff;
  border-color: #7a4a10;
}

/* ---- Price grid (public showroom) ---- */

.price-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.price-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.price-grams {
  color: var(--ink-muted);
  font-weight: 600;
}

.price-sep {
  color: var(--ink-muted);
  font-weight: 400;
  font-size: 11px;
}

.price-amount {
  color: var(--ink);
  font-weight: 700;
}

.price-currency {
  font-weight: 400;
  font-size: 11px;
}

/* ---- Admin: category badge in item row ---- */

.admin-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  margin-left: 6px;
  vertical-align: middle;
}

.admin-cat-badge.cat-weed {
  background: #2f5c26;
  color: #a6f0bf;
}

.admin-cat-badge.cat-hash {
  background: #5c3a10;
  color: #f0c88a;
}

/* ---- Admin: category select ---- */

.admin-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: #16131c;
  color: var(--text);
  font-size: 14px;
  font-family: 'Poppins', system-ui, sans-serif;
}

/* ---- Admin: gram tiers grid ---- */

.gram-tiers-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.gram-tier-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 2px;
}

.gram-tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gram-tier-row input {
  margin: 0 !important;
  width: 100%;
}

/* ---- Announcement banner ---- */

.announcement-banner {
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(36, 31, 20, 0.25);
  margin-bottom: 20px;
  line-height: 1.4;
}

/* ---- Inline SVG icon sizing ---- */

.icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

/* ---- Showroom card: featured + sold-out overlays ---- */

.showroom-card {
  position: relative;
}

.showroom-card--featured {
  border-color: #ffb84d;
  box-shadow: 6px 6px 0 #ffb84d;
}

.featured-sticker {
  position: absolute;
  top: 12px;
  left: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffca3a;
  color: var(--ink);
  font-family: 'Permanent Marker', cursive;
  font-size: 13px;
  padding: 5px 12px 5px 10px;
  border: 2px solid var(--ink);
  border-left: none;
  border-radius: 0 8px 8px 0;
  box-shadow: 3px 3px 0 rgba(36,31,20,0.2);
  white-space: nowrap;
}

.featured-sticker .icon-svg {
  width: 14px;
  height: 14px;
}

.sold-out-ribbon {
  position: absolute;
  top: 12px;
  right: 0;
  z-index: 2;
  background: var(--red);
  color: #fff;
  font-family: 'Permanent Marker', cursive;
  font-size: 13px;
  padding: 5px 10px 5px 12px;
  border: 2px solid var(--ink);
  border-right: none;
  border-radius: 8px 0 0 8px;
  box-shadow: -3px 3px 0 rgba(36,31,20,0.2);
  white-space: nowrap;
}

/* ---- Product photo (when no video) ---- */

.showroom-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* ---- Order button — full-width card bottom CTA ---- */

.showroom-card-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--green);
  color: var(--ink);
  font-family: 'Permanent Marker', cursive;
  font-size: 16px;
  text-decoration: none;
  border-top: 2.5px solid var(--ink);
  transition: background 0.12s ease, gap 0.12s ease;
}

.showroom-card-order .icon-svg {
  width: 18px;
  height: 18px;
  transition: transform 0.12s ease;
}

.showroom-card-order:hover,
.showroom-card-order:focus-visible {
  background: #64a832;
  gap: 12px;
}

.showroom-card-order:hover .icon-svg {
  transform: scale(1.15);
}
