:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-soft: #f6f8fc;
  --line: #dbe2ec;
  --line-strong: #c3cfdd;
  --text: #0f172a;
  --muted: #5f6b7f;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #d7f2eb;
  --warning: #b45309;
  --highlight: #ea580c;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.05);
  --result-card-min: 182px;
  font-family: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.08), transparent 22%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 28%, #eef2f7 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(195, 207, 221, 0.7);
}

.header-inner,
.page-shell {
  width: min(1360px, calc(100% - 28px));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-areas:
    "brand search"
    "brand market"
    "brand subtoggle";
  gap: 18px;
  align-items: center;
  padding: 14px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-area: brand;
}

.brand-mark {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  isolation: isolate;
  color: white;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-layer,
.brand-glyph {
  position: absolute;
}

.brand-layer {
  inset: 0;
  border-radius: 14px;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14);
}

.brand-layer-back {
  transform: rotate(-10deg) translate(-3px, 2px);
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.brand-layer-front {
  transform: rotate(8deg) translate(3px, -2px);
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.brand-glyph {
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  text-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.brand-lockup h1,
.panel-heading h3,
.sidebar-header h3 {
  margin: 0;
}

.brand-lockup h1 {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  grid-area: search;
}

.search-subtoggle {
  grid-area: subtoggle;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.market-select {
  grid-area: market;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.market-select select {
  min-height: 42px;
  min-width: 260px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.search-subtoggle input {
  accent-color: var(--accent);
}

.searchbar input,
.searchbar button,
.ghost-button,
.sidebar-card,
.result-item,
.action-button,
.filter-group label,
.category-link,
.checkbox-line,
.toolbar-controls select {
  border-radius: 8px;
}

.searchbar input,
.toolbar-controls select {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.source-switcher {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.source-switcher-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.source-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.source-toggle input {
  accent-color: var(--accent);
}

.searchbar button,
.action-button.primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent), #0891b2);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

.searchbar button {
  min-height: 48px;
  padding: 0 18px;
}

.searchbar button[disabled] {
  opacity: 0.72;
  cursor: progress;
}

.ghost-button,
.action-button.secondary,
.sidebar-header button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.ghost-button.strong {
  background: linear-gradient(180deg, #ffffff, #edf6ff);
}

.page-shell {
  padding: 18px 0 30px;
}

.home-shell {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
}

.hero-panel,
.home-collection,
.highlight-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  padding: 22px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.1), transparent 24%),
    rgba(255, 255, 255, 0.9);
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 10px;
}

.idea-chip {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #ecfbf5);
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.idea-chip.is-active {
  background: linear-gradient(135deg, var(--accent), #0891b2);
  color: white;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.22);
}

.home-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.highlight-card {
  padding: 18px;
  border-radius: 16px;
}

.highlight-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.highlight-card strong {
  display: block;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.highlight-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 600;
}

.home-collections {
  display: grid;
  gap: 14px;
}

.home-coupons,
.home-collection {
  padding: 14px;
  border-radius: 16px;
}

.home-coupons {
  background:
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.14), transparent 26%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.1), transparent 24%),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(234, 88, 12, 0.16);
  box-shadow: var(--shadow);
}

.home-coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.coupon-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(234, 88, 12, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.92));
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.12);
}

.coupon-card-kicker {
  margin: 0;
  color: var(--highlight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 900;
}

.coupon-card h4 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.coupon-card-title,
.coupon-card-meta {
  margin: 0;
}

.coupon-card-title {
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
}

.coupon-card-meta {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.coupon-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.home-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.controls-strip,
.category-strip,
.sidebar-card,
.results-section,
.result-item {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.controls-strip {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

#data-source {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.14), rgba(56, 189, 248, 0.12));
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
}

.status-strip {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: #fff8e8;
  border: 1px solid #edd8a5;
  border-radius: 8px;
  color: #7c5a14;
}

.status-strip p {
  margin: 0;
  font-weight: 600;
  line-height: 1.45;
}

.status-strip.loading {
  background: #e9f6f3;
  border-color: #b8e4d9;
  color: var(--accent-strong);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.58);
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 5px solid rgba(15, 118, 110, 0.15);
  border-top-color: var(--accent);
  border-right-color: #38bdf8;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

[hidden] {
  display: none !important;
}

.category-strip {
  padding: 14px 16px;
  margin-bottom: 12px;
}

.panel-heading,
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading.compact {
  margin-bottom: 10px;
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.category-ribbon {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.subcategory-ribbon {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.category-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.category-ribbon .category-link {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  border-radius: 999px;
}

.category-link.active {
  background: linear-gradient(180deg, #ecfdf5, #dff7f0);
  border-color: rgba(15, 118, 110, 0.22);
  color: var(--accent-strong);
}

.subcategory-ribbon .category-link {
  font-weight: 700;
  background: linear-gradient(180deg, #fffdf8, #f8fafc);
}

.controls-strip {
  margin-bottom: 12px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  color: var(--text);
  font-weight: 600;
}

.checkbox-line input,
.filter-group input {
  accent-color: var(--accent);
}

.toolbar-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.zoom-control {
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  box-shadow: var(--shadow-soft);
}

.zoom-control input[type="range"] {
  width: 132px;
  accent-color: var(--accent);
}

.zoom-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.zoom-icon svg {
  width: 100%;
  height: 100%;
}

.results-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-card {
  padding: 14px 16px;
  width: 100%;
}

.filters-row {
  animation: filter-drop 160ms ease;
}

@keyframes filter-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar-header {
  margin-bottom: 12px;
}

.sidebar-header button {
  min-height: 34px;
  padding: 0 12px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.filter-group {
  padding-top: 0;
  border-top: 0;
}

.filter-group h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.filter-group label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  margin-top: 6px;
  background: linear-gradient(180deg, #ffffff, #f6f8fc);
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
}

.results-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.results-section {
  padding: 14px;
}

.panel-heading {
  margin-bottom: 12px;
}

.results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--result-card-min), 1fr));
  gap: 10px;
}

.result-item {
  display: flex;
  flex-direction: column;
  padding: 8px;
  min-width: 0;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.result-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  border-color: rgba(15, 118, 110, 0.18);
}

.result-thumb-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #eee7de;
  aspect-ratio: 1 / 1;
}

.result-thumb-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.58) 100%);
  pointer-events: none;
}

.result-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-thumb-wrap img.is-fallback,
.detail-media img.is-fallback {
  object-fit: contain;
  padding: 18px;
  background: linear-gradient(180deg, #f4fbf9, #eef7ff);
}

.result-count-pill {
  position: absolute;
  left: 8px;
  top: 8px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(8, 145, 178, 0.92));
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.28);
  z-index: 1;
}

.result-marketplace-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
  z-index: 1;
}

.result-marketplace-badge.is-aliexpress {
  background: linear-gradient(135deg, #ea580c, #fb923c);
}

.result-marketplace-badge.is-ebay {
  background: linear-gradient(135deg, #2563eb, #dc2626);
}

.result-marketplace-badge.is-amazon {
  background: linear-gradient(135deg, #111827, #f59e0b);
}

.result-price-overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 10px 14px 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.95));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
  z-index: 1;
}

.result-price-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-price-values {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.result-price-current {
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.result-original-price {
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  white-space: nowrap;
}

.result-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 4px 0;
}

.result-topline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.result-category,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
}

.result-category {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-strong);
}

.result-sponsored-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.12);
  color: var(--highlight);
  font-size: 0.64rem;
  font-weight: 800;
}

.result-seller-badge {
  display: none;
}

.result-title {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag {
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  color: var(--text);
  border: 1px solid var(--line);
}

.result-secondary-price {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-coupon {
  margin: 0;
  color: var(--highlight);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.35;
}

.result-timing,
.result-price {
  display: none;
}

.result-actions {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 255, 0.92));
  text-align: center;
}

.empty-state h4 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.results-footer {
  display: flex;
  justify-content: center;
  padding-top: 14px;
}

.results-footer[hidden] {
  display: none;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 17, 13, 0.56);
  backdrop-filter: blur(4px);
}

.detail-sheet {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(18px);
}

.detail-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
}

.detail-media {
  border-radius: 10px;
  background: #eee7de;
}

.detail-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
  padding: 10px 0 0;
}

.detail-thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.detail-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.detail-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-category {
  margin: 4px 0 8px;
  color: var(--accent-strong);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.detail-content h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.12;
}

.detail-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.detail-coupon {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(234, 88, 12, 0.18);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.94), rgba(255, 255, 255, 0.96));
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.1);
}

.detail-coupon-kicker {
  margin: 0 0 8px;
  color: var(--highlight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 900;
}

.detail-coupon strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.2;
}

.detail-coupon p:last-of-type {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.detail-coupon-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-strong);
  font-weight: 800;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-facts div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6f8fc);
}

.detail-facts div:first-child {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(56, 189, 248, 0.12));
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
}

.detail-facts div:first-child dd {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-strong);
  letter-spacing: -0.03em;
}

.detail-facts dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-facts dd {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.action-button {
  min-height: 30px;
  width: 100%;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.action-link.is-disabled,
.action-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.52;
}

.site-footer {
  margin-top: 24px;
  border-top: 1px solid rgba(195, 207, 221, 0.7);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.footer-inner,
.legal-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 0 24px;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--accent-strong);
  font-weight: 800;
}

.legal-shell {
  padding: 40px 0 56px;
}

.legal-page {
  padding: 28px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.legal-page h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.legal-page h2 {
  margin: 24px 0 10px;
  font-size: 1.1rem;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.7;
}

.legal-page ul {
  padding-left: 20px;
}

@media (max-width: 1240px) {
  .hero-panel,
  .home-highlights {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "search"
      "market"
      "subtoggle";
  }

  .controls-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .market-select {
    justify-content: flex-start;
  }

  .market-select select {
    min-width: 0;
    width: 100%;
  }

  .home-card-row {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 780px) {
  .page-shell,
  .header-inner,
  .footer-inner,
  .legal-shell {
    width: min(100% - 20px, 1360px);
  }

}

@media (max-width: 560px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-controls,
  .result-actions,
  .coupon-card-actions {
    flex-direction: column;
    width: 100%;
  }

  .toolbar-controls label {
    width: 100%;
    justify-content: space-between;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .zoom-control {
    width: 100%;
    justify-content: space-between;
  }

  .legal-page {
    padding: 22px 18px;
  }
}

.editorial-page {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 22%),
    #f5f7fb;
}

.editorial-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.editorial-nav a {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.editorial-main {
  display: grid;
  gap: 1.4rem;
}

.editorial-hero,
.editorial-section,
.editorial-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 30px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

.editorial-hero {
  padding: 2rem;
}

.editorial-breadcrumbs {
  margin: 0 0 0.7rem;
  color: #475569;
  font-size: 0.92rem;
}

.editorial-breadcrumbs a {
  color: #0f766e;
  text-decoration: none;
}

.editorial-kicker {
  margin: 0 0 0.85rem;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editorial-hero h1 {
  margin: 0;
  max-width: 14ch;
  color: #0f172a;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 0.94;
}

.editorial-summary {
  margin: 1rem 0 0;
  max-width: 74ch;
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.75;
}

.editorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.editorial-market-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.editorial-market-pills span {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 0.86rem;
  font-weight: 700;
}

.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 1.2rem;
  align-items: start;
}

.editorial-stack {
  display: grid;
  gap: 1.2rem;
}

.editorial-section {
  padding: 1.45rem 1.5rem;
}

.editorial-section h2,
.editorial-card h3 {
  margin: 0 0 0.9rem;
  color: #0f172a;
  font-size: 1.15rem;
}

.editorial-section p,
.editorial-card p,
.editorial-link-list a,
.editorial-faq li {
  color: #475569;
  line-height: 1.72;
}

.editorial-list,
.editorial-faq,
.editorial-link-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding-left: 1.1rem;
}

.editorial-list li::marker,
.editorial-faq li::marker {
  color: #0f766e;
}

.editorial-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.editorial-card {
  padding: 1.2rem;
}

.editorial-card-kicker {
  margin: 0 0 0.45rem;
  color: #0f766e;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editorial-quick-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.9rem;
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.editorial-quick-link:hover,
.editorial-link-list a:hover,
.editorial-nav a:hover,
.editorial-breadcrumbs a:hover {
  color: #0f172a;
}

.editorial-rail {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 1.2rem;
}

.editorial-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.editorial-hub-grid .editorial-card h3 {
  margin-bottom: 0.55rem;
}

.editorial-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.editorial-chip-row span {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .editorial-layout {
    grid-template-columns: 1fr;
  }

  .editorial-rail {
    position: static;
  }

  .editorial-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .editorial-hero,
  .editorial-section,
  .editorial-card {
    border-radius: 24px;
  }

  .editorial-hero {
    padding: 1.4rem;
  }

  .editorial-section,
  .editorial-card {
    padding: 1.15rem;
  }

  .editorial-card-grid,
  .editorial-hub-grid {
    grid-template-columns: 1fr;
  }

  .editorial-nav {
    width: 100%;
    justify-content: flex-start;
  }
}
