/* Vergleichsportal — style.css */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #dbeafe;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --error: #dc2626;
  --error-bg: #fee2e2;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 10px 30px rgba(15,23,42,.08);
}

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

html, body { margin: 0; padding: 0; }

/* Invisible scrollbar — scrolling still works everywhere, just no visual chrome */
html {
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE / old Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* --- Header ---------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  letter-spacing: .5px;
}
.brand-name { font-size: 1.05rem; }
.site-nav { display: inline-flex; align-items: center; gap: 16px; }
.nav-user { color: var(--muted); font-size: .95rem; }
.inline-form { display: inline; }

/* --- Buttons --------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-admin {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  position: relative;
}
.btn-admin::before {
  content: "✦ ";
  color: #10b981;
  font-weight: 700;
}
.btn-admin:hover { background: #d1fae5; border-color: #6ee7b7; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }

/* --- Main ----------------------------------------------------------- */
main { flex: 1; padding: 0; }
/* Every top-level <section> gets container width, unless it opts out */
main > section:not(.hero-fullwidth) {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 48px 24px;
  width: 100%;
}
main > .container:not(.hero-content) { padding-top: 48px; padding-bottom: 48px; }

/* --- Hero full-width slideshow -------------------------------------- */
.hero-fullwidth {
  position: relative;
  width: 100%;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 64px;
}
.hero-bg-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  animation: heroSlide 32s infinite;
  will-change: opacity;
}
.hero-bg-slide:nth-child(1) { animation-delay: 0s; }
.hero-bg-slide:nth-child(2) { animation-delay: 8s; }
.hero-bg-slide:nth-child(3) { animation-delay: 16s; }
.hero-bg-slide:nth-child(4) { animation-delay: 24s; }

@keyframes heroSlide {
  0%   { opacity: 0; transform: scale(1.06); }
  6%   { opacity: 1; }
  25%  { opacity: 1; transform: scale(1); }
  31%  { opacity: 0; }
  100% { opacity: 0; }
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.55) 50%, rgba(37, 99, 235, 0.45) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 24px;
  color: #fff;
  max-width: 760px;
  text-align: center;
}
.hero-content h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin: 0 0 20px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
.hero-content .lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, .9);
  margin: 0 auto 28px;
  max-width: 60ch;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .3);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-content .btn-primary {
  box-shadow: 0 10px 30px rgba(37, 99, 235, .4);
}

@media (max-width: 820px) {
  .hero-fullwidth { min-height: 420px; }
  .hero-content { padding: 56px 20px; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content .lead { font-size: 1rem; }
}

/* --- Categories ------------------------------------------------------ */
.categories h2 { font-size: 1.5rem; margin: 0 0 20px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .15s, border-color .15s;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.cat-card h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--text); }
.cat-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.cat-emoji { font-size: 2rem; line-height: 1; margin-bottom: 12px; }

/* --- Category page --------------------------------------------------- */
.category-page { padding: 0; }
.category-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 16px 0 32px;
}
.category-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
}
.category-header h1 { margin: 0 0 4px; font-size: 2rem; }
.category-lead { margin: 0; color: var(--muted); font-size: 1.05rem; }
.category-meta { margin-bottom: 16px; }

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
}
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { color: var(--muted); }

/* Product grid on category page */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .12s, box-shadow .15s, border-color .15s;
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.product-card-image {
  background: #f8fafc;
  height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-card-body { padding: 18px; }
.product-card-shop {
  font-size: .72rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .3px;
}
.product-card-name {
  margin: 4px 0 8px;
  font-size: 1rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Other categories footer on category page */
.other-categories {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.other-categories h3 { margin: 0 0 16px; font-size: 1.1rem; color: var(--muted); }
.other-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.other-cat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  transition: border-color .15s;
}
.other-cat-card:hover { border-color: var(--primary); }
.other-cat-icon { font-size: 1.25rem; }

/* --- Auth / Forms ---------------------------------------------------- */
.auth { display: grid; place-items: center; padding: 24px 0; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px;
  width: 100%;
  max-width: 460px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 1.75rem; }
.auth-card .muted { color: var(--muted); margin: 0 0 24px; }
.small { font-size: .85rem; }

.form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: .9rem; font-weight: 600; color: var(--text); }
.field input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* --- Alerts ---------------------------------------------------------- */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: .95rem;
}
.alert ul { margin: 0; padding-left: 20px; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #fecaca; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #bbf7d0; }

/* --- Textarea & select ----------------------------------------------- */
.field textarea, .field select {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }

/* --- Input group (url + button on one line) ------------------------- */
.input-group { display: flex; gap: 8px; }
.input-group input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
}
.input-group input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* --- Message page ---------------------------------------------------- */
.message-body { margin-bottom: 20px; line-height: 1.6; color: var(--text); }
.message-body a { color: var(--primary); }

/* --- Admin page ------------------------------------------------------ */
.admin-page { padding: 8px 0; }
.admin-header { margin-bottom: 24px; }
.admin-header h1 { margin: 0 0 4px; }
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

/* Admin tab navigation */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 24px;
  width: fit-content;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  transition: background .12s, color .12s;
}
.admin-tab:hover { color: var(--text); background: var(--bg); }
.admin-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}
.admin-tab.active:hover { background: var(--primary-hover); color: #fff; }

/* --- User list ------------------------------------------------------- */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: box-shadow .12s, border-color .12s;
}
.user-row:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.user-row.self {
  background: linear-gradient(to right, #eff6ff 0%, var(--surface) 100%);
  border-color: #bfdbfe;
}
.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.user-info { min-width: 0; }
.user-name {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.user-email {
  font-size: .88rem;
  color: var(--muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  margin: 2px 0;
}
.user-meta { font-size: .75rem; color: var(--muted); }
.user-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.user-badge-admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.user-badge-self {
  background: var(--primary-soft);
  color: var(--primary-hover);
  border: 1px solid #bfdbfe;
}
.user-badge-unverified {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
}
.user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* --- User form ------------------------------------------------------- */
.admin-user-form {
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.field-row-checkboxes {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

@media (max-width: 640px) {
  .user-row { grid-template-columns: 44px 1fr; }
  .user-actions { grid-column: 2; }
  .admin-tabs { width: 100%; overflow-x: auto; }
}


.import-form .field { max-width: 820px; }

/* --- Import sections (URL + search) --------------------------------- */
.import-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.import-section h2 { margin: 0 0 4px; font-size: 1.15rem; }
.import-section p.small { margin: 0 0 16px; }

/* --- Search results -------------------------------------------------- */
.search-results {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.search-results h3 { margin: 0 0 16px; font-size: 1.1rem; }
.search-result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  align-items: center;
}
.search-result-thumb {
  width: 64px;
  height: 64px;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.provider-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
}
.provider-google {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.provider-ddg-lite {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.search-result:first-of-type { border-top: none; padding-top: 0; }
.search-result-info { min-width: 0; }
.search-result-host {
  font-size: .75rem;
  color: var(--muted);
  text-transform: lowercase;
  font-weight: 600;
}
.search-result-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin: 2px 0 4px;
  line-height: 1.3;
}
.search-result-title:hover { text-decoration: underline; }
.search-result-snippet {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-action { flex-shrink: 0; }

/* --- Preview section ------------------------------------------------- */
.preview-section {
  margin-top: 32px;
  padding: 24px;
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
}
.preview-section h2 { margin: 0 0 4px; }
.preview-section > p { margin: 0 0 16px; }
.inline-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.inline-link:hover { text-decoration: underline; }

/* --- Buttons row + small/danger variants ----------------------------- */
.btns-row { display: flex; gap: 12px; align-items: center; }
.btn-sm {
  padding: 6px 12px;
  font-size: .82rem;
  border-radius: 8px;
}
.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: #fecaca; }

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
  margin-top: 16px;
}
.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.preview-img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #f8fafc;
  display: block;
}
.preview-img-placeholder {
  height: 280px;
  display: grid; place-items: center;
  background: #f8fafc;
  color: var(--muted);
}
.preview-body { padding: 20px; }
.preview-shop {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  font-weight: 600;
}
.preview-name {
  font-size: 1.25rem;
  margin: 6px 0 12px;
  line-height: 1.3;
}
.preview-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.preview-desc {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
  margin: 0;
}

.preview-edit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

/* --- Product list (admin) ------------------------------------------- */
.products-list-section { margin-top: 48px; }
.products-list-section h2 { margin: 0 0 16px; }

/* Category filter pills above product list */
.cat-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .15s;
}
.cat-pill:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}
.cat-pill-count {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  font-size: .72rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}
.cat-pill.active .cat-pill-count {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}
.product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-row {
  display: grid;
  grid-template-columns: 28px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: box-shadow .15s, border-color .15s;
}
.product-select {
  display: grid;
  place-items: center;
}
.product-cb {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.product-row:hover { box-shadow: var(--shadow-sm); }
.product-row:has(.product-cb:checked) {
  background: #fef3c7;
  border-color: #fbbf24;
}
.product-row.editing {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.product-thumb {
  width: 60px; height: 60px;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
  display: grid; place-items: center;
}
.product-thumb img {
  width: 100%; height: 100%; object-fit: contain;
}
.product-shop {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.product-name { font-weight: 600; margin-top: 2px; }
.product-meta { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.product-price { font-weight: 700; color: var(--primary); white-space: nowrap; }
.product-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* --- Public product detail page -------------------------------------- */
.product-detail { padding: 0; }
.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--primary); }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.product-detail-image {
  background: #f8fafc;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 340px;
}
.product-detail-image img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
}
.no-image {
  color: var(--muted);
  font-size: .95rem;
  padding: 40px;
  text-align: center;
}
.product-detail-info { display: flex; flex-direction: column; }
.product-detail-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.product-detail-shop {
  background: var(--primary-soft);
  color: var(--primary-hover);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.product-detail-category {
  color: var(--muted);
  font-size: .85rem;
  text-transform: capitalize;
}
.product-detail-title {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--text);
}
.product-detail-price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1;
}
.product-detail-price .currency {
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 4px;
  color: var(--muted);
}
.product-detail-price-unknown {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 16px;
  font-style: italic;
}
.product-detail-desc {
  color: #334155;
  line-height: 1.65;
  margin-bottom: 20px;
}
.specs-heading {
  margin: 8px 0 12px;
  font-size: 1.05rem;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: .95rem;
  background: #f8fafc;
  border-radius: var(--radius);
  overflow: hidden;
}
.specs-table th, .specs-table td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.specs-table th {
  color: #475569;
  font-weight: 600;
  width: 42%;
  background: #f1f5f9;
}
.specs-table td {
  color: var(--text);
  font-weight: 500;
}
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: none; }
.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  margin-bottom: 20px;
}

/* --- Category candidates (bulk import) ------------------------------ */
.candidates-section {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 16px;
}
.candidates-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.candidates-header h3 { margin: 0; font-size: 1.1rem; }
.candidates-target {
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 12px 0;
}
.candidates-target select {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
}
.candidates-target select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.candidates-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
  margin: 12px 0 0;
}
.candidates-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.candidate-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.candidate-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.candidate-item:has(.candidate-cb:checked) {
  border-color: #86efac;
  background: #f0fdf4;
}
.candidate-cb {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
  cursor: pointer;
}
.candidate-thumb {
  width: 48px;
  height: 48px;
  background: #f8fafc;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.candidate-thumb img { width: 100%; height: 100%; object-fit: contain; }
.candidate-info { min-width: 0; flex: 1; }
.candidate-name {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.candidate-item.is-set {
  opacity: 0.7;
  background: #fff7ed;
}
.set-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #fed7aa;
  color: #9a3412;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .5px;
  vertical-align: middle;
}

/* --- Bulk-import summary --------------------------------------------- */
.bulk-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.summary-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
}
.summary-stat.summary-ok { border-color: #86efac; background: #f0fdf4; }
.summary-stat.summary-failed { border-color: #fca5a5; background: #fef2f2; }
.summary-stat.summary-skipped { border-color: #fde68a; background: #fffbeb; }
.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.stat-label {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 600;
}

/* --- Progress bar (bulk-import live page) --------------------------- */
.progress-container { margin: 24px 0 16px; }

/* Heartbeat dot on the progress page */
.heartbeat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 12px;
}
.heartbeat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: heartbeatPulse 2s ease-in-out infinite;
}
.heartbeat-ok .heartbeat-dot { background: #22c55e; }
.heartbeat-warn .heartbeat-dot { background: #f59e0b; }
.heartbeat-err .heartbeat-dot { background: #ef4444; animation: none; }
@keyframes heartbeatPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.3); }
}

/* Currently-processing URL indicator */
.current-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: .9rem;
}
.current-item code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--primary);
  word-break: break-all;
  flex: 1;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Import toast (bottom-right, on every admin page) -------------- */
.import-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
  z-index: 1000;
  overflow: hidden;
  animation: toastSlideIn .3s ease-out;
}
@keyframes toastSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.import-toast-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  font-size: .92rem;
}
.import-toast-header strong { flex: 1; font-weight: 700; }
.import-toast-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.import-toast-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: .8;
}
.import-toast-close:hover { opacity: 1; }
.import-toast-body { padding: 14px; }
.import-toast-link {
  display: block;
  color: var(--primary);
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  margin-bottom: 10px;
}
.import-toast-link:hover { text-decoration: underline; }
.import-toast-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.import-toast-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  transition: width .5s ease-out;
  border-radius: 4px;
}
.import-toast-stats {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 640px) {
  .import-toast { right: 12px; left: 12px; width: auto; bottom: 12px; }
}
.progress-bar {
  width: 100%;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
  transition: width .6s ease-out;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.25) 50%,
    rgba(255,255,255,0) 100%);
  animation: progressShine 2s infinite;
}
@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.progress-label {
  margin-top: 10px;
  font-weight: 600;
  color: var(--text);
}
.progress-label .muted { font-weight: 400; margin-left: 6px; }

/* Activity log in progress page */
.activity-log {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.activity-log li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: .9rem;
  animation: activitySlideIn .3s ease-out;
}
@keyframes activitySlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.activity-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: .75rem;
}
.activity-log .activity-ok .activity-icon { background: #dcfce7; color: #16a34a; }
.activity-log .activity-fail .activity-icon { background: #fee2e2; color: #dc2626; }
.activity-log .activity-fail .activity-text { color: var(--error); }
.activity-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
}
.bulk-details summary {
  cursor: pointer;
  font-size: .98rem;
  padding: 2px 0;
}
.bulk-details[open] summary { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

.bulk-success-list, .bulk-error-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 420px;
  overflow-y: auto;
}
.bulk-success-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.bulk-success-list li:last-child { border-bottom: none; }
.success-icon { color: var(--success); font-weight: 700; flex-shrink: 0; }
.success-name { flex: 1; font-weight: 500; }
.success-specs {
  font-size: .78rem;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.bulk-error-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.bulk-error-list li:last-child { border-bottom: none; }
.error-url {
  font-size: .78rem;
  color: var(--muted);
  word-break: break-all;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.error-msg { color: var(--error); font-size: .88rem; }

/* --- Spectrum image section ----------------------------------------- */
.spectrum-wrapper {
  background: #0f172a;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid var(--border);
}
.spectrum-img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}
.spectrum-fallback {
  color: #94a3b8;
  font-size: .9rem;
  padding: 24px;
}
.product-detail-cta { align-self: flex-start; margin-top: auto; }
.admin-inline-bar {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 820px) {
  .preview-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 28px 56px 1fr; }
  .product-price, .product-actions { grid-column: 3; }
  .search-result { grid-template-columns: 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .product-detail-title { font-size: 1.4rem; }
  .product-detail-price { font-size: 1.75rem; }
}

/* --- Footer ---------------------------------------------------------- */
.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 2rem; }
}
