: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: #fafafa !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;
  }
}
