/* R11 template "modern" — bright mall theme in the JD / Xiaomi-mall
   skeleton: light #f7f7f8 ground, white cards, ink text, mall red-orange
   #ee3f16 as the primary (buttons / prices / selected states), flat
   hairline borders instead of heavy shadows, radius 12-16, larger titles.
   Loaded by views/layout.php only when setting home_template = 'modern'.
   Everything is scoped under body.theme-modern; classic/deepsea untouched.
   Desktop (>=1024px) and mobile (<1024px) are two different layouts:
   desktop gets a 1200px container, header search, category nav row,
   carousel + side rail, 4-column grid and a multi-column footer;
   mobile keeps the App-style top bar, search capsule, full-width
   carousel, horizontal chips, 2-column grid and the bottom tab bar. */

body.theme-modern{
  --blue:#ee3f16; --blue-dark:#cf340f;
  --bg:#f7f7f8;
  --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.05);
}

/* Prices in mall red-orange across home + detail + buy bar */
body.theme-modern .price{color:#ee3f16;font-size:20px}
body.theme-modern .p-price{color:#ee3f16}
body.theme-modern .buybar-price{color:#ee3f16}

/* Flat cards site-wide under this theme */
body.theme-modern .card{border:1px solid #ececf0;box-shadow:none}

/* ---------- Header ---------- */
body.theme-modern header.top{border-bottom:1px solid #ececf0}
body.theme-modern .top-search{display:none}
@media (min-width:1024px){
  body.theme-modern header.top .in{max-width:1200px;padding:14px 20px;gap:30px}
  body.theme-modern .top-search{display:flex;flex:1;max-width:580px;margin:0 auto;height:42px;
    border:2px solid #ee3f16;border-radius:999px;overflow:hidden;background:#fff}
  body.theme-modern .top-search input{flex:1;min-width:0;border:none;outline:none;padding:0 18px;font-size:14.5px;background:transparent}
  body.theme-modern .top-search button{display:inline-flex;align-items:center;gap:5px;border:none;cursor:pointer;
    background:#ee3f16;color:#fff;font-size:15px;font-weight:600;padding:0 26px}
  body.theme-modern .top-search button:active{background:#cf340f}
  body.theme-modern[data-nav-list] .wrap{max-width:1200px;padding:0 20px 48px}
}

/* ---------- Category nav row (desktop only) ---------- */
body.theme-modern .catnav{display:none}
@media (min-width:1024px){
  body.theme-modern .catnav{display:flex;gap:30px;align-items:center;
    padding:12px 2px 10px;border-bottom:1px solid #ececf0}
  body.theme-modern .catnav a{color:#111827;font-size:15.5px;font-weight:500}
  body.theme-modern .catnav a.on{color:#ee3f16;font-weight:700}
}

/* ---------- Mobile search capsule (desktop uses header search) ---------- */
body.theme-modern .m-search-top{margin:12px 0 0}
body.theme-modern .m-search-top input{border-radius:999px;border-color:#e4e4e7;padding:0 16px}
body.theme-modern .m-search-top .btn{border-radius:999px;min-width:74px}
@media (min-width:1024px){ body.theme-modern .m-search-top{display:none} }

/* ---------- Hero row: carousel + side rail (desktop) ---------- */
body.theme-modern .m-hero{margin-top:14px}
body.theme-modern .m-hero .carousel{margin-top:0;border-radius:14px;box-shadow:none;border:1px solid #ececf0}
body.theme-modern .m-side{display:none}
@media (min-width:1024px){
  body.theme-modern .m-hero{display:grid;grid-template-columns:minmax(0,1fr) 302px;gap:14px;align-items:stretch}
  body.theme-modern .m-hero.solo{grid-template-columns:1fr}
  body.theme-modern .m-hero .carousel{height:100%}
  body.theme-modern .m-side{display:flex;flex-direction:column;background:#fff;
    border:1px solid #ececf0;border-radius:14px;padding:16px 16px 8px}
  body.theme-modern .m-side-h{display:flex;align-items:center;gap:6px;font-weight:700;font-size:14.5px}
  body.theme-modern .m-side-h svg{color:#ee3f16}
  body.theme-modern .m-side-sec p{margin-top:6px;font-size:13px;color:#6b7280;line-height:1.6}
  body.theme-modern .m-quick{display:flex;flex-direction:column;margin-top:10px;border-top:1px dashed #ececf0}
  body.theme-modern .m-quick a{display:flex;align-items:center;gap:10px;padding:11px 2px;color:#111827;border-bottom:1px solid #f4f4f5}
  body.theme-modern .m-quick a:last-child{border-bottom:none}
  body.theme-modern .m-quick a>svg{margin-left:auto;color:#c6c9cf;flex:0 0 auto}
  body.theme-modern .m-quick .qt{display:flex;flex-direction:column}
  body.theme-modern .m-quick .qt b{font-size:14px}
  body.theme-modern .m-quick .qt small{font-size:12px;color:#9ca3af}
}

/* Shared tinted icon tiles (side rail + promise bar) */
body.theme-modern .qi{display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:11px;flex:0 0 auto}
body.theme-modern .qi.q1{background:#fff1ec;color:#ee3f16}
body.theme-modern .qi.q2{background:#eef4ff;color:#2563eb}
body.theme-modern .qi.q3{background:#ecfdf5;color:#059669}
body.theme-modern .qi.q4{background:#f5f0ff;color:#7c3aed}

/* ---------- Notice: warm strip on mobile, side rail covers desktop ---------- */
body.theme-modern .notice{display:flex;align-items:center;gap:8px;
  background:#fff4f0;border-color:#ffd9cc;color:#8a2a0c}
body.theme-modern .notice svg{color:#ee3f16}
@media (min-width:1024px){ body.theme-modern .m-notice{display:none} }

/* Chips are the mobile category control; desktop uses the nav row */
@media (min-width:1024px){ body.theme-modern .chips{display:none} }

/* ---------- Service promise bar ---------- */
body.theme-modern .m-promise{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
body.theme-modern .m-promise .mp{display:flex;align-items:center;gap:10px;
  background:#fff;border:1px solid #ececf0;border-radius:12px;padding:11px 12px}
body.theme-modern .m-promise .mp-t{display:flex;flex-direction:column;min-width:0}
body.theme-modern .m-promise .mp-t b{font-size:13.5px;white-space:nowrap}
body.theme-modern .m-promise .mp-t small{font-size:11.5px;color:#9ca3af;white-space:nowrap}
@media (min-width:1024px){
  body.theme-modern .m-promise{grid-template-columns:repeat(4,1fr);gap:14px;
    background:#fff;border:1px solid #ececf0;border-radius:14px;padding:16px 18px}
  body.theme-modern .m-promise .mp{border:none;padding:0}
}

/* ---------- Product section head ---------- */
body.theme-modern .m-sec{display:flex;align-items:baseline;gap:10px;margin:20px 0 4px}
body.theme-modern .m-sec h2{font-size:20px;font-weight:800;letter-spacing:.3px}
body.theme-modern .m-sec a{margin-left:auto;font-size:13px;color:#6b7280}
@media (min-width:1024px){ body.theme-modern .m-sec h2{font-size:24px} }

/* ---------- Product grid + cards ---------- */
@media (max-width:1023px){ body.theme-modern .grid{grid-template-columns:1fr 1fr} }
@media (min-width:1024px){ body.theme-modern .grid{grid-template-columns:repeat(4,1fr);gap:16px} }
body.theme-modern .pcard{border:1px solid #ececf0;box-shadow:none;border-radius:14px;
  transition:transform .16s ease,box-shadow .16s ease}
body.theme-modern .pcard .cov{background:#f4f4f5}
body.theme-modern .pcard .cov .ph{color:#c6c9cf}
body.theme-modern .pcard h3{font-size:15.5px}
body.theme-modern .pcard:active{transform:scale(.985)}
@media (hover:hover) and (min-width:1024px){
  body.theme-modern .pcard:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(16,24,40,.10)}
}

/* ---------- Desktop multi-column footer (mobile keeps tab bar) ---------- */
body.theme-modern .site-footer{display:none}
@media (min-width:1024px){
  body.theme-modern .wrap>footer{display:none}
  body.theme-modern .site-footer{display:block;background:#fff;border-top:1px solid #ececf0;
    margin-top:10px;padding:0;text-align:left}
  body.theme-modern .sf-in{max-width:1200px;margin:0 auto;padding:26px 20px 16px}
  body.theme-modern .sf-cols{display:grid;grid-template-columns:.92fr .92fr 1.05fr 1.65fr;gap:30px}
  body.theme-modern .sf-col h4{font-size:14px;font-weight:600;margin-bottom:11px;color:#111827}
  body.theme-modern .sf-col a,body.theme-modern .sf-col span{display:block;font-size:13px;line-height:1.5;color:#6b7280;padding:3px 0}
  body.theme-modern .sf-col a{transition:color .15s ease}
  body.theme-modern .sf-col a:hover{color:#ee3f16}
  body.theme-modern .sf-logo{display:flex;align-items:center;gap:9px;font-size:17px;line-height:1;color:#111827}
  body.theme-modern .sf-logo .logo-mark{flex:0 0 auto}
  body.theme-modern .sf-logo b{font-weight:700;line-height:1.2}
  body.theme-modern .sf-brand p{margin-top:8px;font-size:13px;color:#6b7280;line-height:1.6;text-align:left;max-width:320px}
  body.theme-modern .sf-bottom{margin-top:22px;padding-top:13px;border-top:1px solid #e9e9ee;
    text-align:center;font-size:12px;color:#9ca3af}
}
