/* Handmade Polska - H5 storefront. One 390px phone column on every screen. */

/* ---------- Tokens ---------- */
html.mall-ui {
  --mall-col: min(100vw, clamp(400px, min(36vw, 62dvh), 560px));
  --desk: #e6e2db;
  --paper: #f7f4ee;
  --surface: #fffefb;
  --sunk: #f0ece5;
  --ink: #1d1b18;
  --ink-2: #3a3631;
  --ink-3: #5f5952;
  --muted: #7d766d;
  --faint: #aaa39a;
  --line: rgba(29, 27, 24, .08);
  --line-2: rgba(29, 27, 24, .14);
  --accent: #7a2a33;
  --accent-press: #63212a;
  --on-accent: #fbf6ef;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(41, 31, 20, .04), 0 10px 24px -14px rgba(41, 31, 20, .16);
  --shadow-lift: 0 2px 4px rgba(41, 31, 20, .05), 0 18px 36px -18px rgba(41, 31, 20, .26);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .18s;
  --top-h: 54px;
  --tab-h: 56px;
  --buy-h: 68px;
  --font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;

  --main-color: #7a2a33;
  --btn-color: #7a2a33;
  --van-base-font: var(--font);
  --van-nav-bar-background: transparent !important;
  --van-nav-bar-icon-color: #1d1b18 !important;
  --van-nav-bar-title-text-color: #1d1b18 !important;
  --van-border-color: rgba(29, 27, 24, .14) !important;

  background: var(--desk);
  color-scheme: light;
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}

/* Real phones (any width up to 480px) get the column edge to edge. */
@media (max-width: 480px) {
  html.mall-ui { --mall-col: 100%; }
}

/* ---------- Page + phone column ---------- */
html.mall-ui body,
html.mall-ui body.mall-shop,
html.mall-ui body.mall-user,
html.mall-ui body.mall-auth {
  margin: 0;
  min-height: 100vh;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html.mall-ui button,
html.mall-ui input,
html.mall-ui select,
html.mall-ui textarea {
  font-family: inherit;
}

/* Beats mall-responsive.css `html.mall-ui #app { max-width: 1000px }`. */
html.mall-ui body #app,
html.mall-ui #app {
  position: relative;
  width: var(--mall-col) !important;
  max-width: 100% !important;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto !important;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(29, 27, 24, .04), 0 30px 80px -30px rgba(41, 31, 20, .28);
  overflow-x: clip;
}

html.mall-ui .mall-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

html.mall-ui [onclick],
html.mall-ui button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Header ---------- */
html.mall-ui .mall-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  box-sizing: border-box;
  background: rgba(247, 244, 238, .9);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

html.mall-ui .mall-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .02em;
}

html.mall-ui .mall-brand img {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

html.mall-ui .mall-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.mall-ui .mall-icon-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
}

/* Product detail nav bar */
html.mall-ui .van-sticky .van-nav-bar {
  background: rgba(247, 244, 238, .9) !important;
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
}

html.mall-ui .van-sticky .van-nav-bar .van-nav-bar__content {
  height: 52px;
  min-height: 52px;
}

html.mall-ui .van-sticky .van-nav-bar .van-nav-bar__title {
  max-width: calc(100% - 120px);
  margin: 0 auto;
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.mall-ui .van-sticky .van-nav-bar .van-nav-bar__left {
  position: absolute;
  top: 50%;
  bottom: auto;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
}

html.mall-ui .van-nav-bar .van-icon {
  color: var(--ink);
}

html.mall-ui .van-nav-bar__arrow {
  margin: 0;
  font-size: 16px;
}

/* ---------- Tab bar (fixed, but locked to the column) ---------- */
html.mall-ui .mall-tab-space {
  height: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom));
}

html.mall-ui .mall-buy-space {
  height: var(--buy-h);
}

html.mall-ui .van-tabbar.mall-tabbar.van-tabbar--fixed {
  position: fixed !important;
  top: auto !important;
  right: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  z-index: 60;
  display: flex;
  box-sizing: content-box;
  width: var(--mall-col) !important;
  max-width: 100% !important;
  height: var(--tab-h);
  margin: 0 !important;
  padding: 0 0 env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: rgba(255, 254, 251, .94) !important;
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  box-shadow: 0 -1px 0 var(--line), 0 -12px 28px -20px rgba(41, 31, 20, .22);
}

html.mall-ui .mall-tabbar .van-tabbar-item {
  position: relative;
  flex: 1;
  min-width: 0;
  gap: 3px;
  color: var(--faint) !important;
  font-size: 11px;
  line-height: 1.2;
  background: transparent !important;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

html.mall-ui .mall-tabbar .van-tabbar-item__icon {
  margin: 0 !important;
  font-size: 22px;
  line-height: 1;
}

html.mall-ui .mall-tabbar .van-tabbar-item__text {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .04em;
}

html.mall-ui .mall-tabbar .van-tabbar-item--active {
  color: var(--ink) !important;
  font-weight: 600;
}

html.mall-ui .mall-tabbar .van-tabbar-item--active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 0 0 2px 2px;
  background: var(--ink);
}

html.mall-ui .mall-tabbar .van-tabbar-item:active {
  opacity: .55;
}

/* ---------- Home: sections + two-column cards ---------- */
html.mall-ui .mall-section + .mall-section {
  margin-top: 28px;
}

html.mall-ui .mall-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .02em;
  text-align: left;
  transition: opacity var(--dur) var(--ease);
}

html.mall-ui .mall-section-head span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

html.mall-ui .mall-section-head span::before {
  content: "";
  flex: none;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--ink);
}

html.mall-ui .mall-section-head i {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
}

html.mall-ui .mall-section-head:active {
  opacity: .6;
}

html.mall-ui .mall-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

html.mall-ui .mall-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  animation: mall-fade .36s var(--ease) backwards;
}

html.mall-ui .mall-card:nth-child(2) { animation-delay: .04s; }
html.mall-ui .mall-card:nth-child(3) { animation-delay: .08s; }
html.mall-ui .mall-card:nth-child(4) { animation-delay: .12s; }

html.mall-ui .mall-card:active {
  transform: scale(.98);
}

@media (hover: hover) {
  html.mall-ui .mall-card:hover {
    box-shadow: var(--shadow-lift);
  }
}

html.mall-ui .mall-card-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--sunk);
}

html.mall-ui .mall-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html.mall-ui .shop-ph {
  object-fit: cover;
  background: var(--sunk);
}

html.mall-ui .mall-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px 12px 12px;
}

html.mall-ui .mall-card-body h3 {
  display: -webkit-box;
  height: 38px;
  margin: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

html.mall-ui .mall-price {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* ---------- Product detail ---------- */
html.mall-ui .mall-pd {
  background: transparent;
}

html.mall-ui .mall-pd-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 0;
}

html.mall-ui .app-product-gallery.mall-pd-gallery {
  width: 100%;
  max-width: none;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

html.mall-ui .app-product-gallery .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  margin: 0 3px !important;
  border-radius: 3px;
  background: var(--ink);
  opacity: .2;
  transition: width var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

html.mall-ui .app-product-gallery .swiper-pagination-bullet-active {
  width: 16px;
  background: var(--ink);
  opacity: .8;
}

html.mall-ui .mall-pd-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

html.mall-ui .mall-pd-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html.mall-ui .mall-pd-price {
  min-width: 0;
  color: var(--accent);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

html.mall-ui .mall-pd-stock {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

html.mall-ui .mall-pd-title {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

html.mall-ui .mall-pd-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

html.mall-ui .mall-pd-stats > div span {
  color: var(--muted);
}

html.mall-ui .mall-pd-stats .app-product-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
}

html.mall-ui .mall-pd-stats .app-product-like strong {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

html.mall-ui .mall-pd-stats .app-product-like.liked {
  border-color: rgba(122, 42, 51, .3);
  background: rgba(122, 42, 51, .05);
}

html.mall-ui .mall-pd-stats .app-product-like.liked,
html.mall-ui .mall-pd-stats .app-product-like.liked strong,
html.mall-ui .mall-pd-stats .app-product-like.liked .app-product-like-icon {
  color: var(--accent);
}

html.mall-ui .mall-pd-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .02em;
}

html.mall-ui .mall-pd-h::before {
  content: "";
  flex: none;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--ink);
}

html.mall-ui .mall-pd-text {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html.mall-ui .mall-pd-text p {
  margin: 0 0 .75em;
}

html.mall-ui .mall-pd-text p:last-child {
  margin-bottom: 0;
}

html.mall-ui .mall-pd-text img,
html.mall-ui .mall-pd-text video,
html.mall-ui .mall-pd-text iframe {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin: 10px 0;
  border-radius: 12px;
}

html.mall-ui .mall-pd-text table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

html.mall-ui .mall-pd-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

html.mall-ui .mall-pd-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

html.mall-ui .mall-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

html.mall-ui .mall-chips .shop-star {
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

html.mall-ui .mall-chips .shop-star.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

html.mall-ui .mall-empty {
  padding: 18px 0 6px;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

html.mall-ui .mall-comment {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

html.mall-ui .mall-chips + .mall-comment {
  margin-top: 8px;
}

html.mall-ui .mall-comment-meta {
  color: var(--muted);
  font-size: 12px;
}

html.mall-ui .mall-comment-text {
  margin-top: 4px;
  color: var(--ink-2);
  line-height: 1.65;
}

html.mall-ui .mall-comment-reply {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--sunk);
  color: var(--ink-3);
  font-size: 12px;
}

html.mall-ui .mall-comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

html.mall-ui .mall-comment-form .mb-2 {
  margin-bottom: 0;
}

/* Buy bar: fixed, column-width, stacked directly above the tab bar. */
html.mall-ui .buybtn1.van-action-bar {
  position: fixed !important;
  top: auto !important;
  right: auto !important;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)) !important;
  left: 50% !important;
  z-index: 55;
  display: flex;
  box-sizing: border-box;
  width: var(--mall-col) !important;
  max-width: 100% !important;
  height: var(--buy-h);
  margin: 0 !important;
  padding: 10px 16px !important;
  transform: translateX(-50%);
  border-radius: 0;
  overflow: visible;
  background: rgba(247, 244, 238, .94);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  box-shadow: 0 -1px 0 var(--line);
}

html.mall-ui .buybtn1 .van-button {
  flex: 1;
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  box-shadow: 0 10px 20px -12px rgba(122, 42, 51, .75);
}

html.mall-ui .buybtn1 .van-button:active {
  background: var(--accent-press) !important;
}

html.mall-ui .buybtn1 .van-button[disabled] {
  background: #cfc8be !important;
  color: #fff !important;
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

/* ---------- Bottom sheet + overlay (inside the column) ---------- */
html.mall-ui .van-overlay {
  right: auto !important;
  left: 50% !important;
  width: var(--mall-col) !important;
  max-width: 100% !important;
  transform: translateX(-50%);
  background: rgba(24, 20, 16, .42) !important;
  animation: mall-fade-in .2s var(--ease) backwards;
}

html.mall-ui .van-popup--bottom {
  top: auto !important;
  right: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  width: var(--mall-col) !important;
  max-width: 100% !important;
  max-height: 86vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  background: var(--paper) !important;
  box-shadow: 0 -16px 40px -16px rgba(30, 22, 14, .3);
  animation: mall-sheet-in .28s var(--ease) backwards;
}

html.mall-ui .van-popup--bottom::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: var(--line-2);
}

html.mall-ui .mall-sheet {
  padding: 14px 20px 20px;
}

html.mall-ui .mall-sheet-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

html.mall-ui .mall-sheet-thumb {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--sunk);
  box-shadow: 0 0 0 1px var(--line);
}

html.mall-ui .mall-sheet-meta {
  flex: 1;
  min-width: 0;
  padding-bottom: 2px;
}

html.mall-ui .mall-sheet-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

html.mall-ui .mall-sheet-price {
  margin-top: 6px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

html.mall-ui .mall-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

html.mall-ui .mall-sheet-label {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

html.mall-ui .mall-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

html.mall-ui .mall-sheet-actions > button {
  min-height: 48px;
  padding: 6px 12px;
  font-size: 15px;
  line-height: 1.3;
}

html.mall-ui .van-stepper {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
}

html.mall-ui .van-stepper__minus,
html.mall-ui .van-stepper__plus {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50% !important;
  background: var(--sunk);
  color: var(--ink);
  font-size: 0;
}

html.mall-ui .van-stepper__minus::before,
html.mall-ui .van-stepper__plus::before {
  width: 12px;
  height: 1.5px;
}

html.mall-ui .van-stepper__plus::after {
  width: 1.5px;
  height: 12px;
}

html.mall-ui .van-stepper .van-stepper__input {
  width: 44px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
html.mall-ui :where(button, .mall-btn-primary, .mall-btn-ghost, a.rounded-full, div.rounded-full, .mall-pd-links a, .mall-auth-switch, .mall-icon-btn, .van-nav-bar__left) {
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

html.mall-ui :where(button:not(:disabled):not(.mall-section-head):not(.mall-menu-logout), a.rounded-full, div.rounded-full[onclick], .mall-pd-links a, .mall-auth-switch, .van-nav-bar__left):active {
  transform: scale(.97);
}

html.mall-ui .mall-btn-primary,
html.mall-ui .loginbtn,
html.mall-ui button[style*="background:var(--main-color)"],
html.mall-ui a[style*="background:var(--main-color)"],
html.mall-ui div.rounded-full[style*="background:var(--main-color)"],
html.mall-ui button[style*="linear-gradient"] {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  font-weight: 600;
  letter-spacing: .06em;
  box-shadow: 0 10px 20px -12px rgba(122, 42, 51, .75);
}

html.mall-ui .mall-btn-primary:active,
html.mall-ui .loginbtn:active,
html.mall-ui button[style*="background:var(--main-color)"]:active,
html.mall-ui a[style*="background:var(--main-color)"]:active,
html.mall-ui div.rounded-full[style*="background:var(--main-color)"]:active,
html.mall-ui button[style*="linear-gradient"]:active {
  background: var(--accent-press) !important;
  box-shadow: 0 6px 14px -10px rgba(122, 42, 51, .75);
}

html.mall-ui .w-full.mall-btn-primary,
html.mall-ui button.w-full[style*="background:var(--main-color)"],
html.mall-ui a.block[style*="background:var(--main-color)"],
html.mall-ui div.rounded-full[style*="background:var(--main-color)"] {
  min-height: 48px;
  font-size: 15px;
}

html.mall-ui div.rounded-full[style*="background:var(--main-color)"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

html.mall-ui .mall-btn-ghost,
html.mall-ui button.rounded-full:not([style]) {
  border: 1px solid var(--line-2) !important;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
}

html.mall-ui .mall-btn-ghost:active,
html.mall-ui button.rounded-full:not([style]):active {
  background: var(--sunk);
}

html.mall-ui button[style*="background:#999"] {
  border: 1px solid var(--line-2) !important;
  border-radius: 999px;
  background: var(--sunk) !important;
  color: var(--ink-2) !important;
  font-weight: 500;
}

/* ---------- Utilities the PHP templates use but the prebuilt bundle lacks ---------- */
:where(html.mall-ui) .block { display: block; }
:where(html.mall-ui) .inline-block { display: inline-block; }
:where(html.mall-ui) .inline { display: inline; }
:where(html.mall-ui) .flex-1 { flex: 1 1 0%; min-width: 0; }
:where(html.mall-ui) .gap-3 { gap: .75rem; }
:where(html.mall-ui) .space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: .75rem; }
:where(html.mall-ui) .break-all { word-break: break-all; }
:where(html.mall-ui) .m-4 { margin: 1rem; }
:where(html.mall-ui) .ml-4 { margin-left: 1rem; }
:where(html.mall-ui) .my-3 { margin-top: .75rem; margin-bottom: .75rem; }
:where(html.mall-ui) .px-2 { padding-left: .5rem; padding-right: .5rem; }
:where(html.mall-ui) .px-3 { padding-left: .75rem; padding-right: .75rem; }
:where(html.mall-ui) .px-4 { padding-left: 1rem; padding-right: 1rem; }
:where(html.mall-ui) .py-1 { padding-top: .25rem; padding-bottom: .25rem; }
:where(html.mall-ui) .py-2 { padding-top: .5rem; padding-bottom: .5rem; }
:where(html.mall-ui) .py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

html.mall-ui .mall-nowrap {
  flex: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- Generic cards, text, borders (all other pages) ---------- */
html.mall-ui .bg-white {
  background-color: var(--surface) !important;
}

html.mall-ui .rounded-xl {
  border-radius: var(--radius) !important;
}

html.mall-ui .rounded-lg {
  border-radius: 12px;
}

html.mall-ui .bg-white.rounded-xl,
html.mall-ui .shadow {
  box-shadow: var(--shadow) !important;
}

html.mall-ui .border,
html.mall-ui .border-t,
html.mall-ui .border-b {
  border-color: var(--line-2);
}

html.mall-ui .border-b,
html.mall-ui .border-\[\#eee\] {
  border-color: var(--line) !important;
}

html.mall-ui .text-\[\#333\] { color: var(--ink) !important; }
html.mall-ui .text-\[\#444\] { color: var(--ink-2) !important; }
html.mall-ui .text-\[\#666\] { color: var(--ink-3) !important; }
html.mall-ui .text-\[\#999\] { color: var(--muted) !important; }

html.mall-ui .text-\[\#F56C6C\],
html.mall-ui .text-\[\#CB1298\],
html.mall-ui .text-\[var\(--main-color\)\] {
  color: var(--accent) !important;
  font-variant-numeric: tabular-nums;
}

html.mall-ui .bg-\[\#F5F5F5\] {
  background-color: transparent !important;
}

html.mall-ui .w-\[90\%\] {
  width: calc(100% - 32px) !important;
}

html.mall-ui .mx-3 {
  margin-left: 16px;
  margin-right: 16px;
}

html.mall-ui .bg-white.rounded-xl > .font-semibold:first-child {
  color: var(--ink);
  letter-spacing: .01em;
}

/* ---------- Forms ---------- */
html.mall-ui :where(input:not([type=hidden], [type=radio], [type=checkbox], .van-stepper__input), textarea, select) {
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  outline: none;
  background-color: #fbf9f5;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

html.mall-ui :where(input:not([type=hidden], [type=radio], [type=checkbox], .van-stepper__input), textarea, select):focus {
  border-color: rgba(29, 27, 24, .42);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(29, 27, 24, .06);
}

html.mall-ui :where(input, textarea)::placeholder {
  color: var(--faint);
}

html.mall-ui :where(textarea) {
  min-height: 96px;
  resize: vertical;
}

html.mall-ui :where(select) {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%237d766d' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}

html.mall-ui input[name="keyword"],
html.mall-ui input[name="no"] {
  width: 100%;
  height: 46px;
  padding-left: 44px;
  border-radius: 999px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%237d766d' stroke-width='1.6'/%3E%3Cpath d='m16 16 4 4' stroke='%237d766d' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px 50%;
  background-size: 18px 18px;
  box-shadow: var(--shadow);
}

html.mall-ui input[name^="num["] {
  width: 64px;
  height: 34px;
  min-height: 0;
  padding: 0 8px;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
}

html.mall-ui input[type=radio],
html.mall-ui input[type=checkbox] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  vertical-align: -4px;
  accent-color: var(--accent);
}

html.mall-ui form label.block {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf9f5;
  color: var(--ink-2);
  font-size: 14px;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

html.mall-ui form label.block:has(input:checked) {
  border-color: rgba(122, 42, 51, .45);
  background: rgba(122, 42, 51, .04);
  color: var(--ink);
}

/* ---------- Member center ---------- */
html.mall-ui .mall-member-card {
  position: relative;
  margin: 16px 16px 0;
  padding: 22px 20px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(168, 134, 79, .16), transparent 55%),
    linear-gradient(150deg, #2d2925, #1b1916);
  color: #f3ede3;
  box-shadow: var(--shadow-lift);
}

html.mall-ui .mall-member-name {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

html.mall-ui .mall-member-meta {
  color: rgba(243, 237, 227, .62);
  font-size: 12px;
  line-height: 1.75;
}

html.mall-ui .mall-member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 12px 16px 0;
  padding: 16px 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

html.mall-ui .mall-member-stat {
  position: relative;
  min-width: 0;
  padding: 0 12px;
  text-align: center;
}

html.mall-ui .mall-member-stat + .mall-member-stat::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 1px;
  background: var(--line);
}

html.mall-ui .mall-member-stat-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}

html.mall-ui .mall-member-stat-value {
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

html.mall-ui .mall-member-menu {
  margin: 12px 16px 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

html.mall-ui .mall-menu-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  color: var(--ink-2);
  font-size: 14px;
  transition: background-color var(--dur) var(--ease);
}

html.mall-ui .mall-menu-row + .mall-menu-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 1px;
  background: var(--line);
}

html.mall-ui .mall-menu-row i {
  flex: none;
  color: var(--faint);
  font-size: 13px;
}

html.mall-ui .mall-menu-row:active {
  background: var(--sunk);
}

html.mall-ui .mall-langbox:not(.hidden) {
  display: flex;
  gap: 6px;
  padding: 2px 16px 14px;
}

html.mall-ui .mall-langbox span,
html.mall-ui .mall-auth-lang span {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .06em;
}

html.mall-ui .mall-langbox span {
  flex: 1;
  padding: 8px 0;
  border-radius: 10px;
  background: var(--sunk);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

html.mall-ui .mall-menu-logout {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
}

html.mall-ui .mall-menu-logout:active {
  background: var(--sunk);
}

html.mall-ui[lang="zh"] :is(.mall-langbox, .mall-auth-lang) span:nth-child(1),
html.mall-ui[lang="en"] :is(.mall-langbox, .mall-auth-lang) span:nth-child(2),
html.mall-ui[lang="de"] :is(.mall-langbox, .mall-auth-lang) span:nth-child(3),
html.mall-ui[lang="it"] :is(.mall-langbox, .mall-auth-lang) span:nth-child(4),
html.mall-ui[lang="fr"] :is(.mall-langbox, .mall-auth-lang) span:nth-child(5),
html.mall-ui[lang="pl"] :is(.mall-langbox, .mall-auth-lang) span:nth-child(6) {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Orders ---------- */
html.mall-ui .mall-subtabs {
  position: sticky;
  top: calc(var(--top-h) + env(safe-area-inset-top));
  z-index: 35;
  display: flex;
  padding: 0 6px;
  background: rgba(247, 244, 238, .94);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

html.mall-ui .mall-subtab {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 12px 2px 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  transition: color var(--dur) var(--ease);
}

html.mall-ui .mall-subtab.is-on {
  color: var(--ink);
  font-weight: 600;
}

html.mall-ui .mall-subtab.is-on::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: var(--ink);
}

html.mall-ui .mall-status-card {
  margin: 12px 16px 0;
  padding: 22px 18px;
  border-radius: 18px;
  background: linear-gradient(150deg, #2d2925, #1b1916);
  color: #f3ede3;
  box-shadow: var(--shadow-lift);
  letter-spacing: .02em;
}

/* ---------- Login / register ---------- */
html.mall-ui .mall-auth-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(28px + env(safe-area-inset-top)) 20px 40px;
  box-sizing: border-box;
  background-color: var(--paper);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

html.mall-ui .mall-auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 244, 238, .55) 0%, rgba(247, 244, 238, .2) 45%, rgba(247, 244, 238, 0) 75%);
}

html.mall-ui .mall-auth-lang {
  position: relative;
  top: auto;
  right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto 22px;
  padding: 0 18px;
  line-height: 1;
  text-align: center;
}

html.mall-ui .mall-auth-lang span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

html.mall-ui .mall-auth-brand {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .32em;
  text-align: center;
  text-transform: uppercase;
}

html.mall-ui .mall-auth-title {
  margin-top: 12px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .04em;
  text-align: center;
}

html.mall-ui .mall-auth-form {
  margin-top: 28px;
}

html.mall-ui .mall-auth-card {
  padding: 22px 20px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 251, .95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(41, 31, 20, .05), 0 24px 48px -24px rgba(41, 31, 20, .35);
}

html.mall-ui .mall-field {
  display: block;
  margin-bottom: 14px;
}

html.mall-ui .mall-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}

html.mall-ui .mall-field input {
  width: 100%;
  height: 48px;
  text-align: left;
}

html.mall-ui .mall-auth-card .loginbtn {
  display: block;
  margin-top: 22px;
  min-height: 50px;
  font-size: 16px;
}

html.mall-ui .mall-auth-switch {
  display: block;
  width: fit-content;
  margin: 20px auto 0;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 254, 251, .8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
}

/* ---------- Motion ---------- */
@keyframes mall-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes mall-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mall-sheet-in {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html.mall-ui *,
  html.mall-ui *::before,
  html.mall-ui *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

html.mall-ui .mall-top-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

html.mall-ui .mall-lang-btn,
html.mall-ui .mall-auth-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2, rgba(29, 27, 24, .12));
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #1d1b18);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

html.mall-ui .mall-auth-lang {
  display: flex;
  width: fit-content;
  margin: 0 auto 22px;
}

html.mall-ui .mall-lang-mask {
  display: none;
  position: fixed;
  z-index: 80;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--mall-col);
  max-width: 100%;
  transform: translateX(-50%);
  background: rgba(24, 20, 16, .42);
}

html.mall-ui .mall-lang-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78vh;
  overflow: auto;
  padding: 8px 0 calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #f7f4ee;
  box-shadow: 0 -16px 40px rgba(30, 22, 14, .18);
}

html.mall-ui .mall-lang-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  font-size: 16px;
}

html.mall-ui .mall-lang-head button {
  border: 0;
  background: transparent;
  color: #6f685f;
  font-size: 14px;
}

html.mall-ui .mall-lang-region {
  padding: 10px 16px 4px;
  color: #8a8176;
  font-size: 12px;
  letter-spacing: .08em;
}

html.mall-ui .mall-lang-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border: 0;
  background: transparent;
  color: #1d1b18;
  font-size: 16px;
  text-align: left;
}

html.mall-ui .mall-lang-item i {
  color: #8a8176;
  font-style: normal;
  font-size: 13px;
}

html.mall-ui .mall-lang-item.on {
  background: #fff;
  font-weight: 700;
}

html.mall-ui .mall-lang-item.on i { color: #7a2a33; }

html.mall-ui .mall-search-form { padding: 12px 16px 4px; }

html.mall-ui .mall-search-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 22, 14, .06);
  font-size: 15px;
}

html.mall-ui .mall-search-panel { padding: 18px 16px 8px; }

html.mall-ui .mall-search-panel p {
  margin: 0 0 16px;
  color: #6f685f;
  font-size: 14px;
  line-height: 1.6;
}

html.mall-ui .mall-search-kicker {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

html.mall-ui .mall-hot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html.mall-ui .mall-hot a {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(29, 27, 24, .08);
  color: #1d1b18;
  font-size: 14px;
}

html.mall-ui .mall-menu-lang em {
  margin-left: auto;
  margin-right: 8px;
  color: #8a8176;
  font-style: normal;
  font-size: 13px;
}
