/* ==========================================================
   MeHome — Phase 8.2 Homepage Visual Polish
   Baseline-preserving layer: visual refinement only.
   Does not rearrange homepage sections or change functionality.
   ========================================================== */

body.home-page {
  --home-gap: 18px;
  --home-radius: 12px;
  --home-border: #e5e7eb;
  --home-muted: #64748b;
  --home-text: #0f172a;
  --home-blue: #2563eb;
  overflow-x: hidden;
}

body.home-page .container {
  width: min(100%, 1500px);
  max-width: 1500px;
  padding-inline: 15px;
}

/* Header: retain original structure, improve proportions only. */
body.home-page .main-header,
body.home-page header {
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

body.home-page .search-bar {
  min-height: 42px;
  border-color: #dbe3ec;
  background: #f8fafc;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.home-page .search-bar:focus-within {
  background: #fff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

/* Hero: preserve the original desktop composition. */
body.home-page .hero-section {
  margin-top: 18px;
  margin-bottom: 20px;
  padding-inline: 0;
}
body.home-page .hero-grid-container { gap: 12px; }
body.home-page .banner-full-img {
  border-radius: var(--home-radius);
  transition: transform .25s ease, filter .25s ease;
}
body.home-page .hero-main-slider,
body.home-page .side-banner-item { border-radius: var(--home-radius); }
body.home-page .side-banner-item a { overflow: hidden; border-radius: inherit; }
body.home-page .side-banner-item a:hover .banner-full-img,
body.home-page .hero-main-slider a:hover .banner-full-img {
  transform: scale(1.012);
}

/* Section rhythm — same sections, cleaner vertical cadence. */
body.home-page .category-section,
body.home-page .home-new-items,
body.home-page .home-recommendations {
  margin-top: 26px;
  margin-bottom: 26px;
}
body.home-page .category-header { padding-left: 2px; padding-bottom: 12px; }
body.home-page .category-title,
body.home-page .home-new-items .section-title,
body.home-page .home-recommendations .section-title {
  color: var(--home-text);
  letter-spacing: -.018em;
}
body.home-page .category-title { font-size: 19px; font-weight: 750; }
body.home-page .category-title svg { width: 21px; height: 21px; }

/* Category cards: subtle premium treatment, same size/count behavior. */
body.home-page .category-card {
  border-color: var(--home-border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.home-page .category-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 18px rgba(15,23,42,.07);
  transform: translateY(-2px);
}
body.home-page .category-name { color: #1e293b; font-weight: 650; }
body.home-page .cat-nav-btn {
  box-shadow: 0 5px 14px rgba(15,23,42,.10);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.home-page .cat-nav-btn:active { transform: translateY(-50%) scale(.96); }

/* Flash sale: keep its recognizable identity, make typography less harsh. */
body.home-page .fs-section-header {
  margin-top: 30px;
  margin-bottom: 13px;
}
body.home-page .fs-title {
  font-family: var(--mh-font-sans, Inter, system-ui, sans-serif);
  letter-spacing: -.02em;
}
body.home-page .text-flash,
body.home-page .text-sale {
  font-family: var(--mh-font-sans, Inter, system-ui, sans-serif);
}
body.home-page .text-flash { font-size: 22px; font-weight: 850; }
body.home-page .text-sale { font-size: 22px; font-weight: 500; }
body.home-page .fs-timer-box { font-size: 12px; color: #475569; gap: 5px; }
body.home-page .fs-timer-digit {
  min-width: 27px;
  padding: 4px 7px;
  border-radius: 5px;
  box-shadow: none;
}
body.home-page .fs-product-card {
  border-color: var(--home-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
body.home-page .fs-product-card:hover {
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  transform: translateY(-2px);
}
body.home-page .fs-product-info { padding: 8px; }
body.home-page .fs-product-title { color: #334155; line-height: 1.38; }
body.home-page .fs-product-price { font-size: 15px; }

/* Product cards: preserve the 8-column baseline, polish only. */
body.home-page .product-card {
  border-color: var(--home-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
body.home-page .product-card:hover {
  border-color: #d5dce5;
  box-shadow: 0 9px 20px rgba(15,23,42,.08);
  transform: translateY(-2px);
}
body.home-page .product-title {
  color: #1e293b;
  font-weight: 600;
  line-height: 1.4;
}
body.home-page .product-price { color: #0f172a; }
body.home-page .product-info { padding: 9px 9px 10px; }
body.home-page .discount-badge,
body.home-page .product-discount {
  border-radius: 4px;
  font-weight: 750;
}

/* New + recommendation sections: unify their existing inline styles. */
body.home-page .home-new-items .section-header,
body.home-page .home-recommendations .section-header {
  margin-top: 0;
  margin-bottom: 13px;
}
body.home-page .home-new-items .section-title,
body.home-page .home-recommendations .section-title {
  font-size: 19px;
  font-weight: 800;
}
body.home-page .new-see-all {
  font-size: 12px;
  color: var(--home-blue);
  padding: 5px 0;
  transition: color .18s ease;
}
body.home-page .new-see-all:hover { color: #1d4ed8; text-decoration: underline; }
body.home-page .home-new-items .product-card,
body.home-page .home-recommendations .product-card {
  border-radius: 10px;
}
body.home-page .home-new-items .product-info,
body.home-page .home-recommendations .product-info {
  padding: 10px;
}
body.home-page .home-new-items .product-title,
body.home-page .home-recommendations .product-title {
  min-height: 35px;
  font-size: 12px;
}
body.home-page .home-new-items .product-price,
body.home-page .home-recommendations .product-price {
  font-size: 15px;
}
body.home-page .campaign-badge {
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(15,23,42,.10);
}
body.home-page .btn-load-more {
  min-height: 40px;
  margin: 20px auto 0;
  padding: 0 22px;
  border-width: 1px;
  border-radius: 9px;
  font-size: 12px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
body.home-page .btn-load-more:active { transform: translateY(1px); }

/* Feature strip: cleaner alignment while retaining four original items. */
body.home-page .feature-bar-section {
  margin-top: 34px;
  padding: 22px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
body.home-page .feature-bar-grid { gap: 8px; }
body.home-page .feature-item {
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background .18s ease, transform .18s ease;
}
body.home-page .feature-item:hover { background: #fff; transform: translateY(-1px); }
body.home-page .feature-icon-wrap { width: 58px; height: 58px; }
body.home-page .feature-icon-wrap svg { width: 38px; height: 38px; }
body.home-page .feature-title { margin-top: 2px; margin-bottom: 5px; font-size: 13px; }
body.home-page .feature-desc { max-width: 190px; }

/* SEO block: readable and less visually heavy. */
body.home-page .seo-content {
  margin-top: 24px;
  margin-bottom: 34px;
  padding: 22px 24px;
  border-radius: 12px;
  border-color: var(--home-border);
  box-shadow: 0 1px 2px rgba(15,23,42,.02);
}
body.home-page .seo-content h3 {
  color: #1e293b;
  font-size: 15px;
  line-height: 1.4;
  margin: 16px 0 6px;
}
body.home-page .seo-content h3:first-child { margin-top: 0; }
body.home-page .seo-content p { font-size: 13px; line-height: 1.7; }

/* Mobile: preserve section order, improve fit and touch targets. */
@media (max-width: 991px) {
  body.home-page .container { padding-inline: 12px; }
  body.home-page .hero-section { margin-top: 12px; }
}

@media (max-width: 768px) {
  body.home-page .container { padding-inline: 10px; }
  body.home-page .hero-section { margin-bottom: 16px; }
  body.home-page .category-section,
  body.home-page .home-new-items,
  body.home-page .home-recommendations { margin-top: 20px; margin-bottom: 20px; }
  body.home-page .category-header { padding-bottom: 10px; }
  body.home-page .category-title,
  body.home-page .home-new-items .section-title,
  body.home-page .home-recommendations .section-title { font-size: 17px; }
  body.home-page .fs-section-header { margin-top: 22px; margin-bottom: 10px; }
  body.home-page .fs-title-box { gap: 8px; }
  body.home-page .text-flash,
  body.home-page .text-sale { font-size: 19px; }
  body.home-page .fs-icon { width: 22px; height: 22px; }
  body.home-page .fs-timer-box { font-size: 10px; }
  body.home-page .fs-timer-digit { min-width: 24px; padding: 3px 5px; font-size: 11px; }
  body.home-page .feature-bar-section { margin-top: 24px; padding: 16px 8px; }
  body.home-page .feature-bar-grid { gap: 4px; }
  body.home-page .feature-item { padding: 8px 5px; }
  body.home-page .feature-icon-wrap { width: 48px; height: 48px; }
  body.home-page .feature-icon-wrap svg { width: 31px; height: 31px; }
  body.home-page .feature-title { font-size: 12px; }
  body.home-page .feature-desc { font-size: 10px; }
  body.home-page .seo-content { padding: 18px 16px; margin-bottom: 24px; }
}

@media (max-width: 480px) {
  body.home-page .container { padding-inline: 8px; }
  body.home-page .hero-section { margin-top: 10px; }
  body.home-page .hero-side-banners { gap: 7px; }
  body.home-page .category-grid { gap: 8px; }
  body.home-page .category-card { border-radius: 11px; }
  body.home-page .home-new-items .new-carousel { gap: 9px; }
  body.home-page .home-new-items .new-carousel .product-card { flex-basis: 148px; }
  body.home-page .home-new-items .product-info,
  body.home-page .home-recommendations .product-info { padding: 8px; }
  body.home-page .home-new-items .product-price,
  body.home-page .home-recommendations .product-price { font-size: 14px; }
  body.home-page .feature-bar-section { border-radius: 10px; }
  body.home-page .seo-content p { font-size: 12px; }
}
