/* Presentation foundation
   Purpose: provide shared pre-theme layout/presentation defaults that are not yet
   owned by a more specific stylesheet. Canonical Chợ Xưa styling lives in
   heritage-theme.css; inner-pages.css, commerce-components.css and reading-system.css
   own their respective presentation domains. This file loads before those owners. */

body {
  background: var(--paper);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 760;
  letter-spacing: -.035em;
}

p { text-wrap: pretty; }

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

.desktop-nav > a:hover,
.category-menu > summary:hover,
.category-menu[open] > summary {
  border: 0;
}

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

.button {
  border: 1px solid transparent;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.text-link {
  font-weight: 720;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.kicker,
.eyebrow,
.product-meta,
.cover-label {
  color: var(--brand);
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .1em;
}

.section-heading h2 {
  max-width: 780px;
}

/* ----- homepage ----- */

.home-cover {
  max-width: none;
}

.home-cover h1 {
  margin: 0;
}

.home-cover .hero-copy {
  margin-top: 26px;
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  line-height: 1.65;
}

.cover-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
}

.cover-proof span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.cover-proof strong {
  font-size: .9rem;
}

.home-cover .disclosure {
  max-width: 630px;
  margin-top: 15px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.55;
}

.home-trust {
  gap: 0;
  margin: 0;
}

.home-trust span {
  min-height: 48px;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
  font-size: .78rem;
}

.home-trust span:last-child { border-right: 0; }

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

.category-card {
  min-height: 168px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(36,75,67,.28);
  box-shadow: var(--shadow-sm);
}

.category-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
}

.category-symbol svg {
  width: 20px;
  height: 20px;
}

.category-card h3 {
  margin: 30px 42px 8px 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.category-card .coming-soon {
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 680;
  letter-spacing: 0;
  text-transform: none;
}

.category-arrow {
  top: 20px;
  right: 20px;
  color: rgba(113,104,91,.62);
  font-size: 1rem;
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

.guide-teaser,
.comparison-hub-card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.guide-teaser:hover{
  transform: translateY(-2px);
  border-color: rgba(36,75,67,.28);
  box-shadow: var(--shadow-sm);
}

.home-guides-grid {
  gap: 14px;
}

.guide-teaser {
  overflow: hidden;
}

.guide-teaser img {
  background: var(--surface-soft);
}

.principles {
  gap: clamp(38px, 7vw, 88px);
  padding: 86px 0 104px;
  border-top: 1px solid var(--line);
}

/* ----- listing-page hero presentation is owned by heritage-theme.css ----- */

.product-directory-categories {
  gap: 8px;
  padding-top: 18px;
}


body .product-directory-grid,
body .visual-product-grid,
.search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-directory-section,
.product-catalog-section {
  padding-top: 42px;
}

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

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

.review-product-visual {
  overflow: hidden;
}

.review-product-visual img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.review-hero .review-actions .button-primary {
  color: #fff;
  background: var(--brand);
}

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

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

.review-layout {
  padding: 68px 0 104px;
}

.review-content > section + section,
.review-content > section + .tradeoff-grid,
.tradeoff-grid + section {
  margin-top: 40px;
}

.verdict-section,
.decision-card,
.review-aside,
.review-content > section,
.tradeoff-grid section,
.spec-item,
.related-comparison {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.verdict-section {
  max-width: none;
}

.verdict-section::before {
  width: 4px;
}

.verdict-body {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.7;
}

.review-aside {
  align-self: start;
  position: sticky;
  top: 20px;
}

/* ----- footer ----- */

.site-footer {
  width: 100%;
  margin: 60px 0 0;
  padding: 0 max(24px, calc((100% - var(--content))/2)) 34px;
}

.site-footer-top {
  max-width: var(--content);
  margin-inline: auto;
  padding-top: 30px;
}

.site-footer h2 {
  color: #fff;
}

.site-footer p,
.site-footer a {
  color: rgba(255,255,255,.68);
}

.site-footer a:hover { color: #fff; }

.site-footer-bottom {
  max-width: var(--content);
  margin-inline: auto;
}

/* ----- responsive ----- */

@media (max-width: 1100px) {
  .home-categories .category-grid,
  .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .product-directory-grid,
  body .visual-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .home-trust span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-trust span:nth-last-child(-n+2) { border-bottom: 0; }

  .home-categories .category-grid,
  .home-product-grid,
  body .product-directory-grid,
  body .visual-product-grid,
  .search-grid {
    grid-template-columns: 1fr;
  }

  .category-card { min-height: 150px; }

  .site-footer {
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}

/* ----- homepage search-first structure ----- */

.home-hero-search {
  margin-top: 14px;
}

.home-hero-search-box {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 7px 7px 7px 18px;
}

.home-hero-search-box svg {
  width: 22px;
  height: 22px;
}

.home-hero-search-box input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
}

.home-hero-search-box button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: .86rem;
  font-weight: 760;
  white-space: nowrap;
}

.home-search-hint {
  margin: 9px 4px 0;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.45;
}

.home-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 18px;
}

.home-hero-links a {
  font-size: .82rem;
  font-weight: 720;
  text-decoration: none;
}

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

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

@media (max-width: 640px) {
  .home-hero-search {
    margin-top: 12px;
  }

  .home-hero-search-box {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 12px 12px;
  }

  .home-hero-search-box svg {
    width: 20px;
    height: 20px;
  }

  .home-hero-search-box input {
    padding: 10px 0;
    font-size: 16px;
  }

  .home-hero-search-box button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }

  .home-hero-links {
    gap: 8px 18px;
    margin-top: 16px;
  }

  .home-hero-links a {
    font-size: .8rem;
  }
}

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

.product-directory-hero,
.category-page-hero {
  padding: clamp(var(--space-6), 3.6vw, var(--space-7));
}

.category-comparison-strip {
  box-shadow: none;
}

.category-comparison-strip h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.08;
}

.catalog-product-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.catalog-product-visual {
  display: grid;
  overflow: hidden;
  aspect-ratio: var(--product-image-ratio);
  background: #fff;
}

.catalog-product-visual img {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 0;
  height: 100%;
  background: #fff;
  object-fit: cover;
  transition: transform .18s ease;
}

.catalog-product-card:hover .catalog-product-visual img {
  transform: scale(1.018);
}

.catalog-product-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.catalog-product-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 760;
  text-transform: uppercase;
}

.catalog-product-eyebrow a {
  font-weight: 620;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
}

.catalog-product-eyebrow a::before {
  content: "·";
}

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

.catalog-product-title {
  margin: 10px 0 0;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -.018em;
}

.catalog-product-title a {
  display: -webkit-box;
  overflow: hidden;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.catalog-product-model {
  display: inline-flex;
  align-self: flex-start;
  margin: 8px 0 0;
  line-height: 1.2;
}

.catalog-product-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 11px 0 0;
  font-size: .8rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.catalog-product-actions {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.catalog-product-review-link {
  display: inline-flex;
  gap: 5px;
  white-space: nowrap;
}

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

.catalog-product-price {
  padding-inline: 13px;
  text-align: center;
  white-space: normal;
}

@media (min-width: 1101px) {
  body .product-directory-grid,
  body .visual-product-grid,
  .search-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  body .product-directory-grid,
  body .visual-product-grid,
  .search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) and (min-width: 641px) {
  body .product-directory-grid,
  body .visual-product-grid,
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product-directory-hero,
  .category-page-hero {
    padding: 32px 22px;
  }
}

@media (max-width: 640px) {
  .catalog-product-card {
    display: grid;
    grid-template-columns: minmax(118px, 34%) minmax(0, 1fr);
    align-items: stretch;
  }

  .catalog-product-visual {
    align-self: start;
    width: 100%;
    min-height: 0;
    aspect-ratio: var(--product-image-ratio);
  }

  .catalog-product-visual img {
    height: auto;
    aspect-ratio: var(--product-image-ratio);
  }

  .catalog-product-body {
    padding: 15px 14px;
  }

  .catalog-product-title {
    margin-top: 7px;
    font-size: .98rem;
  }

  .catalog-product-title a {
    -webkit-line-clamp: 2;
  }

  .catalog-product-description {
    margin-top: 8px;
    font-size: .76rem;
    -webkit-line-clamp: 2;
  }

  .catalog-product-actions {
    flex-direction: column;
  }

  .catalog-product-price {
    width: 100%;
  }

  }

/* ----- unified search results ----- */

.search-page-form {
  max-width: 760px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--market-cream);
  box-shadow: var(--shadow-sm);
}

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

.search-page-form input {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 1rem;
}

.search-page-form input::placeholder {
  color: var(--muted);
}

.search-page-form .button {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.search-examples {
  color: var(--muted);
  font-size: .76rem;
}

.search-examples button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #5f5548;
  background: rgba(255,255,255,.72);
  font: inherit;
  cursor: pointer;
}

.search-examples button:hover {
  border-color: rgba(36,75,67,.3);
  color: var(--brand);
  background: #efe1bd;
}

.search-results-head {
  border-bottom: 1px solid var(--line);
}

.search-results-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--type-reading-title);
  letter-spacing: -.025em;
}

.search-results-head span {
  color: var(--muted);
  font-size: .82rem;
}

.search-empty,
.search-start-hint {
  border: 1px dashed var(--line-strong);
  line-height: 1.6;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(246,243,234,.64);
}

/* ----- product detail editorial hierarchy ----- */

.review-hero {
  padding: clamp(40px, 5vw, 60px);
}

.review-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: .76rem;
}

.review-breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.review-breadcrumbs a + a::before {
  margin-right: 16px;
  color: rgba(113,104,91,.52);
  content: "/";
}

.review-breadcrumbs a:hover {
  color: var(--brand);
}

.review-hero-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .75fr);
  align-items: center;
}

.review-hero-commerce {
  min-width: 0;
}

.review-hero h1 {
  max-width: 800px;
  font-size: var(--type-page-title);
  line-height: .98;
  letter-spacing: var(--tracking-title);
}

.review-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.review-hero-meta span,
.review-hero-meta a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  font-size: .7rem;
  line-height: 1.2;
  text-decoration: none;
}

.review-hero-meta strong {
  margin-left: 4px;
  font-weight: 720;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 26px;
}

.review-actions .button-primary {
  padding-inline: 22px;
}

.review-actions .commercial-price {
  margin: 0;
  padding: 3px 0 0;
  color: var(--muted);
  background: transparent;
}

.review-actions .commercial-price-note {
  display: block;
}

.review-actions .commercial-freshness {
  display: block;
  margin-top: 3px;
}

.review-product-visual {
  align-self: stretch;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
}

.review-product-visual img {
  min-height: 330px;
}

.review-product-visual figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.review-jump-nav {
  display: flex;
  overflow-x: auto;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  scrollbar-width: none;
}

.review-jump-nav::-webkit-scrollbar {
  display: none;
}

.review-jump-nav > span {
  flex: 0 0 auto;
  padding: 0 8px;
  font-size: var(--type-label);
  font-weight: 720;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.review-jump-nav a {
  flex: 0 0 auto;
  padding: 8px 11px;
  font-size: .74rem;
  font-weight: 680;
  text-decoration: none;
}

.review-layout {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(42px, 6vw, 76px);
  padding-top: 54px;
}

.review-content > section,
.review-content > .tradeoff-grid {
  scroll-margin-top: 24px;
}

.review-content > section {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.review-content > section + section,
.review-content > section + .tradeoff-grid,
.review-content > .tradeoff-grid + section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.verdict-section {
  position: relative;
  padding: clamp(28px, 4vw, 40px) !important;
  border: 1px solid rgba(36,75,67,.16) !important;
}

.verdict-section::before {
  top: 28px;
  bottom: 28px;
  left: 0;
  border-radius: 0 4px 4px 0;
}

.verdict-section h2 {
  max-width: 760px;
  font-size: var(--type-reading-title);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.decision-section > .kicker,
.verified-specs > .kicker,
.faq-section > .kicker,
.source-section > .kicker {
  margin-bottom: 18px;
}

.decision-grid {
  gap: 12px;
}

.decision-card {
  min-height: 100%;
  padding: 24px;
}

.decision-card h3 {
  margin-top: 0;
  font-size: 1.06rem;
}

.decision-card ul,
.tradeoff-grid ul {
  margin-bottom: 0;
  padding-left: 1.15rem;
}

.decision-card li,
.tradeoff-grid li {
  color: var(--muted);
  line-height: 1.6;
}

.decision-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
}

.decision-cta span {
  color: var(--muted);
  font-size: .72rem;
}

.spec-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}

.spec-item {
  padding: 17px 18px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
}

.spec-item span {
  color: var(--muted);
  font-size: .7rem;
}

.spec-item strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: .98rem;
  line-height: 1.35;
}

.spec-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.45;
}

.tradeoff-grid {
  gap: 12px;
}

.tradeoff-grid section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tradeoff-grid section:first-child {
  border-top: 3px solid rgba(36,75,67,.48);
}

.tradeoff-grid section:last-child {
  border-top: 3px solid rgba(173,119,72,.42);
}

.tradeoff-grid h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.editorial-note {
  padding: 24px !important;
  border: 0 !important;
  border-left: 4px solid var(--brand) !important;
  border-radius: 0 12px 12px 0 !important;
}

.editorial-note p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: #5f5548;
  font-size: 1rem;
  line-height: 1.7;
}

.related-comparison {
  padding: 26px !important;
}

.faq-list details:first-child {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  cursor: pointer;
}

.source-intro {
  line-height: 1.65;
}

.source-list {
  margin-top: 18px;
  padding-left: 1.25rem;
}

.source-list a {
  text-underline-offset: 3px;
}

.review-aside {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.review-aside-cta {
  width: 100%;
  margin: 0 0 20px;
}

.review-aside dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.review-aside dt {
  margin-top: 13px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 680;
}

.review-aside dt:first-of-type {
  margin-top: 0;
}

.review-aside dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: .83rem;
  line-height: 1.4;
}

.review-aside .text-link {
  display: inline-block;
  margin-top: 18px;
  font-size: .72rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .review-hero-grid {
    grid-template-columns: minmax(0,1fr) minmax(280px,.72fr);
    gap: 28px;
  }

  .review-layout {
    grid-template-columns: 1fr;
  }

  .review-aside {
    position: static;
    display: grid;
    grid-template-columns: minmax(180px,.65fr) minmax(0,1.35fr);
    gap: 18px 28px;
  }

  .review-aside .kicker,
  .review-aside-cta {
    grid-column: 1;
  }

  .review-aside dl {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
}

@media (max-width: 700px) {
  .review-product-visual img {
    min-height: 0;
  }

  .review-jump-nav {
    margin-inline: -2px;
  }

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

  .review-aside {
    display: block;
  }

  .review-aside-cta {
    margin-bottom: 18px;
  }
}

@media (max-width: 640px) {
  .review-hero {
    padding: 28px 20px;
  }

  .review-breadcrumbs {
    margin-bottom: 16px;
  }

  .review-hero-meta {
    margin-top: 12px;
  }

  .review-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .review-actions .button-primary {
    width: 100%;
  }

  .review-layout {
    padding-top: 40px;
  }

  .review-content > section + section,
  .review-content > section + .tradeoff-grid,
  .review-content > .tradeoff-grid + section {
    margin-top: 38px;
    padding-top: 38px;
  }

  .verdict-section {
    padding: 24px 20px !important;
  }
}


/* Product detail structures stay with this owner; the heritage theme supplies their surfaces. */
.review-product-visual {
  margin: 0;
}

.review-product-visual img {
  width: 100%;
}

.review-product-visual figcaption {
  text-align: right;
}

.spec-grid {
  display: grid;
}

.spec-item {
  display: grid;
  gap: 6px;
}

.decision-card li + li {
  margin-top: 10px;
}

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