/* =============================================================
   MoonbasaNails · index.html (kezdőlap / home skeleton)
   Mapped 1:1 from source/index.html Smarty fields
   Responsive: desktop ≥1200 / tablet 768-1199 / mobile ≤767

   Extracted from MBSN Design System / pages / storefront /
   index.kezdőlap.商城首页.html for new theme c0e148c48281dff9daf6642417e4380b
   (mbsn_newui_v1). Tweaks Panel CSS (dev-only) excluded.

   Depends on: colors_and_type.v1.css (CSS variables / tokens)
   ============================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink-50);
  color: var(--ink-800);
  font-family: var(--font-sans);
  font-size: var(--fs-15);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rose-gold); }
img { max-width: 100%; display: block; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* =============================================================
   HEADER
   ============================================================= */
#header { background: var(--paper); border-bottom: var(--line-hair); }

/* -- header_top (sections-top-wrap): notice + custom + banner -- */
.header_top {
  background: var(--ink-800);
  color: var(--ink-100);
  border-bottom: 1px solid var(--ink-700);
}
.sections-top-row1 {
  display: flex;
  min-height: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sections-top-col {
  flex: 1;
  padding: 8px 16px;
  font-size: var(--fs-12);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-100);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sections-top-col.sections-top-full { flex: 0 0 100%; max-width: 100%; }
.sections-top-col + .sections-top-col {
  border-left: 1px solid rgba(255,255,255,0.08);
}
.sections-top-col i { color: var(--rg-300); font-size: 12px; }
.sections-top-banner {
  height: 64px;
  background: linear-gradient(90deg, #1a1612 0%, #2a201a 50%, #1a1612 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rg-300);
  font-family: var(--font-serif);
  font-size: var(--fs-16);
  font-style: italic;
  letter-spacing: var(--ls-wide);
}
.sections-top-banner::before,
.sections-top-banner::after {
  content: "";
  width: 40px;
  border-top: 1px solid var(--rg-500);
  margin: 0 16px;
}

/* -- header-middle: lang/curr + logo + auth -- */
.header-middle { padding: 18px 0; background: var(--paper); }
.header-middle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Lang + Curr dropdowns */
.header-switcher { display: flex; gap: 4px; }
.hs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.hs-btn:hover { border-color: var(--ink-300); color: var(--ink-900); }
.hs-btn i:first-child { font-size: 14px; color: var(--rose-gold); }
.hs-btn .caret {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 2px;
  border-top: 4px solid currentColor;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  opacity: 0.5;
}

/* Logo — center */
.site-logo { text-align: center; flex: 1; }
.site-logo-mark {
  font-family: var(--font-serif);
  font-size: var(--fs-32);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-900);
  line-height: 1;
}
.site-logo-mark em { font-style: italic; color: var(--rose-gold); }
.site-logo-sub {
  font-family: var(--font-sans);
  font-size: var(--fs-10);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--ink-500);
  margin-top: 6px;
}

/* Auth — right side */
.shop-menu { display: flex; align-items: center; gap: 20px; }
.auth-link {
  font-size: var(--fs-12);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-700);
  padding: 6px 4px;
  border-bottom: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-out);
}
.auth-link:hover { color: var(--ink-900); border-bottom-color: var(--rose-gold); }
.auth-link--strong { color: var(--ink-900); font-weight: 600; }

/* Logged-in state */
.user-menu { position: relative; }
.user-menu-trigger {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-13); color: var(--ink-800);
  cursor: pointer;
  padding: 6px 0;
}
.user-menu-trigger strong {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-15);
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--ink-800);
  color: var(--rg-300);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.user-menu-dropdown {
  position: absolute; top: 100%; right: 0;
  min-width: 180px;
  background: var(--paper);
  border: var(--line-hair);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 4px 0 0; padding: 8px 0;
  opacity: 0; visibility: hidden;
  transform: translateY(4px);
  transition: all var(--dur-fast) var(--ease-out);
  z-index: 100;
}
.user-menu:hover .user-menu-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-menu-dropdown li a {
  display: block; padding: 8px 16px;
  font-size: var(--fs-13); color: var(--ink-700);
}
.user-menu-dropdown li a:hover { background: var(--ink-50); color: var(--rose-gold); }
.user-menu-dropdown .divider { height: 1px; background: var(--ink-100); margin: 4px 0; }

.cart-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--ink-300);
  color: var(--ink-900);
  font-size: var(--fs-12);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  transition: all var(--dur-fast) var(--ease-out);
}
.cart-link:hover { border-color: var(--ink-900); }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--rose-gold);
  color: var(--paper);
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  font-family: var(--font-sans);
}

/* -- header-bottom: nav + search -- */
.header-bottom {
  background: var(--paper);
  border-top: var(--line-hair);
  border-bottom: var(--line-hair);
}
.header-bottom-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

/* Main nav — compact; items never wrap text mid-item, but the row may
   wrap to a second line when total content > available width. */
.mainmenu {
  flex: 1 1 auto;
  min-width: 0;
}
.mainmenu ul {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 0 4px;
  flex-wrap: wrap;       /* allow nav to use 2 rows if needed instead of overflowing into search box */
  align-items: center;
}
.mainmenu > ul > li { position: relative; }
.mainmenu > ul > li > a {
  display: block;
  padding: 12px 10px;
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-700);
  border-bottom: 1px solid transparent;
  white-space: nowrap;          /* each item stays single-line; row may wrap between items */
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.mainmenu > ul > li > a:hover { color: var(--ink-900); }
.mainmenu > ul > li > a.active {
  color: var(--ink-900);
  font-weight: 600;
  border-bottom-color: var(--ink-900);
}
.mainmenu > ul > li > a i { font-size: 9px; margin-left: 3px; opacity: 0.6; }

/* Sub-menu (dropdown) */
.sub-menu {
  display: block;            /* 覆盖 .mainmenu ul 的 display:flex，否则下拉项横排成多列 */
  position: absolute;
  top: 100%; left: 0;
  min-width: 200px;
  background: var(--paper);
  border: var(--line-hair);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0; padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all var(--dur-fast) var(--ease-out);
  z-index: 100;
}
.mainmenu > ul > li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: var(--fs-13);
  color: var(--ink-700);
  letter-spacing: 0.02em;
}
.sub-menu li a:hover { background: var(--ink-50); color: var(--rose-gold); }
.sub-menu li.sub-divider {
  height: 1px;
  background: var(--ink-100);
  margin: 4px 0;
  pointer-events: none;
}

/* Search box — fixed width, never shrinks (flex-shrink: 0 protects the placeholder) */
.header-search-box {
  display: flex;
  align-items: center;
  align-self: center;
  width: 220px;
  flex: 0 0 220px;
  height: 36px;
  border: 1px solid var(--ink-900);
  background: var(--paper);
  position: relative;
}
.header-search-box input[type=text] {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  color: var(--ink-900);
  outline: none;
  letter-spacing: 0.01em;
}
.header-search-box input[type=text]::placeholder { color: var(--ink-400); font-style: italic; }
.header-search-box button {
  height: 100%;
  padding: 0 14px;          /* narrower so input has more room */
  background: var(--ink-900);
  color: var(--paper);
  border: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-11);
  letter-spacing: 0.08em;   /* less aggressive than --ls-widest (0.22em) */
  text-transform: uppercase;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.header-search-box button:hover { background: var(--rose-gold); }

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--ink-300);
  padding: 10px 12px;
  cursor: pointer;
}
.navbar-toggle .icon-bar {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink-900);
  margin: 4px 0;
}

/* =============================================================
   MAIN SECTION — sidebar + product grid + mega menu panel
   ============================================================= */
.page-section { padding: 40px 0 80px; }
.page-layout {
  position: relative; /* anchor for absolute-positioned megamenu */
  display: grid;
  grid-template-columns: 200px 1fr;   /* sidebar 200px */
  gap: 40px;
}

/* =============================================================
   MEGA MENU — eMAG-style hover panel
   ============================================================= */
.cat-item {
  border-bottom: 1px solid var(--ink-200);
}
.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 4px;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--ink-800);
  letter-spacing: 0.01em;
  transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
  position: relative;
}
.cat-link:hover,
.cat-item.active > .cat-link {
  color: var(--rose-gold);
  padding-left: 10px;
  background: var(--ink-50);
}
.cat-item.active > .cat-link::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--rose-gold);
}
.cat-chevron {
  font-size: 11px;
  color: var(--ink-400);
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}
.cat-item:hover .cat-chevron,
.cat-item.active .cat-chevron {
  color: var(--rose-gold);
  transform: translateX(2px);
}

.megamenu-panel {
  position: absolute;
  top: 38px;     /* fallback; JS overrides with hovered cat-item's top */
  left: 240px;   /* 200px sidebar + 40px gap */
  right: 0;
  z-index: 50;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-lg);
  padding: 20px 28px;
  min-height: 160px;   /* shrunk to 50% of original 320px; grows naturally with content */
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, top 0.18s ease;
  pointer-events: none;
}
.megamenu-panel.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.megamenu-panel::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: var(--rose-gold);
}

.megamenu-content {
  display: none;
}
.megamenu-content.active {
  display: block;
}

.megamenu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px 32px;
}

.megamenu-col { min-width: 0; }
.megamenu-n2 {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--fs-16);
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-200);
  transition: color 0.15s ease;
}
.megamenu-n2:hover { color: var(--rose-gold); }

.megamenu-n3 {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.megamenu-n3 li { margin: 0; }
.megamenu-n3 a {
  display: block;
  font-size: var(--fs-13);
  color: var(--ink-600);
  padding: 3px 0;
  transition: color 0.15s ease, padding-left 0.15s ease;
}
.megamenu-n3 a:hover {
  color: var(--rose-gold);
  padding-left: 4px;
}

/* Mobile / touch: hide mega panel entirely, sidebar shows flat list */
@media (max-width: 767px), (hover: none) {
  .megamenu-panel { display: none !important; }
  .cat-link { padding: 12px 0; }
  .cat-link:hover { padding-left: 0; background: transparent; }
}

/* -- Left sidebar: category tree -- */
.left-sidebar h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-24);
  color: var(--ink-900);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-900);
  letter-spacing: 0.01em;
}
.category-products { border-top: 1px solid var(--ink-200); }
.panel-default { border-bottom: 1px solid var(--ink-200); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.panel-title {
  flex: 1;
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.panel-title > a:first-child {
  display: block;
  padding: 14px 0;
  color: var(--ink-800);
  transition: color var(--dur-fast) var(--ease-out);
}
.panel-title > a:first-child:hover { color: var(--rose-gold); }
.panel-title .toggle { padding: 14px 0 14px 12px; color: var(--ink-500); font-size: 11px; cursor: pointer; }
.panel-title .toggle:hover { color: var(--rose-gold); }
.panel-body { padding: 0 0 14px 12px; border-left: 1px solid var(--ink-200); margin-left: 2px; }
.panel-body ul { list-style: none; margin: 0; padding: 0; }
.panel-body li + li { margin-top: 2px; }
.panel-body .n2 { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.panel-body .n2 > a:first-child { font-size: var(--fs-13); color: var(--ink-700); letter-spacing: 0.01em; }
.panel-body .n2 > a:first-child:hover { color: var(--rose-gold); }
.panel-body .n3 {
  list-style: none;
  padding: 4px 0 8px 12px;
  border-left: 1px solid var(--ink-200);
  margin: 0 0 0 4px;
}
.panel-body .n3 a { display: block; padding: 5px 0; font-size: var(--fs-12); color: var(--ink-500); }
.panel-body .n3 a:hover { color: var(--rose-gold); }

/* collapse state — uses max-height for smooth hover transitions */
.panel-collapse {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.panel-collapse.open { max-height: 600px; opacity: 1; }
.panel-heading .toggle .fa-plus { transition: transform var(--dur-fast); }
.panel-heading.open .toggle .fa-plus { transform: rotate(45deg); }

/* -- Right content: title + toggle + grid -- */
.content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-200);
}
.content-head .title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-28);
  color: var(--ink-900);
  margin: 0;
  letter-spacing: 0.01em;
}
.list-style { display: flex; gap: 8px; align-items: center; }
.list-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: var(--fs-11);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--ink-500);
  border: 1px solid var(--ink-200);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.list-item:hover { color: var(--ink-900); border-color: var(--ink-900); }
.list-item.item-selected {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: var(--paper);
}

/* =============================================================
   LIST VIEW (flat-prod-item)
   ============================================================= */
#productGrid[data-view="list"] { display: block; }
#productGrid[data-view="gallery"] .flat-prod-item { display: none; }
#productGrid[data-view="list"] .product-image-wrapper { display: none; }

.flat-prod-item {
  display: grid;
  /* 2026-05-19: 第三列 240px → 280px，让加购按钮长词（如 BEVÁSÁRLÓKOCSIBA）一行显示，整体右列内容向左展开 */
  grid-template-columns: 160px minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
  margin: 0;
  /* 2026-05-19: padding 四向都 20px（上下左右各 20px）— 卡片左右两端有留白 */
  padding: 20px;
  border-bottom: 1px solid var(--ink-200);
  background: var(--paper);
  position: relative;
  transition: background .2s ease;
}
.flat-prod-item::before {
  content: "";
  position: absolute;
  left: -20px; top: 0; bottom: 0;
  width: 2px;
  background: transparent;
  transition: background .2s ease;
}
.flat-prod-item:hover { background: var(--ink-50); }
.flat-prod-item:hover::before { background: var(--rose-gold); }
.flat-prod-item:first-child { border-top: 1px solid var(--ink-900); }

/* dt: thumbnail column */
.flat-prod-item > dt {
  margin: 0;
  width: 160px; height: 160px;
  background: var(--ink-100);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.flat-prod-item > dt .img-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.flat-prod-item > dt .placeholder-ico {
  font-family: var(--font-serif);
  font-size: 72px;
  font-style: italic;
  color: var(--ink-300);
  font-weight: 500;
}
.flat-prod-item > dt::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink-200);
  pointer-events: none;
}

/* dd.desc-box: middle column */
.flat-prod-item .desc-box {
  margin: 0; padding: 4px 0;
  display: flex; flex-direction: column;
  gap: 10px;
}
.flat-prod-item .desc-box .prod-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-22);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink-900);
}
.flat-prod-item .desc-box .prod-name a { color: inherit; }
.flat-prod-item .desc-box .prod-name a:hover { color: var(--rose-gold); }
.flat-prod-item .desc-box .desc { display: flex; flex-wrap: wrap; gap: 6px; }
.flat-prod-item .desc-box .chip-kv {
  display: inline-flex; align-items: baseline;
  border: 1px solid var(--ink-200);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-11);
  height: 24px;
  overflow: hidden;
}
.flat-prod-item .desc-box .chip-kv .k {
  padding: 0 8px;
  background: var(--ink-50);
  color: var(--ink-500);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 9px;
  line-height: 24px;
  border-right: 1px solid var(--ink-200);
}
.flat-prod-item .desc-box .chip-kv .v {
  padding: 0 10px;
  color: var(--ink-800);
  font-weight: 500;
  line-height: 24px;
}
.flat-prod-item .desc-box .prod-blurb {
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  color: var(--ink-600);
  line-height: 1.5;
  margin: 4px 0 0;
  max-width: 520px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.flat-prod-item .desc-box .view-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-500);
}
.flat-prod-item .desc-box .view-more:hover { color: var(--rose-gold); }
.flat-prod-item .desc-box .view-more .fa { color: var(--rose-gold); font-size: 10px; }

/* dd.price-box: right column */
.flat-prod-item .price-box {
  margin: 0; padding: 0;
  min-width: 0;
  display: flex; flex-direction: column;
  gap: 10px;
  border-left: 1px solid var(--ink-200);
  padding-left: 20px;
}
.flat-prod-item .price-box .price-stack { padding: 0; margin: 0; border: 0; }
/* 2026-05-19: 间距紧凑 — 各行 padding/margin 减小 */
.flat-prod-item .price-box .price-row { padding: 2px 0; }
.flat-prod-item .price-box .price-row .value { font-size: var(--fs-22); }
.flat-prod-item .price-box .price-row.auth .value { color: var(--rose-gold); font-size: 24px; }
/* 2026-05-19: 首页清单模式市价数值加删除线（具体选择器强制覆盖通用规则） */
.flat-prod-item .price-box .price-row.market .value {
  text-decoration: line-through;
  text-decoration-color: rgba(160, 160, 160, 0.6);
  text-decoration-thickness: 1px;
  color: var(--ink-500);
  font-size: 22px;
}
.flat-prod-item .price-box .price-row.market .value .sign { text-decoration: none; }
.flat-prod-item .price-box .sku-options {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  /* 2026-05-19: 选项每行 label 左 + select 右 — 不用 grid 多列 */
  display: block;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.flat-prod-item .price-box .sku-options.single { grid-template-columns: 1fr; }
/* 2026-05-19: 选项 li — label 左 + select 右 同一行 + 紧凑间距 */
.flat-prod-item .price-box .sku-options li {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  margin-bottom: 2px;
}
.flat-prod-item .price-box .sku-options li .sku-label { flex: 0 0 72px; margin: 0 !important; }
.flat-prod-item .price-box .sku-options li select {
  flex: 1; min-width: 0;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--ink-300); background: #fff;
  font-size: 13px;
}
.flat-prod-item .price-box .sku-options .sku-label {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-500);
}
.flat-prod-item .price-box .sku-options select {
  border: 1px solid var(--ink-300);
  background: var(--paper);
  padding: 4px 8px;
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  color: var(--ink-800);
  height: 30px;
}
/* 2026-05-19: 数量行 — label 左 + input 右 同一行 + 紧凑间距 */
.flat-prod-item .price-box .qty-line {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0;
}
.flat-prod-item .price-box .qty-line .qty-label {
  flex: 0 0 72px;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-500);
  line-height: 1.4;
}
.flat-prod-item .price-box .qty-line input[type="text"] {
  flex: 1; min-width: 0;
  height: 32px !important; padding: 0 10px !important;
}

/* 加购按钮 — 单独一行，全宽，紧凑 */
.flat-prod-item .price-box .buy-row {
  display: flex; align-items: stretch; gap: 8px; margin-top: 4px; min-width: 0;
}
.flat-prod-item .price-box .buy-row > .add-to-cart {
  flex: 1; min-height: 34px !important; padding: 4px 8px !important;
}
.flat-prod-item .price-box .buy-row input {
  flex: 0 0 86px;
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--ink-900);
  border: 1px solid var(--ink-300);
  background: var(--paper);
  border-radius: 0;
  box-sizing: border-box;
}
.flat-prod-item .price-box .buy-row input::placeholder { font-size: 10px; letter-spacing: 0; }
.flat-prod-item .price-box .buy-row input:focus { outline: none; border-color: var(--ink-900); }
.flat-prod-item .price-box .qty-list {
  display: inline-flex;
  border: 1px solid var(--ink-300);
  height: 38px;
}
.flat-prod-item .price-box .qty-list button {
  width: 32px; border: 0;
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink-700);
  cursor: pointer;
}
.flat-prod-item .price-box .qty-list button:hover { color: var(--rose-gold); }
.flat-prod-item .price-box .qty-list input {
  width: 42px;
  border: 0;
  border-left: 1px solid var(--ink-200);
  border-right: 1px solid var(--ink-200);
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  color: var(--ink-800);
}
.flat-prod-item .price-box .qty-list input:focus { outline: none; }
.flat-prod-item .price-box .add-to-cart {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 8px;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink-900);
  margin: 0;
  transition: background .18s ease, color .18s ease;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.flat-prod-item .price-box .add-to-cart .fa { font-size: 10px; flex-shrink: 0; }
.flat-prod-item .price-box .add-to-cart:hover { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper); opacity: .85; }

/* list view: tablet */
@media (max-width: 991px) {
  .flat-prod-item {
    grid-template-columns: 140px 1fr;
    grid-template-areas: "img desc" "price price";
    gap: 18px;
  }
  .flat-prod-item > dt { grid-area: img; width: 140px; height: 140px; }
  .flat-prod-item .desc-box { grid-area: desc; }
  .flat-prod-item .price-box {
    grid-area: price;
    border-left: 0;
    border-top: 1px solid var(--ink-200);
    padding-left: 0;
    padding-top: 16px;
  }
}
@media (max-width: 560px) {
  .flat-prod-item { grid-template-columns: 96px 1fr; gap: 14px; padding: 18px 0; }
  .flat-prod-item > dt { width: 96px; height: 96px; }
  .flat-prod-item .desc-box .prod-name { font-size: var(--fs-18); }
  .flat-prod-item .price-box .sku-options { grid-template-columns: 1fr; }
}

/* =============================================================
   GALLERY VIEW (product-image-wrapper)
   ============================================================= */
.features_items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
  align-items: stretch;
}
.product-image-wrapper { display: flex; }
.single-products {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* 撑满 .product-image-wrapper(flex 容器) → 卡片宽度统一，不随内容自适应 */
  flex: 1;
  min-width: 0;
}
.single-products:hover {
  border-color: var(--ink-900);
  box-shadow: var(--shadow-md);
}

.productinfo { text-align: center; }
.img-box {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #2a1f1c, #B76E5D, #d8a78f);
  overflow: hidden;
  position: relative;
}
.img-box::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(183,110,93,0.08), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(23,21,18,0.015) 14px 15px);
}
/* Show product image FULLY (no cropping), centered, with letterbox padding
   if aspect ratio differs from the 4:3 container. */
.img-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}
.img-box .placeholder-ico {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 42px;
  color: var(--rose-gold);
  opacity: 0.35;
  letter-spacing: 0.04em;
}

.prod-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.prod-name {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-13);
  line-height: 1.35;
  color: var(--ink-900);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}
.prod-sn {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: left;
}

.price-stack {
  text-align: left;
  padding: 4px 0 8px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 2px 0;
}
.price-row .label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  line-height: 1.3;
  white-space: normal;
  margin-bottom: 1px;
}
.price-row .value {
  font-family: var(--font-serif);
  font-size: var(--fs-18);
  font-weight: 500;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.1;
}
.price-row .value .sign { font-size: 10px; color: var(--ink-500); margin-right: 2px; }
.price-row.auth .value { color: var(--rose-gold); font-size: 20px; }
.price-row.auth .label { color: var(--rose-gold); }

/* Market price (when paired with auth/discount): inline single line, strikethrough ONLY on the value */
.price-row.market {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  opacity: 0.7;
}
.price-row.market .label {
  color: var(--ink-400);       /* label stays muted */
}
.price-row.market .value {
  color: var(--ink-700);       /* value digits darker — readable through the strike */
  font-size: 16px;
  font-weight: 500;            /* slightly bolder for legibility */
  text-decoration: line-through;
  text-decoration-color: rgba(160, 160, 160, 0.55);  /* lighter / semi-transparent line */
  text-decoration-thickness: 1px;
}
/* Currency sign sits inside .value but should NOT be struck through.
   inline-block breaks the parent's strikethrough propagation, and
   explicit text-decoration:none reinforces it for older browsers. */
.price-row.market .value .sign {
  display: inline-block;
  text-decoration: none;
  font-size: var(--fs-11);     /* sign kept small, sits next to the bigger number */
}
.price-row.market .label .auth-tag {
  color: var(--ink-400);
  background: var(--ink-100);
}
.auth-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  background: var(--rg-100);
  color: var(--rose-gold);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* SKU options */
.sku-options {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px 8px;
}
.sku-options.single li { flex: 1 1 100%; }
.sku-options li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
}
.sku-options .sku-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--ink-500);
}
.sku-options select {
  width: 100%;
  padding: 6px 20px 6px 8px;
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: 0;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23171512' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}
.sku-options select:focus { outline: none; border-color: var(--rose-gold); }

/* Compact inline qty-row: label inline-small + input full-rest. Saves vertical space. */
.qty-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  min-width: 0;
}
.qty-row label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  white-space: nowrap;
  flex-shrink: 0;
}
.qty-row input {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--ink-900);
  border: 1px solid var(--ink-300);
  background: var(--paper);
  text-align: center;
  border-radius: 0;
  box-sizing: border-box;
}
.qty-row input:focus { outline: none; border-color: var(--ink-900); }
.qty-row input::placeholder { font-size: 10px; letter-spacing: 0; }

.add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 11px 8px;
  background: var(--ink-900);
  color: var(--paper);
  border: 1px solid var(--ink-900);
  font-family: var(--font-sans);
  font-size: var(--fs-10);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  /* allow long Hungarian words (e.g. "BEVÁSÁRLÓKOCSIBA") to fit; shrink/ellipsis as last resort */
  text-align: center;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.add-to-cart:hover { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper); opacity: .85; }
.add-to-cart i { font-size: 12px; flex-shrink: 0; }

/* Bottom-pin the buy cluster: ensure all cards in a row line up */
.prod-body > .sku-options,
.prod-body > .qty-row,
.prod-body > .add-to-cart { margin-top: auto; }

/* Bundle badge */
.badge-bundle {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 6px;
  background: var(--rose-gold);
  color: var(--paper);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Pagination */
.pagination-row {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-200);
  display: flex;
  justify-content: center;
  gap: 4px;
}
.pg-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  color: var(--ink-700);
  border: 1px solid var(--ink-200);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.pg-item:hover { border-color: var(--ink-900); color: var(--ink-900); }
.pg-item.active { background: var(--ink-900); color: var(--paper); border-color: var(--ink-900); }
.pg-item.disabled { color: var(--ink-300); cursor: not-allowed; }

/* =============================================================
   FOOTER — 4 columns + bottom bar
   ============================================================= */
/* 底部区高度随内容自适应：.site-footer 自身不加固定上下留白，
   留白由实际存在的子块（.footer-grid / .footer-bottom）各自提供。
   admin 未配置 section_bottom_about/contact 时只剩 .footer-bottom，
   底部区即收缩为版权条本身的高度。 */
.site-footer {
  background: var(--ink-900);
  color: var(--ink-200);
  padding: 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding: 48px 0;
}
.footer-col h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-16);
  color: var(--paper);
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.footer-col p {
  font-size: var(--fs-13);
  line-height: 1.7;
  color: var(--ink-300);
  margin: 0 0 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
  font-size: var(--fs-13);
  color: var(--ink-300);
  letter-spacing: 0.01em;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-col ul a:hover { color: var(--rose-gold); }
.footer-col--brand .site-logo-mark { color: var(--paper); font-size: var(--fs-24); text-align: left; }
.footer-col--brand .site-logo-sub { color: var(--ink-400); text-align: left; margin: 6px 0 18px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink-700);
  color: var(--ink-300);
  transition: all var(--dur-fast) var(--ease-out);
}
.footer-social a:hover { border-color: var(--rose-gold); color: var(--rose-gold); }

.footer-bottom {
  border-top: 1px solid var(--ink-700);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--fs-11);
  color: var(--ink-400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-bottom .legal-links { display: flex; gap: 18px; }
.footer-bottom .legal-links a { color: var(--ink-400); }
.footer-bottom .legal-links a:hover { color: var(--rose-gold); }

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 1279px) {
  .features_items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 28px; }
  .megamenu-panel { left: 208px; }   /* 180 + 28 */
  .content-main { min-width: 0; }
  .header-bottom-row { gap: 16px; min-width: 0; }
  .mainmenu { min-width: 0; flex: 1 1 auto; }
  .mainmenu ul { flex-wrap: nowrap; }
  .mainmenu > ul > li > a { padding: 16px 11px; letter-spacing: 0.04em; }
  .header-search-box { width: 220px; flex: 0 1 220px; min-width: 180px; }
}

@media (max-width: 1099px) {
  .mainmenu > ul > li > a { padding: 14px 8px; font-size: var(--fs-12); }
  .header-search-box { width: 190px; flex: 0 1 190px; min-width: 160px; }
  .header-bottom-row { gap: 12px; }
  .features_items { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .page-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
  .megamenu-panel { left: 184px; }   /* 160 + 24 */
}

@media (max-width: 991px) {
  .page-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
  .megamenu-panel { left: 184px; }   /* 160 + 24 */
  .features_items { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .sections-top-row1 { flex-direction: column; }
  .sections-top-col + .sections-top-col { border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); }
  .sections-top-banner { height: 52px; font-size: var(--fs-14); }
  .mainmenu > ul > li > a { padding: 14px 8px; font-size: var(--fs-12); }
}

@media (max-width: 767px) {
  .container { padding: 0 16px; }

  .header-middle { padding: 14px 0; }
  .header-middle-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
  }
  .header-switcher { gap: 0; }
  .hs-btn { padding: 6px 8px; font-size: 11px; }
  .hs-btn span:nth-child(2) { display: none; }
  .site-logo-mark { font-size: var(--fs-20); }
  .site-logo-sub { display: none; }
  .shop-menu { gap: 10px; }
  .auth-link { padding: 4px 2px; font-size: 10px; }

  .header-bottom-row { flex-direction: column; align-items: stretch; padding: 12px 0; gap: 12px; }
  .navbar-toggle { display: inline-flex; flex-direction: column; align-self: flex-start; }
  .mainmenu { display: none; }
  .mainmenu.mobile-open { display: block; }
  .mainmenu ul { flex-direction: column; gap: 0; }
  .mainmenu > ul > li { border-bottom: 1px solid var(--ink-200); }
  .mainmenu > ul > li > a { padding: 12px 4px; }
  .mainmenu > ul > li > a.active { border-bottom-color: transparent; }
  .sub-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0;
    padding: 0 0 8px 16px;
  }

  /* flex:0 0 auto 必须 — 否则基础样式的 flex-basis:220px 在纵向 flex 里会变成 220px 高度 */
  .header-search-box { flex: 0 0 auto; width: 100%; height: 38px; }
  .header-search-box button { padding: 0 14px; }

  .page-section { padding: 24px 0 48px; }
  .page-layout { grid-template-columns: 1fr; gap: 20px; }
  .left-sidebar {
    background: var(--paper);
    border: 1px solid var(--ink-200);
    padding: 14px 16px;
  }
  .left-sidebar h2 {
    font-size: var(--fs-18);
    padding: 6px 0;
    margin: 0;
    border-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }
  .left-sidebar h2::after {
    content: "+";
    font-family: var(--font-sans);
    font-size: 20px;
    color: var(--rose-gold);
  }
  .category-products { display: none; margin-top: 12px; }
  .left-sidebar.open .category-products { display: block; }
  .left-sidebar.open h2::after { content: "×"; }

  .content-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .content-head .title { font-size: var(--fs-22); }

  .features_items { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  /* 正文预留最低高度 + 购买区 margin-top:auto → 有/无价格的卡片尽量拉齐 */
  .prod-body { padding: 14px 12px 16px; min-height: 230px; }
  .prod-name { font-size: var(--fs-12); min-height: 32px; }
  .price-row .value { font-size: var(--fs-15); }
  .add-to-cart { padding: 10px; font-size: 10px; letter-spacing: 0.1em; }

  .site-footer { padding: 0; margin-top: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 24px 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; font-size: 10px; }
}

@media (max-width: 420px) {
  .features_items { grid-template-columns: 1fr; }
  .hs-btn span.curr-name { display: none; }
}

/* =====================================================
   2026-05-19: shop.html / search.html 清单模式（list view）
   ─────────────────────────────────────────────────────
   HTML 用 <dl class="flat-prod-item"> 同首页 class，但带
   旧主题 inline style 污染（h2 巨字、btn-default 灰背景、
   img width/height 属性）。这段补丁强制覆盖让视觉与首页一致。
   ===================================================== */

/* 卡片图片：覆盖 HTML <img width=128 height=128> 让图片自适应 dt 容器 */
.flat-prod-item > dt > div { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.flat-prod-item > dt .img-box { width: 100% !important; height: 100% !important; display: flex !important; align-items: center; justify-content: center; padding: 0 !important; }
.flat-prod-item > dt .img-box img { max-width: 100% !important; max-height: 100% !important; width: auto !important; height: auto !important; object-fit: contain; }

/* 价格区 <h2>：覆盖内联 30+px 巨字 / #b8896b 内联色 */
.flat-prod-item .price-box h2 {
  font-size: 13px !important;
  font-weight: 600 !important;
  margin: 0 0 4px !important;
  line-height: 1.4 !important;
  color: var(--ink-700) !important;
  letter-spacing: 0 !important;
}
.flat-prod-item .price-box h2[style*="line-through"] {
  color: var(--ink-400) !important;
  text-decoration: line-through !important;
  text-decoration-color: var(--ink-300) !important;
  font-weight: 400 !important;
}
.flat-prod-item .price-box h2 span[style*="line-through"] { color: inherit !important; }
.flat-prod-item .price-box h2 span[id^="market_price_"],
.flat-prod-item .price-box h2 span[id^="auth_price_"] { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 加购按钮：覆盖 Bootstrap .btn .btn-default 黑/灰背景，与首页 .add-to-cart 一致 */
.flat-prod-item .price-box .btn.btn-default.add-to-cart,
.flat-prod-item .price-box a.add-to-cart {
  background: var(--ink-900) !important;
  color: var(--paper) !important;
  border: 1px solid var(--ink-900) !important;
  padding: 11px 8px !important;
  font-size: var(--fs-10) !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  display: flex !important;
  align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 38px;
  margin-top: 10px;
  border-radius: 0 !important;
  text-align: center;
  text-decoration: none !important;
  transition: opacity .15s ease;
}
.flat-prod-item .price-box .btn.btn-default.add-to-cart:hover,
.flat-prod-item .price-box a.add-to-cart:hover {
  background: var(--ink-900) !important;
  color: var(--paper) !important;
  border-color: var(--ink-900) !important;
  opacity: .85;
}
.flat-prod-item .price-box .add-to-cart i,
.flat-prod-item .price-box .btn-default i { color: var(--paper) !important; margin-right: 4px; font-size: 12px; }

/* 选项下拉 <ul><li><select>：重置内联宽度，纵向排列 */
.flat-prod-item .price-box ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 8px 0 !important;
  display: flex; flex-direction: column; gap: 6px;
}
.flat-prod-item .price-box ul > li {
  display: flex !important; align-items: center; gap: 8px;
  padding: 0 !important; margin: 0 !important;
  font-size: 12px;
}
.flat-prod-item .price-box ul > li > span { font-size: 11px; color: var(--ink-500); flex-shrink: 0; }
.flat-prod-item .price-box ul > li select {
  width: 100% !important; flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--ink-300) !important;
  background: #fff;
  font-size: 13px;
  height: auto;
}

/* 数量输入框 */
.flat-prod-item .price-box input[type="text"] {
  width: 100% !important;
  padding: 6px 8px !important;
  border: 1px solid var(--ink-300) !important;
  background: #fff !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  text-align: left !important;
  height: auto !important;
}
.flat-prod-item .price-box p[style*="font-weight"] {
  font-size: 11px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  color: var(--ink-500) !important;
  margin: 8px 0 4px !important;
}
.flat-prod-item .price-box p[style*="font-weight"] input[type="text"] {
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin-top: 4px;
}

/* ===== 移动端可用性修复（2026-05-20 手机自适应审计）===== */
@media (max-width:767px){
  /* 表单输入 ≥16px —— 避免 iOS Safari 聚焦时自动放大（全站统一）*/
  input[type=text],input[type=password],input[type=search],input[type=number],input[type=tel],input[type=email],select,textarea{font-size:16px!important}
  /* 顶栏语言/货币按钮触摸区 ≥40px */
  .hs-btn{min-height:40px}
}

/* ===== 移动端分类手风琴（子分类）—— index.v1.js 克隆 megamenu-content 内联，
   桌面端隐藏(用 hover megamenu)，≤767px 点 chevron 展开 ===== */
.cat-mobile-sub { display: none; }
@media (max-width: 767px) {
  .cat-mobile-sub { background: var(--ink-50); border-top: 1px solid var(--ink-200); }
  .cat-mobile-sub.open { display: block; }
  .cat-mobile-sub .megamenu-grid { display: block; }
  .cat-mobile-sub .megamenu-col { margin: 0; padding: 0; }
  .cat-mobile-sub .megamenu-n2 {
    display: block; padding: 10px 14px 10px 28px;
    font-size: 13px; font-weight: 600; color: var(--ink-800);
    border-bottom: 1px solid var(--ink-200);
  }
  .cat-mobile-sub .megamenu-n3 { margin: 0; padding: 4px 0 8px; list-style: none; }
  .cat-mobile-sub .megamenu-n3 li a {
    display: block; padding: 7px 14px 7px 42px; font-size: 12px; color: var(--ink-600);
  }
  .cat-mobile-sub .megamenu-n3 li a:hover { color: var(--rose-gold); }
  /* chevron 加大触摸区 + 展开时旋转 */
  .cat-item .cat-chevron { padding: 12px 10px; margin: -12px -4px -12px 0; transition: transform .2s ease; }
  .cat-item.cat-open .cat-chevron { transform: rotate(90deg); }
}

/* =============================================================
   移动端表格安全网（2026-05-21 全站手机自适应统一改造）
   管理类页面的宽数据表在 ≤767px 不再压缩列 / 隐藏列，而是整体
   横向滚动（可左右拖拽），保留全部列与功能 —— 与价格管理页一致。
   通用滚动容器：.list-div / #listDiv / #itemListDiv / .table-responsive
   以及在模板中手动包裹用的 .mbsn-table-scroll。
   ============================================================= */
.mbsn-table-scroll { width: 100%; }
@media (max-width:767px){
  /* 1) 宽表横向滚动容器。
        clear+width:100% 必须 —— overflow-x:auto 会使容器成为 BFC，
        若其前面有 width:100% 的浮动元素（管理页"添加"按钮所在的 <h5 float>），
        BFC 会被挤成 0 宽 → 表格被裁剪为不可见。clear:both 让其落到浮动下方。*/
  .list-div, #listDiv, #itemListDiv, .table-responsive, .mbsn-table-scroll{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    clear: both;
    width: 100%;
  }
  /* 2) 强制表格保持自然宽度，不被容器压缩 —— 这样横向滚动才会生效。
        保留 Bootstrap 的 width:100%，仅加 min-width，避免改 width 触发表格布局怪异。*/
  .list-div > table, #listDiv > table, #itemListDiv > table,
  .table-responsive > table, .mbsn-table-scroll > table{
    min-width: 720px;
  }
  /* 3) 表头不换行，列标题完整 */
  .list-div table thead th, #listDiv table thead th,
  #itemListDiv table thead th, .mbsn-table-scroll table thead th,
  .table-responsive table thead th{ white-space: nowrap; }
  /* 4) 任何固定像素宽度的输入控件不得撑破视口 */
  input[type=text], input[type=password], input[type=search],
  input[type=number], input[type=tel], input[type=email],
  input[type=url], select, textarea{ max-width: 100%; }
  /* 5) 富文本正文里的图片/表格不溢出 */
  .article-content img, .article-content table,
  .page-content img, .page-content table{ max-width: 100%; height: auto; }
}
