/* ==========================================================================
   CANONICAL HERITAGE MARKET THEME
   Palette source: brand stripe supplied 2026-09-27.
   The layout remains contemporary; color, type, texture and details stay Chợ Xưa.
   ========================================================================== */

:root {
  --surface-soft: rgba(239, 225, 189, .58);
  --brand-strong: #6f291d;
  --market-awning-sage: #9bad91;
  --radius-xs: 3px;
  --radius-sm: 5px;
  --radius-lg: 10px;
  --shadow-sm: 2px 3px 0 rgba(76, 55, 31, .08);
  --shadow-md: 5px 7px 0 rgba(76, 55, 31, .12), 0 18px 40px rgba(50, 39, 26, .08);
  --market-rust-on-green: #bf563a;
  --market-stripe-on-paper: repeating-linear-gradient(
    135deg,
    #efe1bd 0 18px,
    #8f3826 18px 36px,
    #d2a33c 36px 54px,
    var(--market-awning-sage) 54px 72px,
    #f6f3ea 72px 90px
  );
  --market-stripe-on-green: repeating-linear-gradient(
    135deg,
    var(--market-rust-on-green) 0 18px,
    var(--market-gold) 18px 36px,
    var(--market-cream) 36px 54px,
    var(--market-parchment) 54px 72px,
    var(--market-rust-on-green) 72px 90px
  );
}

body {
  background-image:
    linear-gradient(rgba(71,55,38,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71,55,38,.009) 1px, transparent 1px);
  background-size: 32px 32px;
}

h1,
h2,
h3 {
  font-weight: 700;
}

/* ----- site chrome ----- */

body .site-header {
  width: min(var(--content), calc(100% - 48px));
  min-height: 84px;
  margin: 0 auto 14px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(246, 243, 234, .90);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.desktop-nav {
  gap: clamp(14px, 1.7vw, 24px);
}

.desktop-nav > a,
.category-menu > summary {
  padding: 10px 1px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #544b40;
  font-size: .8rem;
  font-weight: 720;
  letter-spacing: .01em;
}

.desktop-nav > a:hover,
.category-menu > summary:hover,
.category-menu[open] > summary {
  border-bottom-color: var(--market-gold);
  color: var(--market-red);
}

.category-dropdown {
  width: min(620px, calc(100vw - 40px));
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--market-cream);
  box-shadow: var(--shadow-md);
}

.category-dropdown::before {
  display: none;
}

.category-dropdown a {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .82rem;
}

.category-dropdown a:hover {
  color: var(--market-cream);
  background: var(--market-red);
}

.site-search {
  width: clamp(210px, 21vw, 290px);
  min-width: 180px;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--market-cream);
  box-shadow: var(--shadow-sm);
}

.site-search:focus-within {
  border-color: var(--market-red);
  box-shadow: 0 0 0 3px rgba(210,163,60,.20);
}

.site-search input {
  color: var(--ink);
  background: transparent;
}

.site-search button {
  min-width: 42px;
  min-height: 42px;
  border-radius: 0;
  color: var(--market-cream);
  background: var(--market-red);
}

.site-search button:hover {
  background: var(--brand-strong);
}

.mobile-menu summary {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--market-red);
  background: var(--market-cream);
  box-shadow: var(--shadow-sm);
}

.mobile-nav {
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--market-cream) !important;
  box-shadow: var(--shadow-md) !important;
}

/* ----- foundations ----- */

.button {
  min-height: 44px;
  padding-inline: 18px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 740;
  letter-spacing: .01em;
  box-shadow: var(--shadow-sm);
}

.button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 4px 0 rgba(76,55,31,.10);
}

.button-primary {
  color: var(--market-cream);
  background: var(--market-red);
}

.button-primary:hover {
  background: var(--brand-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--market-cream);
}

.button-secondary:hover {
  border-color: var(--market-red);
  background: #fff8e8;
}

.text-link {
  color: var(--market-red);
  text-decoration: none;
}

.text-link:hover {
  color: var(--brand-strong);
}

.kicker,
.eyebrow,
.product-meta {
  color: var(--market-red);
  font-weight: 760;
  letter-spacing: .12em;
}

.kicker::before,
.eyebrow::before {
  display: inline;
  margin-right: .6em;
  color: var(--market-gold);
  content: "✦";
  font-size: .72em;
}

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  color: var(--ink);
  font-size: var(--type-h2);
  line-height: 1.03;
  letter-spacing: -.03em;
}

/* ----- homepage: flagship Chợ Xưa facade ----- */

.home-cover {
  position: relative;
  margin-top: 24px;
  padding: clamp(48px, 5vw, 64px) clamp(30px, 5vw, 66px);
  overflow: visible;
  border: 1px solid #604b32;
  border-radius: 2px;
  color: var(--market-cream);
  background:
    radial-gradient(ellipse 48% 68% at 74% 46%, rgba(230,190,110,.18), transparent 80%),
    repeating-linear-gradient(0deg, rgba(245,229,191,.018) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #244b43, #21483f 62%, #1d4039);
  box-shadow: 11px 13px 0 rgba(67,47,27,.17);
}

/* The illustration already carries the market awning; keep the hero edge quiet. */

.home-cover::after {
  display: block;
  position: absolute;
  z-index: 0;
  inset: 15px;
  width: auto;
  height: auto;
  border: 1px solid rgba(239,225,189,.23);
  border-radius: 0;
  background: none;
  box-shadow: none;
  content: "";
  pointer-events: none;
}


.cover-label {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #e7c986;
  background: none;
  font-size: var(--type-label);
  font-weight: 780;
  letter-spacing: .16em;
}

.home-cover .cover-label { color: #e7c986; }

.cover-label::before {
  background: var(--market-gold);
  box-shadow: none;
}

.home-cover h1 {
  max-width: 720px;
  margin-top: 22px;
  color: var(--market-cream);
  font-family: var(--font-display);
  font-size: clamp(3.9rem, 6.1vw, 6.55rem);
  line-height: .9;
  letter-spacing: var(--tracking-title);
  text-shadow: none;
}

.home-cover h1 .home-hero-title-line {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
}

.home-cover h1 .home-hero-title-line--primary {
  color: #fff1cf;
}

.home-cover h1 .home-hero-title-line--accent {
  color: #e9ba57;
}

.home-cover h1 .home-hero-title-stop {
  color: currentColor;
  text-shadow: none;
}

.home-cover .hero-copy {
  max-width: 54ch;
  margin: 18px 0 0;
  color: #e4d9c3;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.64;
}

.home-hero-search {
  max-width: 690px;
}

.home-hero-action-label {
  color: #e7c986;
  font-size: var(--type-label);
  font-weight: 780;
  letter-spacing: .15em;
}

.home-hero-search-box {
  border: 1px solid rgba(239,225,189,.56);
  border-left: 4px solid var(--market-gold);
  border-radius: 2px;
  background: #f3e7cb;
  box-shadow: 4px 5px 0 rgba(20,31,27,.16);
}

.home-hero-search-box:focus-within {
  border-color: var(--market-gold);
  box-shadow: 0 0 0 3px rgba(210,163,60,.18), 4px 5px 0 rgba(20,31,27,.20);
}

.home-hero-search-box svg {
  color: var(--market-green);
}

.home-hero-search-box input {
  color: var(--ink);
}

.home-hero-search-box input::placeholder {
  color: #857b69;
}

.home-hero-search-box button {
  border-radius: 2px;
  color: var(--market-cream);
  background: var(--market-red);
}

.home-hero-search-box button:hover {
  background: var(--brand-strong);
}

.home-hero-links a {
  color: var(--market-gold);
}

.home-hero-links a:hover {
  color: var(--market-cream);
}

.home-hero-transparency {
  color: rgba(239,225,189,.78);
}

.home-trust {
  margin-top: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(246,243,234,.86);
  box-shadow: var(--shadow-sm);
}

.home-trust span {
  color: #5d5549;
  border-color: var(--line);
}

.home-trust span + span {
  border-left: 1px solid var(--line);
}

@media (max-width: 760px) {
  .home-trust span:nth-child(3) {
    border-left: 0;
  }

  .home-trust span:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }
}

.home-trust b {
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--market-red);
  background: var(--market-parchment);
}

.home-trust span:nth-child(2) b {
  color: var(--market-green);
}

.home-trust span:nth-child(3) b {
  color: #715316;
}

.home-trust span:nth-child(4) b {
  color: var(--market-red);
}

.category-card,
.guide-teaser,
.comparison-hub-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--market-cream);
  box-shadow: var(--shadow-sm);
}

.category-card {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.category-card:hover,
.guide-teaser:hover {
  transform: translate(-1px,-2px);
  border-color: var(--market-red);
  box-shadow: 4px 5px 0 rgba(76,55,31,.10);
}

.category-symbol {
  border: 1px solid rgba(36,75,67,.18);
  border-radius: 4px;
  color: var(--market-green);
  background: rgba(36,75,67,.08);
}

/* Category symbols share one restrained treatment; icon paths carry category meaning. */

.category-card h3 {
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: -.012em;
}

.category-card .coming-soon,
.category-arrow {
  color: var(--muted);
}

.featured-section::before,
.home-guides::before {
  background: rgba(246,243,234,.30);
}

.guide-teaser {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.guide-teaser > a {
  background:
    radial-gradient(ellipse at center, rgba(246,243,234,.92) 0 35%, transparent 72%),
    var(--market-parchment);
}

.guide-teaser img {
  mix-blend-mode: multiply;
}

.principles {
  border-top-color: var(--line);
}

.principle-list {
  border-top-color: var(--line-strong);
}

.principle-list article {
  border-bottom-color: var(--line);
}

.principle-list article > span {
  border-radius: 3px;
  color: var(--ink);
  background: var(--market-gold);
}

/* ----- inner-page hero materials ----- */

.page-hero,
.review-hero,
.search-heading {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--market-cream);
  box-shadow: none;
}

.page-hero::before,
.review-hero::before,
.search-heading::before,
.page-hero::after,
.review-hero::after {
  display: none;
}

.search-heading::after {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: var(--market-stripe-on-green);
  content: "";
}

.page-hero h1,
.review-hero h1,
.search-heading h1 {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: var(--tracking-title);
  margin: 0;
  font-size: var(--type-page-title);
  line-height: var(--leading-title);
}

.review-hero h1 {
  font-size: var(--type-product-title);
  text-wrap: balance;
}

.market-front-hero.product-directory-hero h1,
.market-front-hero.category-page-hero h1 {
  font-size: var(--type-catalog-title);
}

.page-hero .breadcrumb,
.page-hero .kicker,
.review-hero .kicker,
.review-breadcrumbs a,
.search-heading .eyebrow {
  position: relative;
  z-index: 1;
  color: var(--market-red);
}

.page-hero > p:last-of-type,
.review-lead,
.search-heading > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: var(--type-lead);
  line-height: var(--leading-body);
}

.page-hero .category-count,
.page-hero .pagination-status {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--market-parchment);
}

/* Inner entry pages keep their editorial rail; the homepage owns the full awning. */

.market-front-hero {
  overflow: visible;
  margin-top: 22px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: none;
  box-shadow: none;
}

.market-front-hero::before,
.market-front-hero::after {
  display: none;
}

.market-front-hero > * {
  position: relative;
  z-index: 1;
}

.market-front-hero .kicker,
.market-front-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 0;
  padding: 0 0 0 10px;
  border: 0;
  border-left: 2px solid var(--market-gold);
  border-radius: 0;
  color: var(--market-red);
  background: none;
  font-size: var(--type-label);
  font-weight: 780;
  letter-spacing: .13em;
}

.market-front-hero .breadcrumb {
  color: var(--muted);
}

.market-front-hero h1 {
  text-shadow: none;
}

.market-front-hero > p:last-of-type {
  color: var(--muted);
}

.search-heading.market-front-hero {
  overflow: hidden;
  border: 1px solid #604b32;
  border-radius: 2px;
  color: var(--market-cream);
  background: var(--market-green);
}

.search-heading.market-front-hero::after {
  display: block;
}

.search-heading.market-front-hero .eyebrow,
.search-heading.market-front-hero h1 {
  color: var(--market-cream);
}

.search-heading.market-front-hero > p:not(.eyebrow) {
  color: rgba(246,243,234,.84);
}

.methodology-hero,
.policy-hero,
.comparison-hub-hero {
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.review-hero {
  background: var(--market-cream);
  box-shadow: none;
}

/* ----- unified product cards ----- */

.catalog-product-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--market-cream);
  box-shadow: var(--shadow-sm);
}

.catalog-product-card:hover {
  transform: translate(-1px,-2px);
  border-color: var(--market-red);
  box-shadow: 4px 5px 0 rgba(76,55,31,.10);
}

.catalog-product-visual {
  background: #fff;
}

/* On narrow listing cards the square white photo sits centered in a paper-colored rail. */
@media (max-width: 640px) {
  .catalog-product-visual {
    background: var(--paper);
  }
}

.catalog-product-eyebrow {
  color: var(--market-red);
}

.catalog-product-eyebrow a {
  color: var(--muted);
}

.catalog-product-eyebrow a::before {
  color: var(--market-gold);
}

.catalog-product-title {
  font-family: var(--font-display);
}

.catalog-product-title a {
  color: var(--ink);
}

.catalog-product-title a:hover,
.catalog-product-review-link {
  color: var(--market-red);
}

.catalog-product-review-link:hover {
  color: var(--brand-strong);
}

.catalog-product-model{
  border: 1px solid rgba(36,75,67,.20);
  border-radius: 3px;
  color: var(--market-green);
  background: rgba(36,75,67,.07);
}

.catalog-product-description {
  color: var(--muted);
}

.catalog-product-card .commercial-price-compact {
  border-top-color: var(--line);
  color: var(--muted);
}

/* ----- popular products: same market language, compact ranking ----- */

.top-click-card {
  border-color: var(--line-strong);
  border-radius: var(--radius);
  background: var(--market-cream);
  box-shadow: var(--shadow-sm);
}

.top-click-card:hover {
  border-color: var(--market-red);
  box-shadow: 4px 5px 0 rgba(76,55,31,.10);
}

.top-click-visual {
  background: #fff;
}

.popular-rank {
  border: 1px solid rgba(210,163,60,.34);
  border-radius: 3px;
  color: var(--ink);
  background: rgba(210,163,60,.22);
}

.top-click-body .product-meta {
  color: var(--market-red);
}

.top-click-body h3 {
  font-family: var(--font-display);
}

.top-click-actions a {
  color: var(--market-red);
}

.top-click-price {
  border-radius: 3px;
  color: var(--market-cream) !important;
  background: var(--market-red);
}

.top-click-price:hover {
  background: var(--brand-strong);
}

.top-clicks-live {
  border-color: var(--line-strong);
  border-radius: 4px;
  color: var(--market-green);
  background: rgba(246,243,234,.68);
}

.popular-products-empty {
  border-color: var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(246,243,234,.58);
}

/* ----- product detail ----- */

.review-product-visual {
  border: 1px solid rgba(239,225,189,.45);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 4px 5px 0 rgba(20,31,27,.22);
}

.review-product-visual img {
  background: #fff;
}

.review-product-visual figcaption {
  border-top-color: var(--line);
  color: var(--muted);
  background: var(--market-cream);
}

.review-hero-meta span,
.review-hero-meta a {
  border-color: var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(36,75,67,.045);
}

.review-hero-meta strong {
  color: var(--market-green);
}

.review-hero-meta a:hover {
  border-color: var(--market-gold);
  color: var(--market-red);
  background: rgba(210,163,60,.10);
}

.review-actions .commercial-price {
  color: var(--muted);
}

.review-hero .review-actions .commercial-merchant {
  color: var(--market-green);
}

.review-hero .review-actions .commercial-price-note {
  color: var(--ink);
}

.review-hero .review-actions .commercial-freshness,
.review-hero .review-hero-commerce .disclosure {
  color: var(--muted);
}

.review-jump-nav {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(246,243,234,.70);
  box-shadow: var(--shadow-sm);
}

.review-jump-nav > span {
  color: var(--muted);
}

.review-jump-nav a {
  border-radius: 3px;
  color: #5b5247;
}

.review-jump-nav a:hover {
  color: var(--market-red);
  background: var(--market-parchment);
}

.verdict-section {
  border-color: rgba(143,56,38,.24) !important;
  border-radius: var(--radius) !important;
  background: rgba(246,243,234,.78) !important;
}

.verdict-section::before {
  background: var(--market-red);
}

.verdict-section .kicker {
  color: var(--market-red);
}

.decision-card {
  border-color: rgba(36,75,67,.20);
  border-radius: var(--radius);
  background: rgba(36,75,67,.055);
}

.decision-card-skip {
  border-color: rgba(143,56,38,.18);
  background: rgba(143,56,38,.045);
}

.spec-item,
.tradeoff-grid section,
.related-comparison,
.review-aside {
  border-color: var(--line);
  border-radius: var(--radius);
  background: rgba(246,243,234,.70);
}

.tradeoff-grid section:first-child {
  border-top-color: var(--market-green);
}

.tradeoff-grid section:last-child {
  border-top-color: var(--market-red);
}

.editorial-note {
  border-left-color: var(--market-red) !important;
  background: rgba(210,163,60,.09) !important;
}

.faq-list details,
.faq-list details:first-child {
  border-color: var(--line);
}

.source-list a {
  color: var(--market-red);
}

/* ----- footer: full-width market stall sign ----- */

.site-footer {
  color: rgba(239,225,189,.82);
  background: var(--market-green);
}
.site-footer p,
.site-footer a {
  color: rgba(239,225,189,.80);
}

.site-footer .footer-nav a,
.site-footer .footer-category-nav a {
  text-decoration: none;
}

.site-footer a:hover,
.site-footer-bottom a {
  color: var(--market-gold);
}

.site-footer-bottom {
  border-top-color: rgba(239,225,189,.18);
  color: rgba(239,225,189,.62);
}

/* ----- responsive heritage refinements ----- */

@media (max-width: 640px) {
  body .site-header {
    width: 100%;
    margin-bottom: 8px;
    padding: 10px 15px;
    background: rgba(246,243,234,.94);
  }

  .home-cover,
  .search-heading {
    border-radius: 7px;
  }

  .home-cover {
    min-height: 0;
    padding: 42px 22px 34px;
    border-radius: 2px;
  }

  .home-cover h1 {
    font-size: var(--type-display);
  }

  .home-cover .hero-copy {
    margin-top: 17px;
  }

  .home-trust {
    border-radius: 5px;
  }

  .catalog-product-card {
    border-radius: 5px;
  }

  .review-jump-nav {
    border-radius: 5px;
  }
}
