:root {
  --tb-orange: #ff5000;
  --tb-orange-2: #ff7a00;
  --tb-red: #ff0036;
  --tb-bg: #f5f5f5;
  --tb-text: #222;
  --tb-muted: #666;
  --tb-border: #eeeeee;
}

html,
body {
  background: var(--tb-bg) !important;
  color: var(--tb-text);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif !important;
}

#app,
main#main {
  background: var(--tb-bg) !important;
}

header,
.sticky.top-0,
.max-lg\\:hidden {
  background: #fff !important;
}

header {
  border-bottom: 1px solid var(--tb-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

header a[aria-label] img,
img[alt="Bagisto"],
img[alt="Demo store"] {
  width: auto !important;
  max-width: 156px !important;
  height: 56px !important;
  object-fit: contain !important;
}

header input[type="search"],
header input[name="query"],
header .search input,
input[placeholder*="Search"],
input[placeholder*="搜索"] {
  height: 42px !important;
  border: 2px solid var(--tb-orange) !important;
  border-radius: 21px !important;
  background: #fff !important;
  padding-left: 18px !important;
  font-size: 15px !important;
  box-shadow: 0 6px 16px rgba(255, 80, 0, 0.1);
}

header button[type="submit"],
header .icon-search,
button.primary-button,
.primary-button {
  background: linear-gradient(90deg, var(--tb-orange), var(--tb-orange-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

header a:hover,
nav a:hover,
.icon-heart-fill,
.text-red-600,
.text-red-500 {
  color: var(--tb-orange) !important;
}

.secondary-button,
button.secondary-button {
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, var(--tb-orange), var(--tb-orange-2)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(255, 80, 0, 0.18);
}

.secondary-button:hover,
button.secondary-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.container,
.max-1180\\:px-5,
.max-xl\\:px-16 {
  max-width: 1200px;
}

[class*="rounded-md"][class*="group"][class*="w-full"] {
  background: #fff !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

[class*="rounded-md"][class*="group"][class*="w-full"]:hover {
  border-color: var(--tb-orange) !important;
  box-shadow: 0 8px 24px rgba(255, 80, 0, 0.14) !important;
}

[class*="rounded-md"][class*="group"][class*="w-full"] img {
  background: #ffffff !important;
}

[class*="rounded-md"][class*="group"][class*="w-full"] p {
  color: var(--tb-text);
}

[class*="rounded-md"][class*="group"][class*="w-full"] p[class*="text-base"] {
  min-height: 44px;
  font-size: 14px !important;
  line-height: 22px !important;
}

[class*="rounded-md"][class*="group"][class*="w-full"] [class*="text-lg"][class*="font-semibold"],
.price-label,
.final-price,
.special-price,
[class*="price"] {
  color: var(--tb-red) !important;
}

[class*="rounded-md"][class*="group"][class*="w-full"] [class*="text-lg"][class*="font-semibold"] {
  font-size: 20px !important;
  font-weight: 700 !important;
}

[class*="rounded-md"][class*="group"][class*="w-full"] [class*="text-lg"][class*="font-semibold"]::first-letter {
  font-size: 14px;
}

[class*="bg-red-600"],
[class*="bg-red-500"] {
  background: var(--tb-red) !important;
}

[class*="bg-navyBlue"] {
  background: var(--tb-orange) !important;
}

.breadcrumbs,
[class*="breadcrumb"] {
  color: var(--tb-muted) !important;
}

footer {
  background: #fff !important;
  border-top: 1px solid var(--tb-border);
}

.prose,
.cms-page,
.product-detail,
[class*="product"] {
  letter-spacing: 0 !important;
}

@media (max-width: 768px) {
  header input[type="search"],
  header input[name="query"],
  input[placeholder*="Search"],
  input[placeholder*="搜索"] {
    height: 38px !important;
    border-radius: 19px !important;
  }

  [class*="rounded-md"][class*="group"][class*="w-full"] {
    border-radius: 6px !important;
  }
}

.dugg-customer-service {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 9999;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

.dugg-customer-service__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  color: #fff;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.28);
  cursor: pointer;
}

.dugg-customer-service__panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: 260px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.dugg-customer-service__head {
  background: #f0fdf4;
  padding: 14px 16px;
  color: #14532d;
  font-weight: 700;
}

.dugg-customer-service__body {
  padding: 14px 16px;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.dugg-customer-service__body strong {
  color: #111827;
}

.dugg-customer-service__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 16px;
}

.dugg-customer-service__actions a {
  display: block;
  border-radius: 6px;
  background: #16a34a;
  color: #fff !important;
  padding: 9px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.dugg-customer-service__actions a:last-child {
  background: #ff5000;
}

.dugg-customer-service:not(.is-open) .dugg-customer-service__panel {
  display: none;
}

.container .scrollbar-hide > .grid a[aria-label] {
  display: block !important;
  border: 1px solid #d9f7df !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.1);
  overflow: hidden;
}

.container .scrollbar-hide > .grid a[aria-label] img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.container .scrollbar-hide > .grid a[aria-label]::before {
  content: none !important;
}

.dugg-zone-children {
  margin-top: 12px;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

.dugg-zone-children a {
  border: 1px solid #d9f7df;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d !important;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.dugg-zone-children a:hover {
  border-color: #22c55e;
  background: #dcfce7;
}

.dugg-zone-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #111827;
}

.dugg-zone-title::after {
  content: "展开分类";
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  padding: 4px 9px;
  font-size: 12px;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.dugg-zone-title.is-open::after {
  content: "收起分类";
  background: #dcfce7;
  color: #15803d;
}

.dugg-zone-children.is-open {
  display: flex;
}

.dugg-category-picker {
  margin-bottom: 24px;
}

.dugg-category-picker details {
  position: relative;
  display: inline-block;
}

.dugg-category-picker summary {
  list-style: none;
  display: inline-flex;
  min-width: 172px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9f7df;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  padding: 14px 18px;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.08);
}

.dugg-category-picker summary::-webkit-details-marker {
  display: none;
}

.dugg-category-picker summary::marker {
  content: "";
}

.dugg-category-picker__arrow {
  font-size: 18px;
  color: #16a34a;
  transition: transform 0.18s ease;
}

.dugg-category-picker details[open] .dugg-category-picker__arrow {
  transform: rotate(180deg);
}

.dugg-category-picker__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  min-width: 260px;
  gap: 8px;
  border: 1px solid #d9f7df;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.dugg-category-picker__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 7px;
  color: #374151 !important;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.dugg-category-picker__item:hover,
.dugg-category-picker__item.is-active {
  background: #f0fdf4;
  color: #15803d !important;
}

.dugg-category-picker__item.is-active::after {
  content: "\\2713";
  color: #16a34a;
  font-weight: 900;
}

.dugg-home-category-menu {
  position: relative;
  width: 100%;
}

.dugg-home-category-menu summary {
  list-style: none;
  cursor: pointer;
  text-align: center;
  color: #111827;
}

.dugg-home-category-menu summary::-webkit-details-marker {
  display: none;
}

.dugg-home-category-menu summary::marker {
  content: "";
}

.dugg-home-category-menu__title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.dugg-home-category-menu[open] .dugg-home-category-menu__title,
.dugg-home-category-menu summary:hover .dugg-home-category-menu__title {
  background: #f0fdf4;
  color: #15803d;
}

.dugg-home-category-menu__list {
  position: static;
  z-index: 15;
  margin-top: 8px;
  display: grid;
  gap: 6px;
  border: 1px solid #d9f7df;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.dugg-home-category-menu__list a {
  border-radius: 7px;
  color: #374151 !important;
  padding: 7px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.dugg-home-category-menu__list a:hover {
  background: #f0fdf4;
  color: #15803d !important;
}

.container .scrollbar-hide > .grid a[aria-label="水果"] {
  background: linear-gradient(135deg, #fff7ed, #fff1f2) !important;
  border-color: #fed7aa !important;
}

.container .scrollbar-hide > .grid a[aria-label="肉类"] {
  background: linear-gradient(135deg, #fff1f2, #fef2f2) !important;
  border-color: #fecdd3 !important;
}

.container .scrollbar-hide > .grid a[aria-label="干货"] {
  background: linear-gradient(135deg, #fffbeb, #fff7ed) !important;
  border-color: #fde68a !important;
}

@media (max-width: 768px) {
  .dugg-customer-service {
    right: 14px;
    bottom: 18px;
  }

  .dugg-customer-service__toggle {
    padding: 10px 14px;
    font-size: 14px;
  }

  .dugg-customer-service__panel {
    width: min(260px, calc(100vw - 28px));
  }

  .container .scrollbar-hide > .grid a[aria-label]::before {
    font-size: 16px;
  }
}
/* === DUGG: 商品列表页桌面端一行四个 + 全部白色融入环境(轮廓保留) ===
   方案:
   1) 网格桌面4列, <=1060px 2列。
   2) 卡片所有白色背景(bg-white 信息区/卡片底) -> 环境灰(--tb-bg), 消除白色块。
   3) 商品图白底用 mix-blend-mode: multiply 融入灰底: 白色->灰(融入环境),
      商品(非白像素)保留, 轮廓清晰。需图片容器背景为灰(下条保证)。
   4) 图片容器/shimmer 背景 = 环境灰(覆盖 bg-zinc-100)。 */
div.grid.gap-8.max-1060\:grid-cols-2 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 1060px) {
    div.grid.gap-8.max-1060\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 图片容器/shimmer 背景 = 环境灰 (multiply 的混合底色) */
div.grid.gap-8.max-1060\:grid-cols-2 img,
div.grid.gap-8.max-1060\:grid-cols-2 .shimmer,
div.grid.gap-8.max-1060\:grid-cols-2 v-shimmer-image {
    background-color: var(--tb-bg, #f5f5f5) !important;
}

/* 商品图白底 multiply 融入灰底 (白->灰, 商品保留) */
div.grid.gap-8.max-1060\:grid-cols-2 img {
    mix-blend-mode: multiply !important;
}

/* 卡片内所有 bg-white 区域 -> 环境灰 (信息区/卡片底/评分标签) */
div.grid.gap-8.max-1060\:grid-cols-2 .bg-white,
div.grid.gap-8.max-1060\:grid-cols-2 [class*="bg-white/"] {
    background-color: var(--tb-bg, #f5f5f5) !important;
}

/* === DUGG: 服务特性卡片(全场配送/售后无忧/灵活支付/在线客服)融入页面灰 ===
   仅改卡片容器 div 的 bg-white -> 环境灰;
   保留图标 span(bg-white border border-black rounded-full)的圆形白底。 */
div.flex.justify-center.gap-6.max-lg\:flex-wrap > .flex.items-center.gap-5.bg-white {
    background-color: var(--tb-bg, #f5f5f5) !important;
}
/* === END DUGG GRID === */


/* 兜底: 防止旧编译css把按钮默认样式带进来 */
button.confirm-modal-btn { -webkit-appearance: none; appearance: none; }
/* === DUGG: confirm 弹窗按钮统一(双橙实心/等宽/等高) === */
.confirm-modal-actions {
    display: flex !important;
    gap: 10px !important;
}
.confirm-modal-btn {
    box-sizing: border-box !important;
    flex: 1 1 0% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1.5rem !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: background-color .3s ease, opacity .3s ease !important;
    white-space: nowrap !important;
    /* 默认覆盖 Tailwind button{} reset 的深蓝底/窄宽 */
    max-width: none !important;
    color: #fff !important;
}
/* 取消: 次橙(浅一档), 白字 */
.confirm-modal-btn.-cancel {
    background: var(--tb-orange, #ff5000) !important;
    color: #fff !important;
}
.confirm-modal-btn.-cancel:hover {
    opacity: .88 !important;
}
/* 同意: 主橙, 白字 */
.confirm-modal-btn.-agree {
    background: var(--tb-orange, #ff5000) !important;
    color: #fff !important;
}
.confirm-modal-btn.-agree:hover {
    opacity: .9 !important;
}
@media (max-width: 640px) {
    .confirm-modal-btn {
        padding: 0.625rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
}
/* === DUGG: compact footer services === */
.dugg-shop-services {
    margin-top: 24px !important;
    margin-bottom: 10px !important;
    padding-inline: 36px !important;
}

.dugg-shop-services__grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-items: start !important;
    justify-items: center !important;
    width: 100% !important;
}

.dugg-shop-services__item {
    display: grid !important;
    min-width: 0 !important;
    justify-items: center !important;
    align-items: start !important;
    gap: 10px !important;
    background: transparent !important;
    text-align: center !important;
}

.dugg-shop-services__icon {
    box-sizing: border-box !important;
    display: inline-flex !important;
    width: 58px !important;
    height: 58px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1.5px solid #111827 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #10183d !important;
    font-size: 32px !important;
    line-height: 1 !important;
    padding: 10px !important;
}

.dugg-shop-services__icon::before {
    font-size: inherit !important;
    line-height: 1 !important;
}

.dugg-shop-services__title {
    margin: 0 !important;
    color: #374151 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

@media (max-width: 640px) {
    .dugg-shop-services {
        margin-top: 12px !important;
        margin-bottom: 6px !important;
        padding-inline: 16px !important;
    }

    .dugg-shop-services__grid {
        gap: 6px !important;
    }

    .dugg-shop-services__item {
        gap: 5px !important;
    }

    .dugg-shop-services__icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 22px !important;
        padding: 8px !important;
    }

    .dugg-shop-services__title {
        font-size: 12px !important;
    }
}
/* === END DUGG compact footer services === */
/* === END confirm 弹窗按钮 === */
