/* Shared customer navigation and phone layouts. */
:root {
  --mobile-shop-width: 540px;
  --mobile-shop-accent: #ce451c;
  --mobile-shop-ink: #202635;
  --mobile-shop-muted: #606a79;
  --mobile-shop-line: #ebe8e5;
  --mobile-shop-bg: #f5f5f7;
  --mobile-shop-tab-height: calc(58px + env(safe-area-inset-bottom, 0px));
  --mobile-shop-bar-height: calc(48px + env(safe-area-inset-top, 0px));
}

.mobile-shop-bar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center; text-align: center; box-sizing: border-box;
  min-height: var(--mobile-shop-bar-height); padding: env(safe-area-inset-top, 0px) 6px 0;
  background: white; color: var(--mobile-shop-ink); border-bottom: 1px solid var(--mobile-shop-line);
}
.mobile-shop-bar > :is(a,button) {
  display: grid; place-items: center; min-height: 44px; padding: 0;
  border: 0; background: transparent; color: inherit; text-decoration: none; font-size: 23px;
}
.mobile-shop-bar strong { font-size: 16px; }
.mobile-shop-tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 100;
  box-sizing: border-box; display: grid; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column;
  width: min(100%, var(--mobile-shop-width)); height: var(--mobile-shop-tab-height);
  padding: 0 0 env(safe-area-inset-bottom,0px); background: white;
  border-top: 1px solid var(--mobile-shop-line);
}
.mobile-shop-tabs > :is(a,button) {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; padding: 0 3px; border: 0; background: none; color: var(--mobile-shop-muted);
  text-decoration: none; font: 500 11px/1.25 var(--font-ui);
}
.mobile-shop-tabs i { font-size: 22px; line-height: 1; }
.mobile-shop-tabs [aria-current="page"] { color: var(--mobile-shop-accent); font-weight: 700; }
.product-mobile-bar { display: none; }

.mobile-storefront body:has(:is(#pg-me,#pg-product).active) { background: var(--mobile-shop-bg); }
.mobile-storefront body:has(:is(#pg-me,#pg-product).active) :is(#mobile-nav,#chat-fab,.global-sidebar) { display: none !important; }
.mobile-storefront :is(#pg-me,#pg-product) {
  max-width: var(--mobile-shop-width); min-height: 100dvh; margin-inline: auto;
}
#pg-me .ma-mobile { min-height: 100dvh; background: var(--mobile-shop-bg); color: var(--mobile-shop-ink); }
#pg-me .ma-mobile .ma-main { padding: 12px 12px 24px; min-width: 0; }
#pg-me .ma-mobile[data-member-panel="home"] .ma-main { padding-bottom: calc(var(--mobile-shop-tab-height) + 18px); }
.ma-mobile[data-member-panel="home"] .ma-mobile-bar button { visibility: hidden; }
.ma-mobile:not([data-member-panel="home"]) .mobile-shop-tabs { display: none; }
#pg-me .ma-mobile :is(.ma-page-title,.ma-breadcrumb,.ma-order-tasks,.ma-recharge-entry,.ma-balance-meta) { display: none; }
.ma-mobile-profile {
  display: flex; align-items: center; gap: 12px; padding: 5px 4px 14px;
}
.ma-mobile-profile > span {
  flex: 0 0 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: #ffebdf; color: var(--mobile-shop-accent); font-size: 20px; font-weight: 700;
}
.ma-mobile-profile h1 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.ma-mobile-profile p { margin: 3px 0 0; font-size: 12px; color: var(--mobile-shop-muted); }
.ma-mobile-assets {
  display: flex; width: 100%; min-height: 84px; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px; border: 1px solid #f1d8c8; border-radius: 12px;
  background: #fff3eb; color: #762e16; text-align: left;
}
.ma-mobile-assets span span { display: block; margin-bottom: 3px; font-size: 13px; font-weight: 600; }
.ma-mobile-assets strong { font-size: 27px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ma-mobile-assets small { margin-left: 5px; font-size: 11px; }
.ma-mobile-assets > span + span { display: flex; align-items: center; white-space: nowrap; font-size: 12px; }
.ma-mobile-orders,.ma-mobile-menu {
  margin-top: 12px; padding: 0 12px; border: 1px solid var(--mobile-shop-line); border-radius: 12px; background: white;
}
.ma-mobile-orders header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ma-mobile-orders h2 { margin: 0; font-size: 15px; }
.ma-mobile-orders header button {
  min-height: 44px; padding: 0; background: none; color: var(--mobile-shop-muted); font-size: 12px;
}
.ma-mobile-tasks { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding-bottom: 9px; }
.ma-mobile-tasks button {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px 0; min-height: 52px;
  background: none; color: var(--mobile-shop-ink); font-size: 12px;
}
.ma-mobile-tasks i { font-size: 22px; line-height: 1; }
.ma-mobile-tasks b {
  position: absolute; top: 1px; left: calc(50% + 6px); min-width: 16px; padding: 0 4px; border-radius: 12px;
  background: var(--mobile-shop-accent); color: white; font-size: 10px; line-height: 16px;
}
.ma-mobile-menu button {
  display: grid; grid-template-columns: 22px minmax(0,1fr) 16px; gap: 8px; align-items: center;
  width: 100%; min-height: 46px; padding: 0; background: none; color: inherit; text-align: left;
  font-size: 14px; border-bottom: 1px solid var(--mobile-shop-line);
}
.ma-mobile-menu button[hidden] { display: none; }
.ma-mobile-menu button:last-of-type,.ma-mobile-menu button:has(+ button[hidden]) { border-bottom: 0; }
.ma-mobile-menu i { font-size: 17px; color: var(--mobile-shop-muted); }
#pg-me .ma-mobile .ma-overview-grid { display: block; margin-bottom: 12px; }
#pg-me .ma-mobile .ma-balance-card {
  display: block; min-height: 0; padding: 14px; border: 1px solid #f1d8c8; border-radius: 12px;
  color: #762e16; background: #fff3eb; box-shadow: none;
}
#pg-me .ma-mobile .ma-balance-main :is(strong,em,span,b) { color: inherit; }
#pg-me .ma-mobile .ma-balance-main strong { font-size: 29px; }
#pg-me .ma-mobile .ma-balance-main small { display: none; }
#pg-me .ma-mobile .ma-balance-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
#pg-me .ma-mobile .ma-balance-actions button {
  min-width: 0; min-height: 40px; flex: 1 1 auto; padding: 0 8px; background: white;
  border: 1px solid #e7c7b6; border-radius: 8px; color: #762e16; font-size: 12px;
}
#pg-me .ma-mobile .ma-balance-actions button:first-child { color: white; background: var(--mobile-shop-accent); border-color: transparent; }
#pg-me .ma-mobile :is(.ma-asset-tabs,.ma-order-tabs) { background: white; border-radius: 10px; }
#pg-me .ma-mobile .ma-asset-tabs { gap: 20px; margin: 0 0 10px; padding: 0 12px; }
#pg-me .ma-mobile .ma-order-tabs { display: flex; height: 46px; margin-bottom: 10px; padding: 0 5px; justify-content: space-between; }
#pg-me .ma-mobile .ma-order-tabs button { flex: 0 0 auto; padding: 0 6px; font-size: 12px; white-space: nowrap; }
#pg-me .ma-mobile .ma-order-top { height: auto; min-height: 38px; padding: 8px 12px; gap: 5px 10px; flex-wrap: wrap; }
#pg-me .ma-mobile .ma-order-top span { overflow-wrap: anywhere; }
#pg-me .ma-mobile .ma-order-body { grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; padding: 10px 12px; }
#pg-me .ma-mobile .ma-order-icon { width: 36px; height: 36px; font-size: 18px; }
#pg-me .ma-mobile .ma-order-copy strong { overflow-wrap: anywhere; }
#pg-me .ma-mobile .ma-order-points { grid-column: 3; text-align: right; white-space: nowrap; }
#pg-me .ma-mobile .ma-order-actions { grid-column: 1/-1; flex-wrap: wrap; }
#pg-me .ma-mobile .ma-order-actions button { min-height: 36px; padding-inline: 10px; }
#pg-me .ma-mobile .ma-address-page-head { justify-content: space-between; margin-bottom: 8px; }
#pg-me .ma-mobile .ma-address-page-head h1,#pg-me .ma-mobile .ma-address-page-head p { display: none; }
.ma-mobile-address-parser { margin-bottom: 10px; padding: 0 12px; background: white; border-radius: 10px; }
.ma-mobile-address-parser summary { cursor: pointer; padding: 11px 0; font-size: 13px; }
.ma-mobile-address-parser summary i { margin-right: 5px; }
#pg-me .ma-mobile :is(.ma-address-section-title p,.ma-address-parser-copy,.ma-account-profile) { display: none; }
#pg-me .ma-mobile .ma-address-parser { padding: 0 0 10px; box-shadow: none; border: 0; }
#pg-me .ma-mobile .ma-address-parser-form { grid-template-columns: minmax(0,1fr); }
#pg-me .ma-mobile .ma-address-parser-form button { min-height: 40px; justify-self: end; }
#pg-me .ma-mobile .ma-security-list > div { gap: 8px; padding-inline: 12px; }
#pg-me .ma-mobile .ma-security-list span { min-width: 0; overflow-wrap: anywhere; }
#pg-me .ma-mobile .ma-security-list button { flex: none; min-height: 40px; padding-inline: 8px; }
.mobile-storefront .ma-order-overlay { padding: 0; }
.mobile-storefront .ma-order-overlay .ma-order-dialog {
  width: min(100%,var(--mobile-shop-width)); height: 100dvh; max-height: 100dvh; border-radius: 0;
}
.mobile-storefront .ma-order-dialog footer { padding-bottom: calc(10px + env(safe-area-inset-bottom,0px)); }

.mobile-storefront #pg-product { padding: 0; padding-bottom: calc(70px + env(safe-area-inset-bottom,0px)); background: var(--mobile-shop-bg); }
.mobile-storefront #pg-product > .mall-header,.mobile-storefront #pg-product .breadcrumb { display: none; }
.mobile-storefront #pg-product:not(:has(.cake-mobile-heading)) .product-mobile-bar { display: grid; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) { padding: 0 !important; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-detail-main { display: block; padding: 0; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-detail-left { max-width: 100%; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-gallery { flex-direction: column-reverse; gap: 0; min-height: 0; background: white; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-main-img {
  flex: none; width: 100%; aspect-ratio: 1; min-height: 0; border-radius: 0; background: #fafafa;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-main-img img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-thumbs { padding: 8px 12px; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-detail-right { display: flex; flex-direction: column; container: product-info / inline-size; padding: clamp(.625rem,3.6vw,.875rem); background: white; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-title { margin: 0 0 4px; font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-subtitle { margin-bottom: 8px; overflow-wrap: anywhere; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-price-block { order: -1; margin: 0 0 6px; padding: 0; background: transparent; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-price-main .jd-price-num { font-size: 29px; line-height: 1.2; color: var(--mobile-shop-accent); }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-price-points .jd-price-sym { order: 1; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-price-main .jd-price-sym { font-size: 13px; color: var(--mobile-shop-accent); }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-detail-right > :is(.jd-spec-section,.jd-actions) { display: none; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-voucher-status {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start;
  gap: .375rem .5rem; padding: .5rem; margin-bottom: .625rem;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-voucher-status small {
  overflow: visible; white-space: normal; overflow-wrap: anywhere; line-height: 1.45;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-voucher-status button {
  height: auto; min-height: 2.25rem; padding-inline: .625rem; justify-self: end;
}
@container product-info (max-width: 21rem) {
  .mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-voucher-status { grid-template-columns: auto minmax(0,1fr); }
  .mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-voucher-status button { grid-column: 2; }
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-promos { gap: 5px; margin-bottom: 10px; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-promo-tag {
  max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-delivery {
  padding: .625rem .75rem; margin-bottom: .75rem;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-dv-row { gap: .5rem; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-dv-row > :is(span,strong) {
  min-width: 0; overflow-wrap: anywhere;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-dv-row > .jd-dv-label {
  flex: none; min-width: 2.25rem;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-dv-edit {
  flex: none; min-width: 2.5rem; min-height: 2rem;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-addr-picker { gap: .5rem; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-addr-picker select {
  flex: 1 1 6rem; width: 0; min-height: 2.5rem; padding: .375rem .5rem;
  background: #fff; color: var(--mobile-shop-ink);
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-addr-picker select:focus-visible {
  outline: 2px solid var(--mobile-shop-accent); outline-offset: 1px;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-qty-row { flex-wrap: wrap; gap: .375rem .75rem; margin-bottom: 0; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-qty-sel { min-height: 2.75rem; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-stock-hint { min-width: 0; overflow-wrap: anywhere; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-spu-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,120px),1fr)); }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-spu-option { min-width: 0; overflow-wrap: anywhere; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-tabs { top: var(--mobile-shop-bar-height); margin-top: .5rem; padding-inline: .25rem; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-tab {
  flex: 1 1 0; min-width: 0; min-height: 2.75rem; margin-bottom: 0;
  padding: .5rem .125rem; font-size: .75rem; line-height: 1.3; white-space: normal; overflow-wrap: anywhere;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-tab-content { padding: .625rem .75rem 1.125rem; overflow-wrap: anywhere; }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-related-grid {
  grid-template-columns: repeat(auto-fill,minmax(min(100%,8rem),1fr)); gap: .5rem;
}
.mobile-storefront #pg-product:not(:has(.cake-mobile-detail)) .jd-sticky-bar {
  flex-wrap: nowrap; width: min(100%,var(--mobile-shop-width)); left: 50%; right: auto; transform: translateX(-50%);
  padding: .4375rem clamp(.375rem,2.5vw,.625rem) calc(.4375rem + env(safe-area-inset-bottom,0px)); gap: .5rem; z-index: 100;
}
.mobile-storefront #pg-product:not(:has(.cake-mobile-detail)) :is(.jd-sb-left,.jd-sb-qty) { display: none; }
.mobile-storefront #pg-product:not(:has(.cake-mobile-detail)) .jd-sb-actions {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); flex: 1; min-width: 0; margin: 0; gap: .5rem;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-sb-actions button {
  height: auto; min-height: 2.75rem; padding: .5rem .25rem; border-radius: .625rem;
  font-size: .875rem; line-height: 1.25; white-space: normal; overflow-wrap: anywhere;
}
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-sb-buy { background: var(--mobile-shop-accent); }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-sb-cart { border: 1px solid #ecc5b6; background: #fff3eb; color: var(--mobile-shop-accent); }
.mobile-storefront #pd-content:not(.cake-mobile-detail) .jd-sb-actions button:disabled { opacity: .55; }
.mobile-shop-support { display: none; }
.mobile-storefront #pg-product:not(:has(.cake-mobile-detail)) .mobile-shop-support {
  display: grid; place-items: center; gap: 2px; min-width: 44px; min-height: 44px; padding: 0;
  background: none; border: 0; color: var(--mobile-shop-ink); font-size: 11px;
}
.mobile-shop-support i { font-size: 21px; line-height: 1; }

.notification-mobile-bar { display: none; }
@media (max-width: 767px) {
  body.notification-page { padding: 0 0 env(safe-area-inset-bottom,0px); background: var(--mobile-shop-bg); }
  .notification-page > .notification-mobile-bar { display: grid; margin: 0; }
  .notification-page > .notification-desktop-bar { display: none; }
  .notification-page #notification-page { max-width: var(--mobile-shop-width); padding: 10px 12px; margin: auto; }
  .notification-page .nc-center .nc-body { margin-top: 0; }
  .notification-page .nc-operations-list .nc-dense-row { grid-template-columns: 18px minmax(0,1fr) auto; gap: 5px 8px; }
  .notification-page .nc-dense-row .nc-message-content { grid-column: 2/-1; }
  .notification-page .nc-operations-list .nc-dense-row time { grid-column: 3; grid-row: 1; }
  .notification-page .nc-operations-list .nc-row-actions { grid-column: 2/-1; grid-row: 3; }
  .notification-page .nc-search label { flex: 1 1 41%; }
  .notification-page .nc-search input[type=date] { width: 100%; }
  .notification-page .nc-search input[name=end] { flex: 1 1 37%; }
  .notification-page .nc-search button[type=submit] { margin-left: auto; }
  .notification-page .nc-message-content :is(.nc-preview,strong) { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
}

.cart-mobile-bar,#cart-mobile-tabs { display: none; }
@media (max-width: 767px) {
  .mobile-shop-cart .cart-mobile-bar { display: grid; }
  #cart-mobile-tabs { display: block; }
  .mobile-shop-cart .cart-header { display: none; }
  .mobile-shop-cart .es-icon { color: var(--mobile-shop-muted); font-size: 44px; animation: none; }
  .mobile-shop-cart .cart-bar { bottom: var(--mobile-shop-tab-height); }
  .mobile-shop-cart .cart-main { padding-bottom: calc(var(--mobile-shop-tab-height) + 86px); }
}
