/* ═══════════════════════════════════════════════════════════
   Palantír — Smart-Home Beratungstool
   Theme: Dunkel · Stein · Amber · LotR
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
  --bg:           #0D0D10;
  --surface:      #1A1A22;
  --card:         #22222E;
  --card-hover:   #2A2A3A;
  --border:       rgba(232, 184, 109, 0.15);
  --border-hover: rgba(232, 184, 109, 0.35);

  --gold:         #E8B86D;
  --gold-dim:     rgba(232, 184, 109, 0.15);
  --gold-glow:    rgba(232, 184, 109, 0.25);
  --ice:          #7EC8E3;
  --ice-dim:      rgba(126, 200, 227, 0.12);

  --text:         #F0EDE6;
  --text-muted:   #9090A0;
  --text-dim:     #6A6A7A;

  --success:      #6EBF8B;
  --success-bg:   rgba(110, 191, 139, 0.15);
  --warning:      #E8B86D;
  --warning-bg:   rgba(232, 184, 109, 0.15);
  --special:      #C084FC;
  --special-bg:   rgba(192, 132, 252, 0.15);
  --danger:       #F87171;
  --danger-bg:    rgba(248, 113, 113, 0.15);

  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    16px;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-gold:  0 0 20px rgba(232, 184, 109, 0.15);

  --font-head:    'Cinzel', serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --max-w:        1200px;
  --header-h:     64px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

/* Subtle stone texture via repeating radial */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232,184,109,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 120%, rgba(126,200,227,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ice); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: 0.03em; }

img { max-width: 100%; border-radius: var(--radius-sm); }

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(13, 13, 16, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.site-logo-glyph {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px var(--gold));
}

.site-logo-text {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.site-logo-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 0.1rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--gold-dim);
}

.btn-admin {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-head);
  letter-spacing: 0.06em;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-admin:hover {
  background: rgba(232, 184, 109, 0.25);
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-wrap {
  padding: 2.5rem 0 4rem;
}

.page-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ─── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}
.filter-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Product Grid ───────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.product-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--surface);
  padding: 1rem;
}
.product-image-placeholder {
  width: 100%;
  height: 180px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
}

.product-body {
  padding: 1.1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.product-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.3;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  gap: 0.75rem;
}

.product-rating {
  display: flex;
  gap: 0.15rem;
}
.star { color: var(--text-dim); font-size: 0.9rem; }
.star.filled { color: var(--gold); }

.product-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-amazon, .btn-shop {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-amazon:hover, .btn-shop:hover {
  background: rgba(232, 184, 109, 0.25);
  border-color: var(--gold);
  color: var(--gold);
}
.shop-select option {
  background: var(--surface);
  color: var(--text);
}

/* ─── Resources ──────────────────────────────────────────── */
.resource-section { margin-bottom: 2.5rem; }
.resource-section-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.resource-item:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
  color: var(--text);
}

.resource-icon { font-size: 1.3rem; flex-shrink: 0; }
.resource-info { flex: 1; min-width: 0; }
.resource-name { font-weight: 500; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-desc { font-size: 0.8rem; color: var(--text-muted); }
.resource-arrow { color: var(--text-dim); font-size: 0.85rem; flex-shrink: 0; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* ─── Admin Layout ───────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--header-h));
}

.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
}

.admin-sidebar-section {
  padding: 0 1rem;
  margin-bottom: 0.25rem;
}
.admin-sidebar-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding: 0.6rem 0.5rem 0.3rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.admin-nav-link:hover {
  background: var(--gold-dim);
  color: var(--text);
}
.admin-nav-link.active {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--border);
}

.admin-content {
  padding: 2rem;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.admin-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--gold);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font-body);
  line-height: 1;
}
.btn-primary {
  background: var(--gold);
  color: #0D0D10;
  border-color: var(--gold);
}
.btn-primary:hover { background: #f0c47a; color: #0D0D10; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--gold-dim); color: var(--gold); border-color: var(--border-hover); }
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(248,113,113,0.3);
}
.btn-danger:hover { background: rgba(248,113,113,0.25); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface); }
th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(232,184,109,0.06);
  font-size: 0.875rem;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(232,184,109,0.03); }

.td-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 680px;
}

.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="color"],
select,
textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}
input[type="color"] { height: 2.5rem; padding: 0.25rem 0.4rem; cursor: pointer; }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
textarea { resize: vertical; min-height: 100px; }
select option { background: var(--surface); }

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}
.checkbox-label input { width: auto; }

.star-input { display: flex; gap: 0.5rem; align-items: center; }
.star-input input { width: 70px; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: rgba(248,113,113,0.3); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(110,191,139,0.3); }

/* ─── Login Page ─────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow), var(--shadow-gold);
  text-align: center;
}
.login-glyph {
  font-size: 3rem;
  filter: drop-shadow(0 0 12px var(--gold));
  margin-bottom: 0.75rem;
}
.login-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.login-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.login-card .form-group { text-align: left; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* ─── Dashboard Stat Cards ───────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ─── Tag Badge Colors (inline style via Python) ─────────── */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ─── HTMX Loading ───────────────────────────────────────── */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s;
}
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* ─── Product Name Link ──────────────────────────────────── */
.product-name-link {
  text-decoration: none;
  color: inherit;
}
.product-name-link:hover .product-name {
  color: var(--gold);
}

/* ─── List Form: product row with qty input ─────────────── */
.list-product-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.qty-input {
  width: 58px;
  font-size: 0.82rem;
  padding: 0.25rem 0.4rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.2s;
}
.qty-input:disabled { opacity: 0.3; }
.qty-input:focus { border-color: var(--gold); outline: none; }

/* ─── List Form: note textarea ───────────────────────────── */
.list-product-block { display: flex; flex-direction: column; gap: 0.3rem; }
.list-note-wrap { padding-left: 1.6rem; }
.list-note-input {
  width: 100%;
  min-height: 52px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--card);
  border: 1px dashed rgba(232, 184, 109, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  resize: vertical;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}
.list-note-input:focus {
  outline: none;
  border-color: rgba(232, 184, 109, 0.5);
  border-style: solid;
}

/* ─── Product note on list page ──────────────────────────── */
.product-note {
  font-size: 0.82rem;
  color: var(--ice);
  font-style: italic;
  line-height: 1.5;
  padding: 0.4rem 0.6rem;
  background: var(--ice-dim);
  border-left: 2px solid rgba(126, 200, 227, 0.35);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ─── Quantity Badge on product cards ────────────────────── */
.qty-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--border);
  vertical-align: middle;
  letter-spacing: 0.03em;
}

/* ─── Share Button ───────────────────────────────────────── */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  line-height: 1;
  white-space: nowrap;
}
.btn-share:hover {
  border-color: var(--ice);
  color: var(--ice);
  background: var(--ice-dim);
}

/* ─── Share Box ──────────────────────────────────────────── */
.share-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.share-box-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.share-url-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.share-url-input {
  flex: 1;
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--ice);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  outline: none;
  cursor: text;
  min-width: 0;
}

/* ─── Product Detail Page ────────────────────────────────── */
.product-detail-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.product-detail-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  object-fit: contain;
  padding: 1.5rem;
  max-height: 360px;
}
.product-detail-info {
  padding-top: 0.25rem;
}

@media (max-width: 768px) {
  .product-detail-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .share-url-row { flex-wrap: wrap; }
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.footer-quote { font-size: 0.8rem; color: var(--text-dim); }
.footer-quote em { font-style: italic; color: var(--text-muted); }
.footer-attr { color: var(--text-dim); }

.legal-trigger {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: none;
  border: 1px dashed rgba(232, 184, 109, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(232, 184, 109, 0.55);
  padding: 0.65rem 1rem;
  max-width: 560px;
  text-align: left;
  line-height: 1.55;
  transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.legal-trigger:hover {
  color: var(--gold);
  border-color: rgba(232, 184, 109, 0.5);
  background: rgba(232, 184, 109, 0.04);
  box-shadow: 0 0 20px rgba(232, 184, 109, 0.07);
}
.legal-trigger em { font-style: italic; }
.legal-trigger-icon {
  font-size: 0.85rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ─── Legal Dialog ───────────────────────────────────────── */
dialog {
  background: var(--card);
  border: 1px solid rgba(232, 184, 109, 0.3);
  border-radius: var(--radius-lg);
  padding: 0;
  color: var(--text);
  font-family: var(--font-body);
  max-width: 540px;
  width: calc(100% - 2rem);
  box-shadow:
    0 8px 48px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(232, 184, 109, 0.08) inset,
    0 0 40px rgba(232, 184, 109, 0.06);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}
dialog[open] {
  animation: modal-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.modal-inner { padding: 2.25rem 2rem 1.75rem; position: relative; }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-close:hover {
  background: var(--danger-bg);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--danger);
}

.modal-ornament {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 14px rgba(232, 184, 109, 0.55));
  line-height: 1;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--gold);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
}
.modal-intro {
  font-size: 0.845rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.modal-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(232, 184, 109, 0.3), transparent);
  margin-bottom: 1.5rem;
}
.modal-section {
  border-left: 2px solid rgba(232, 184, 109, 0.35);
  padding-left: 1rem;
  margin-bottom: 1.25rem;
}
.modal-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.modal-section-head h3 {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.07em;
}
.modal-section p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-bottom: 0.5rem;
}
.modal-refs {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: monospace;
  letter-spacing: 0.03em;
}
.modal-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(232, 184, 109, 0.1);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .site-logo-sub { display: none; }
}
