/*
Theme Name: 江西梅赛德贸易商城
Theme URI: https://example.com/jiangxi-meside
Author: 江西梅赛德贸易有限公司
Description: 江西梅赛德贸易有限公司综合采购商城主题，采用红色电商平台布局，不依赖 WooCommerce。
Version: 1.0.0
Text Domain: jiangxi-meside
*/

:root {
  --msd-red: #e1251b;
  --msd-red-dark: #b71912;
  --msd-ink: #242424;
  --msd-muted: #777;
  --msd-paper: #f5f5f5;
  --msd-white: #fff;
  --msd-line: #e5e5e5;
  --msd-gold: #f5c453;
  --msd-blue: #1769aa;
  --msd-shell: 1200px;
  --msd-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--msd-ink);
  background: var(--msd-paper);
  font-family: var(--msd-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
.msd-shell { width: min(calc(100% - 32px), var(--msd-shell)); margin: 0 auto; }
.msd-topbar { background: #f2f2f2; color: #666; font-size: 12px; }
.msd-topbar__inner { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.msd-topbar__links { display: flex; gap: 17px; }
.msd-topbar a:hover { color: var(--msd-red); }
.msd-header { background: var(--msd-white); border-bottom: 1px solid var(--msd-line); }
.msd-header__main { min-height: 94px; display: grid; grid-template-columns: 270px 1fr 170px; gap: 28px; align-items: center; }
.msd-logo { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.msd-logo__mark { width: 49px; height: 49px; display: grid; place-items: center; background: var(--msd-red); color: #fff; font-size: 25px; font-weight: 900; border-radius: 6px; }
.msd-logo strong, .msd-logo small { display: block; }
.msd-logo strong { font-size: 22px; line-height: 1.1; letter-spacing: .04em; white-space: nowrap; }
.msd-logo small { margin-top: 4px; color: #888; font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
.msd-search { height: 42px; display: flex; border: 2px solid var(--msd-red); background: #fff; }
.msd-search input { min-width: 0; flex: 1; padding: 0 14px; border: 0; outline: 0; color: var(--msd-ink); }
.msd-search button { width: 78px; border: 0; background: var(--msd-red); color: #fff; cursor: pointer; font-size: 15px; font-weight: 900; }
.msd-search button:hover { background: var(--msd-red-dark); }
.msd-header__tools { display: flex; justify-content: flex-end; gap: 12px; }
.msd-header__tool { min-width: 68px; position: relative; display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; cursor: pointer; color: #666; font-size: 12px; }
.msd-header__tool svg { width: 23px; height: 23px; }
.msd-header__tool:hover { color: var(--msd-red); }
.msd-cart-count { min-width: 18px; height: 18px; position: absolute; top: -7px; right: 4px; display: grid; place-items: center; padding: 0 4px; border-radius: 10px; background: var(--msd-red); color: #fff; font-size: 10px; }
.msd-nav { background: var(--msd-red); color: #fff; }
.msd-nav__inner { min-height: 42px; display: flex; align-items: center; }
.msd-category-trigger { width: 220px; height: 42px; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px; border: 0; background: var(--msd-red-dark); color: #fff; cursor: pointer; font-weight: 900; }
.msd-category-trigger svg { width: 18px; height: 18px; }
.msd-nav__links { display: flex; align-items: center; gap: 31px; padding-left: 30px; }
.msd-nav__links a { height: 42px; display: flex; align-items: center; font-size: 14px; font-weight: 800; }
.msd-nav__links a:hover { color: var(--msd-gold); }
.msd-menu-toggle { display: none; }

.msd-hero { padding: 16px 0; background: var(--msd-paper); }
.msd-hero__grid { display: grid; grid-template-columns: 220px 1fr 230px; gap: 10px; }
.msd-category-panel { background: var(--msd-white); border: 1px solid var(--msd-line); }
.msd-category-panel__head { padding: 15px 16px 10px; color: var(--msd-red); font-size: 15px; font-weight: 900; }
.msd-category-panel__list { margin: 0; padding: 0 0 9px; list-style: none; }
.msd-category-panel__list a { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; color: #555; font-size: 13px; }
.msd-category-panel__list a:hover { background: #fff2f1; color: var(--msd-red); }
.msd-category-panel__list span { color: #aaa; }
.msd-hero__feature { min-height: 382px; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; background: #f9ddd2; }
.msd-hero__copy { padding: 48px 35px; background: #f8d8cb; }
.msd-eyebrow { margin: 0 0 12px; color: var(--msd-red); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.msd-hero h1 { margin: 0; color: #201c1b; font-size: 46px; line-height: 1.1; letter-spacing: -.04em; }
.msd-hero h1 span { color: var(--msd-red); }
.msd-hero__copy p:not(.msd-eyebrow) { max-width: 290px; margin: 20px 0 26px; color: #625b58; font-size: 14px; line-height: 1.8; }
.msd-primary-button { min-height: 39px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--msd-red); color: #fff; cursor: pointer; font-size: 13px; font-weight: 900; }
.msd-primary-button:hover { background: var(--msd-red-dark); }
.msd-hero__image { overflow: hidden; }
.msd-hero__image img { width: 100%; height: 100%; object-fit: cover; }
.msd-promo-stack { display: grid; gap: 10px; }
.msd-promo-card { min-height: 186px; padding: 22px 20px; position: relative; overflow: hidden; }
.msd-promo-card--one { background: #dcecf7; }
.msd-promo-card--two { background: #fff0bd; }
.msd-promo-card strong, .msd-promo-card span, .msd-promo-card small { display: block; position: relative; z-index: 1; }
.msd-promo-card strong { font-size: 20px; }
.msd-promo-card span { margin-top: 5px; color: #555; font-size: 12px; }
.msd-promo-card small { margin-top: 20px; color: var(--msd-red); font-size: 11px; font-weight: 900; }
.msd-promo-card::after { width: 100px; height: 100px; position: absolute; right: -26px; bottom: -25px; border-radius: 50%; background: rgba(255,255,255,.65); content: ""; }
.msd-benefits { background: var(--msd-white); border-bottom: 1px solid var(--msd-line); }
.msd-benefits__grid { min-height: 72px; display: grid; grid-template-columns: repeat(4, 1fr); }
.msd-benefit { display: flex; align-items: center; justify-content: center; gap: 11px; border-right: 1px solid var(--msd-line); }
.msd-benefit:last-child { border-right: 0; }
.msd-benefit svg { width: 25px; height: 25px; color: var(--msd-red); }
.msd-benefit strong, .msd-benefit span { display: block; }
.msd-benefit strong { font-size: 13px; }
.msd-benefit span { color: #888; font-size: 11px; }

.msd-section { padding: 30px 0 0; }
.msd-section__head { min-height: 39px; display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; border-bottom: 2px solid var(--msd-red); }
.msd-section__title { display: flex; align-items: baseline; gap: 12px; }
.msd-section__title h2 { margin: 0; font-size: 24px; line-height: 1; }
.msd-section__title span { color: var(--msd-red); font-size: 13px; font-weight: 900; }
.msd-section__more { margin-bottom: 5px; color: #888; font-size: 12px; }
.msd-section__more:hover { color: var(--msd-red); }
.msd-scene-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.msd-scene { min-height: 130px; display: flex; align-items: end; padding: 18px; position: relative; overflow: hidden; }
.msd-scene--a { background: #dcecf7; }
.msd-scene--b { background: #fce3d7; }
.msd-scene--c { background: #e5f2d7; }
.msd-scene--d { background: #eee2fa; }
.msd-scene strong, .msd-scene small { display: block; position: relative; z-index: 1; }
.msd-scene strong { font-size: 19px; }
.msd-scene small { margin-top: 4px; color: #6c6c6c; font-size: 11px; }
.msd-scene::after { width: 105px; height: 105px; position: absolute; right: -23px; bottom: -34px; border-radius: 50%; background: rgba(255,255,255,.5); content: ""; }
.msd-scene:hover { box-shadow: inset 0 -3px var(--msd-red); }

.msd-product-zone { margin-top: 30px; padding: 0 0 60px; }
.msd-product-zone__layout { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.msd-product-filter { background: var(--msd-white); border: 1px solid var(--msd-line); align-self: start; }
.msd-product-filter__head { padding: 16px; background: #fafafa; border-bottom: 1px solid var(--msd-line); font-weight: 900; }
.msd-filter-list { display: grid; padding: 8px 0; }
.msd-filter { min-height: 40px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; cursor: pointer; color: #555; text-align: left; }
.msd-filter:hover, .msd-filter.is-active { background: #fff1f0; color: var(--msd-red); font-weight: 900; }
.msd-filter b { color: #aaa; font-size: 11px; }
.msd-filter.is-active b { color: var(--msd-red); }
.msd-product-area { min-width: 0; }
.msd-product-toolbar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 12px; background: var(--msd-white); border: 1px solid var(--msd-line); }
.msd-product-toolbar span { color: #888; font-size: 12px; }
.msd-product-toolbar button { border: 0; background: transparent; cursor: pointer; color: var(--msd-red); font-weight: 900; }
.msd-product-toolbar b { min-width: 19px; height: 19px; display: inline-grid; place-items: center; margin-left: 4px; border-radius: 50%; background: var(--msd-red); color: #fff; font-size: 10px; }
.msd-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.msd-product { min-width: 0; overflow: hidden; background: var(--msd-white); border: 1px solid transparent; }
.msd-product:hover { border-color: var(--msd-red); }
.msd-product[hidden] { display: none; }
.msd-product__image { aspect-ratio: 1 / 1; position: relative; overflow: hidden; background: #eee; }
.msd-product__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.msd-product:hover .msd-product__image img { transform: scale(1.04); }
.msd-product__badge { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 4px 6px; background: var(--msd-red); color: #fff; font-size: 10px; }
.msd-product__save { width: 28px; height: 28px; position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); cursor: pointer; color: #999; }
.msd-product__save svg { width: 15px; height: 15px; }
.msd-product__save.is-saved { color: var(--msd-red); }
.msd-product__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px; }
.msd-product__buttons button { min-height: 32px; border: 0; cursor: pointer; font-size: 11px; font-weight: 900; }
.msd-product__add { background: #fff1f0; color: var(--msd-red); }
.msd-product__buy { background: var(--msd-red); color: #fff; }
.msd-product__info { padding: 0 11px 12px; }
.msd-product__info h3 { min-height: 42px; margin: 0; font-size: 14px; line-height: 1.5; font-weight: 500; }
.msd-product__type { min-height: 18px; margin: 5px 0; overflow: hidden; color: #999; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.msd-product__price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.msd-product__price strong { color: var(--msd-red); font-size: 20px; line-height: 1; }
.msd-product__price span { color: #aaa; font-size: 10px; }
.msd-empty { padding: 40px; background: #fff; color: #888; text-align: center; }

.msd-service-band { padding: 24px 0 50px; }
.msd-service-band__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.msd-service-card { min-height: 130px; display: flex; align-items: center; gap: 18px; padding: 20px; background: var(--msd-white); }
.msd-service-card svg { width: 38px; height: 38px; color: var(--msd-red); }
.msd-service-card strong, .msd-service-card span { display: block; }
.msd-service-card strong { font-size: 16px; }
.msd-service-card span { margin-top: 5px; color: #888; font-size: 12px; }

.msd-footer { padding: 36px 0 22px; background: #2d2d2d; color: #ccc; }
.msd-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 35px; padding-bottom: 28px; }
.msd-footer .msd-logo__mark { background: var(--msd-red); }
.msd-footer .msd-logo strong { color: #fff; }
.msd-footer .msd-logo small { color: #999; }
.msd-footer__brand p { max-width: 310px; margin: 15px 0 0; color: #aaa; font-size: 12px; line-height: 1.8; }
.msd-footer__title { margin: 4px 0 14px; color: #fff; font-weight: 900; }
.msd-footer__links { display: grid; gap: 8px; font-size: 12px; }
.msd-footer__links a:hover { color: #fff; }
.msd-footer__bottom { padding-top: 18px; border-top: 1px solid #555; color: #999; font-size: 11px; text-align: center; }

.msd-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.msd-backdrop.is-open { opacity: 1; pointer-events: auto; }
.msd-drawer { width: min(440px, 100%); position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; display: flex; flex-direction: column; overflow-y: auto; padding: 22px; background: var(--msd-white); transform: translateX(100%); transition: transform .25s ease; }
.msd-drawer.is-open { transform: translateX(0); }
.msd-drawer__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--msd-line); }
.msd-drawer__head small { color: var(--msd-red); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.msd-drawer__head h2 { margin: 4px 0 0; font-size: 25px; }
.msd-close { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--msd-line); background: transparent; cursor: pointer; }
.msd-close svg { width: 17px; height: 17px; }
.msd-cart-items { flex: 1; padding: 20px 0; }
.msd-empty-cart { color: #888; font-size: 13px; }
.msd-cart-item { display: grid; grid-template-columns: 62px 1fr auto; gap: 11px; align-items: center; margin-bottom: 17px; }
.msd-cart-item img { width: 62px; height: 62px; object-fit: cover; }
.msd-cart-item__name { margin: 0 0 3px; font-size: 13px; font-weight: 900; }
.msd-cart-item__price { margin: 0; color: var(--msd-red); font-size: 12px; }
.msd-cart-item__remove { border: 0; background: transparent; cursor: pointer; color: #999; font-size: 18px; }
.msd-quantity { width: max-content; display: flex; margin-top: 7px; border: 1px solid var(--msd-line); }
.msd-quantity button { width: 25px; height: 24px; border: 0; background: #fafafa; cursor: pointer; }
.msd-quantity span { min-width: 28px; display: grid; place-items: center; font-size: 12px; }
.msd-drawer__foot { padding-top: 16px; border-top: 1px solid var(--msd-line); }
.msd-total { display: flex; justify-content: space-between; margin: 0 0 12px; }
.msd-total strong { color: var(--msd-red); font-size: 20px; }
.msd-drawer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.msd-drawer__actions button { width: 100%; min-height: 42px; }
.msd-checkout { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--msd-line); }
.msd-checkout[hidden] { display: none; }
.msd-checkout h3 { margin: 0 0 12px; font-size: 16px; }
.msd-order-form { display: grid; gap: 10px; }
.msd-order-form label { display: grid; gap: 5px; color: #777; font-size: 11px; font-weight: 800; }
.msd-order-form input, .msd-order-form textarea { width: 100%; padding: 10px; border: 1px solid var(--msd-line); outline: 0; background: #fff; resize: vertical; }
.msd-order-form input:focus, .msd-order-form textarea:focus { border-color: var(--msd-red); }
.msd-order-form button { min-height: 42px; border: 0; background: var(--msd-red); color: #fff; cursor: pointer; font-weight: 900; }
.msd-order-note { display: none; margin: 0; color: var(--msd-red); font-size: 12px; }
.msd-order-note.is-visible { display: block; }
.msd-honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.msd-toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 12px 16px; background: #333; color: #fff; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.msd-toast.is-visible { opacity: 1; transform: translateY(0); }
.msd-mobile-nav { display: none; }

@media (max-width: 960px) {
  .msd-header__main { grid-template-columns: 235px 1fr 110px; gap: 16px; }
  .msd-logo strong { font-size: 18px; }
  .msd-logo__mark { width: 42px; height: 42px; }
  .msd-header__tool { min-width: 45px; }
  .msd-header__tool span { font-size: 0; }
  .msd-hero__grid { grid-template-columns: 190px 1fr; }
  .msd-promo-stack { display: none; }
  .msd-product-zone__layout { grid-template-columns: 180px 1fr; }
  .msd-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .msd-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .msd-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { padding-bottom: 57px; }
  .msd-shell { width: min(calc(100% - 20px), var(--msd-shell)); }
  .msd-topbar__inner { min-height: 28px; font-size: 10px; }
  .msd-topbar__links { display: none; }
  .msd-header__main { min-height: 74px; grid-template-columns: 1fr 48px; gap: 10px; }
  .msd-logo { justify-self: start; }
  .msd-logo__mark { width: 38px; height: 38px; font-size: 20px; }
  .msd-logo strong { font-size: 16px; }
  .msd-logo small { font-size: 7px; }
  .msd-header__tools { justify-content: end; }
  .msd-header__tools .msd-header__tool:first-child { display: none; }
  .msd-header__tool { min-width: 38px; }
  .msd-header__tool svg { width: 22px; height: 22px; }
  .msd-header__tool span { display: none; }
  .msd-search { grid-column: 1 / -1; grid-row: 2; height: 39px; margin-bottom: 10px; }
  .msd-header__main { padding: 9px 0 11px; }
  .msd-header__main { min-height: 124px; }
  .msd-search button { width: 64px; font-size: 13px; }
  .msd-nav__inner { min-height: 40px; }
  .msd-category-trigger { width: 135px; padding: 0 10px; font-size: 12px; }
  .msd-nav__links { gap: 18px; padding-left: 17px; overflow-x: auto; white-space: nowrap; }
  .msd-nav__links a { font-size: 12px; }
  .msd-hero { padding: 10px 0; }
  .msd-hero__grid { display: block; }
  .msd-category-panel { display: none; }
  .msd-hero__feature { min-height: 400px; display: flex; flex-direction: column; }
  .msd-hero__copy { min-height: 235px; padding: 30px 22px 25px; }
  .msd-hero h1 { font-size: 36px; }
  .msd-hero__copy p:not(.msd-eyebrow) { margin: 13px 0 18px; font-size: 12px; line-height: 1.6; }
  .msd-hero__image { min-height: 165px; }
  .msd-benefits__grid { grid-template-columns: repeat(2, 1fr); }
  .msd-benefit { min-height: 62px; justify-content: flex-start; padding-left: 16px; }
  .msd-benefit:nth-child(2) { border-right: 0; }
  .msd-benefit:nth-child(3), .msd-benefit:nth-child(4) { border-top: 1px solid var(--msd-line); }
  .msd-section { padding-top: 22px; }
  .msd-section__title h2 { font-size: 20px; }
  .msd-scene-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .msd-scene { min-height: 104px; padding: 12px; }
  .msd-scene strong { font-size: 15px; }
  .msd-scene small { font-size: 9px; }
  .msd-product-zone { margin-top: 22px; padding-bottom: 35px; }
  .msd-product-zone__layout { display: block; }
  .msd-product-filter { margin-bottom: 10px; }
  .msd-product-filter__head { padding: 11px 12px; }
  .msd-filter-list { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
  .msd-filter { min-height: 31px; padding: 0 10px; border: 1px solid var(--msd-line); white-space: nowrap; font-size: 11px; }
  .msd-product-toolbar { padding: 0 9px; }
  .msd-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .msd-product__buttons { padding: 6px; gap: 4px; }
  .msd-product__buttons button { min-height: 31px; font-size: 9px; }
  .msd-product__info { padding: 0 8px 10px; }
  .msd-product__info h3 { min-height: 40px; font-size: 12px; }
  .msd-product__type { font-size: 9px; }
  .msd-product__price strong { font-size: 17px; }
  .msd-service-band { padding: 12px 0 26px; }
  .msd-service-band__grid { grid-template-columns: 1fr; gap: 8px; }
  .msd-service-card { min-height: 82px; padding: 14px; }
  .msd-service-card svg { width: 30px; height: 30px; }
  .msd-service-card strong { font-size: 14px; }
  .msd-footer { padding-bottom: 15px; }
  .msd-footer__grid { grid-template-columns: 1fr 1fr; gap: 25px 16px; }
  .msd-footer__brand { grid-column: 1 / -1; }
  .msd-footer__bottom { font-size: 9px; }
  .msd-mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; height: 57px; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--msd-line); }
  .msd-mobile-nav a, .msd-mobile-nav button { display: grid; place-items: center; align-content: center; gap: 2px; border: 0; background: transparent; color: #666; font-size: 10px; }
  .msd-mobile-nav svg { width: 19px; height: 19px; }
  .msd-mobile-nav .is-primary { color: var(--msd-red); }
  .msd-drawer { padding: 19px 16px; }
}
