/* ---------- Marketplace home template (real-data edition) ---------- */

.mk {
  --mk-red: #c2312f;
  --mk-red-soft: #fdeceb;
  padding-block: 16px 40px;
  background: var(--bg-2);
}

.mk .shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* search */
.mk-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 5px 5px 16px;
  box-shadow: var(--shadow-s);
}
.mk-search svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
}
.mk-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  padding: 8px 0;
  outline: none;
}
.mk-search button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fdf7f2;
  font: inherit;
  font-size: 12.5px;
  padding: 9px 18px;
  cursor: pointer;
}
.mk-search button:hover {
  background: var(--rose-deep);
}

/* category wall */
.mk-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 6px;
  background: var(--panel);
  border-radius: var(--r-md);
  padding: 14px 10px;
}
.mk-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  color: var(--ink-2);
  text-decoration: none;
}
.mk-cat__thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--blush);
  display: grid;
  place-items: center;
}
.mk-cat__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mk-cat__thumb i {
  font-style: normal;
  font-size: 15px;
  color: var(--rose-deep);
}
.mk-cat b {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mk-cat small {
  font-size: 10px;
  color: var(--muted-2);
}
.mk-cat:hover b {
  color: var(--rose-deep);
}

/* chips */
.mk-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.mk-chips::-webkit-scrollbar {
  display: none;
}
.mk-chips a {
  flex: 0 0 auto;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
  text-decoration: none;
}
.mk-chips a:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

/* real coupons */
.mk-coupons {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}
.mk-coupons::-webkit-scrollbar {
  display: none;
}
.mk-coupons__label {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--mk-red);
  border: 1px solid var(--mk-red);
  border-radius: 4px;
  padding: 4px 7px;
  background: var(--mk-red-soft);
}
.mk-coupon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--mk-red-soft);
  border: 1px dashed var(--mk-red);
  border-radius: 4px;
  padding: 5px 9px;
}
.mk-coupon b {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--mk-red);
}
.mk-coupon code {
  font-size: 10.5px;
  color: var(--muted);
  background: #fff;
  border-radius: 3px;
  padding: 1px 5px;
}

/* sections */
.mk-sec {
  background: var(--panel);
  border-radius: var(--r-md);
  padding: 14px 12px 16px;
}
.mk-sec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mk-sec__head h2 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--ink);
}
.mk-sec__head h2::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--mk-red);
  margin-right: 8px;
  vertical-align: -1px;
}
.mk-sec__head a {
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
}
.mk-sec__head a:hover {
  color: var(--rose-deep);
}

/* product grid */
.mk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mk-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.mk-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--panel-2);
  overflow: hidden;
}
.mk-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.mk-card:hover .mk-card__media img {
  transform: scale(1.04);
}
.mk-card__noimg {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--panel-3), var(--blush-2));
}
.mk-card__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--mk-red);
  color: #fff;
}
.mk-card__badge--out {
  background: rgba(34, 28, 26, 0.72);
}
.mk-card__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 9px 10px;
  flex: 1 1 auto;
}
.mk-card__title {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.mk-card__title:hover {
  color: var(--rose-deep);
}
.mk-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted-2);
}
.mk-card__rate {
  color: #b8862f;
}
.mk-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}
.mk-card__price {
  font-size: 15px;
  font-weight: 600;
  color: var(--mk-red);
  line-height: 1.2;
}
.mk-card__price del,
.mk-card__price s {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted-2);
  margin-left: 4px;
}
.mk-card__price ins {
  text-decoration: none;
}
.mk-card__add {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.mk-card__add svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fdf7f2;
  stroke-width: 2;
  stroke-linecap: round;
}
.mk-card__add:hover {
  background: var(--mk-red);
}

.mk-more {
  text-align: center;
  margin-top: 16px;
}

/* trust strip */
.mk-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: var(--panel);
  border-radius: var(--r-md);
  padding: 12px 10px;
}
.mk-trust span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}
.mk-trust svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--rose);
  stroke-width: 1.5;
}

@media (min-width: 640px) {
  .mk-cats {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .mk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .mk-card__title {
    font-size: 13px;
  }
}

/* ---------- Taobao-H5 chrome: bottom tab bar ---------- */

.tb-tabs {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: #fff;
  border-top: 1px solid #eee;
  padding-bottom: env(safe-area-inset-bottom, 0);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tb-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 6px;
  font-size: 10.5px;
  color: #666;
  text-decoration: none;
}

.tb-tab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tb-tab.is-active {
  color: #ff5000;
}

.tb-tabs__count {
  position: absolute;
  top: 2px;
  left: calc(50% + 4px);
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  background: #ff5000;
  color: #fff;
  font-size: 9.5px;
  line-height: 15px;
  text-align: center;
  padding: 0 3px;
  font-weight: 500;
}

body.woocommerce-checkout .tb-tabs {
  display: none !important;
}

/* Cart: keep the checkout button pinned above the bottom tab bar (mobile),
   visible at any scroll position instead of only at the end of the page. */
@media (max-width: 767px) {
  body.woocommerce-cart .wc-proceed-to-checkout {
    position: fixed;
    right: 12px;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    left: auto;
    z-index: 80;
    margin: 0;
  }
  body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    display: block;
    width: auto;
    margin: 0;
    padding: 12px 28px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 10px 26px -8px rgba(34, 28, 26, 0.5);
  }
}

@media (max-width: 767px) {
  .tb-tabs {
    display: grid;
  }
  .site-footer {
    padding-bottom: 0;
  }
  body {
    padding-bottom: 52px;
  }
}

/* ---------- Taobao-H5 style My Account dashboard ---------- */

.tb-acc {
  --tb-orange: #ff5000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: -10px 0 24px;
}

/* profile header on a soft gradient, like the reference */
.tb-acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -16px calc(50% - 50vw) 2px;
  padding: 18px calc(50vw - min(50vw, 600px)) 20px;
  background:
    radial-gradient(120% 90% at 12% 8%, #ffe7d9 0%, rgba(255, 231, 217, 0) 55%),
    radial-gradient(110% 100% at 88% 0%, #ffd9cf 0%, rgba(255, 217, 207, 0) 60%),
    linear-gradient(180deg, #fff4ee 0%, var(--bg-2) 100%);
}

.tb-acc__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.tb-acc__avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(150deg, #ffb37a, #ff6a1f);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(255, 80, 0, 0.25);
}

.tb-acc__avatar svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.tb-acc__who {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tb-acc__nick {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.tb-acc__login {
  font-size: 11px;
  color: #99664d;
}

.tb-acc__gear {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #a86a4b;
}

.tb-acc__gear svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* white cards */
.tb-acc__card {
  background: var(--panel);
  border-radius: 12px;
  padding: 13px 12px 15px;
  box-shadow: 0 1px 4px rgba(60, 30, 20, 0.05);
}

.tb-acc__rowhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.tb-acc__rowhead h2 {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.tb-acc__rowhead a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  color: #999;
  text-decoration: none;
}

.tb-acc__rowhead a svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* five order-status tiles */
.tb-acc__tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.tb-acc__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--ink-2);
}

.tb-acc__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}

.tb-acc__icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #444;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tb-acc__tile b {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}

.tb-acc__tile span {
  font-size: 10.5px;
  color: #666;
  white-space: nowrap;
}

.tb-acc__tile:hover svg {
  stroke: var(--tb-orange);
}

.tb-acc__tile:hover span {
  color: var(--tb-orange);
}

/* "— ❤ You may also like —" divider */
.tb-like {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 12px;
  color: var(--tb-orange);
  font-size: 13.5px;
  font-weight: 500;
}

.tb-like i {
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.tb-like svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: none;
}

.tb-like span {
  color: var(--tb-orange);
}

/* ---------- Taobao-H5 style empty cart ---------- */

.tb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 14px 30px;
}

.tb-empty__mascot svg {
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 6px 14px rgba(255, 106, 31, 0.28));
}

.tb-empty__title {
  margin: 14px 0 4px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}

.tb-empty__hint {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.tb-empty__cta {
  background: var(--tb-orange, #ff5000);
  border-color: var(--tb-orange, #ff5000);
  color: #fff;
  border-radius: 999px;
  padding: 9px 26px;
  font-size: 13px;
}

.tb-empty__cta:hover {
  background: #e64700;
}

@media (max-width: 767px) {
  .tb-acc {
    margin-top: -6px;
  }
  /* Reference layout: no page title, no side nav — content sits right
     under the site header. Both stay available on desktop. */
  body.woocommerce-account .doc__title,
  body.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none;
  }
}

@media (min-width: 768px) {
  .tb-acc__head {
    margin: -10px calc(50% - 50vw) 6px;
  }
}

@media (min-width: 960px) {
  .mk {
    padding-block: 22px 56px;
  }
  .mk-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .mk-sec {
    padding: 18px 16px 20px;
  }
  .mk-card__price {
    font-size: 16px;
  }
}
