.shop-toast-stack {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 10020;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.shop-toast {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.shop-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.shop-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.shop-toast-success {
  background: #f0f9eb;
  border: 1px solid #c2e7b0;
  color: #67c23a;
}

.shop-toast-error {
  background: #fef0f0;
  border: 1px solid #fbc4c4;
  color: #f56c6c;
}

.shop-toast-warning {
  background: #fdf6ec;
  border: 1px solid #f5dab1;
  color: #e6a23c;
}

.layui-layer-shade {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.layui-layer {
  position: fixed !important;
  background: #fff;
  border-radius: 2px;
  box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.layui-layer * {
  box-sizing: border-box;
}

.layui-layer-title {
  height: 42px;
  padding: 0 48px 0 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #f8f8f8;
  color: #333;
  font-size: 14px;
  line-height: 42px;
}

.layui-layer-setwin {
  position: absolute;
  right: 15px;
  top: 13px;
  font-size: 0;
}

.layui-layer-setwin a {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  color: transparent;
  text-decoration: none;
}

.layui-layer-content {
  position: relative;
  color: #333;
  font-size: 14px;
  line-height: 24px;
}

/* Keep the shared navigation transparent at rest and add glass styling after scrolling. */
#shop-site-header {
  position: sticky;
  top: 0;
  background: transparent;
  transition:
    background-color 0.2s ease,
    backdrop-filter 0.2s ease,
    -webkit-backdrop-filter 0.2s ease,
    box-shadow 0.2s ease;
}

#shop-site-header.is-compact {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

/* Keep the homepage navigation visible over the hero carousel. */
.shop-home #shop-site-header {
  border-color: transparent;
}

/* The homepage header height is fixed, so keep the hero behind it without runtime measurement. */
.shop-home-hero {
  margin-top: -57px;
}

/* Keep mobile hero copy compact and aligned with the image composition. */
@media (max-width: 640px) {
  .shop-home .heroBannerSwiper {
    height: 640px;
  }

  .shop-home .heroBannerSwiper .swiper-slide > img,
  .shop-home .heroBannerSwiper .swiper-slide > video {
    object-position: 60% top;
  }

  .shop-home .hero-slide-overlay {
    padding-bottom: 76px;
  }

  .shop-home .hero-slide-copy {
    max-width: calc(100vw - 48px);
    padding: 16px 18px 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .shop-home .hero-slide-copy h2 {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .shop-home .hero-slide-copy p {
    max-width: 22rem;
  }
}

@media (min-width: 1024px) {
  .shop-home-hero {
    margin-top: -69px;
  }
}

.layui-layer-dialog .layui-layer-content {
  min-width: 240px;
  padding: 24px 20px 12px;
}

.layui-layer-page .layui-layer-content {
  overflow: visible !important;
}

.layui-layer-btn {
  padding: 0 20px 20px;
  text-align: right;
}

.layui-layer-btn a {
  display: inline-block;
  min-width: 80px;
  height: 32px;
  margin-left: 10px;
  padding: 0 16px;
  border: 1px solid #dedede;
  border-radius: 2px;
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  text-decoration: none;
}

.layui-layer-btn .layui-layer-btn0 {
  border-color: #1e9fff;
  background: #1e9fff;
  color: #fff;
}

.layui-layer-input {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 12px;
  padding: 0 10px;
  border: 1px solid #e6e6e6;
  border-radius: 2px;
  background: #fff;
  color: #333;
  outline: 0;
}

.layui-layer-loading {
  min-width: 40px !important;
  min-height: 40px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.layui-layer-loading .layui-layer-content {
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
}

.layui-layer-loading .layui-layer-content::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(30, 159, 255, 0.18);
  border-top-color: #1e9fff;
  border-radius: 50%;
  animation: shop-layer-spin 0.8s linear infinite;
}

.layui-layer-loading .layui-layer-loading0,
.layui-layer-loading .layui-layer-loading1,
.layui-layer-loading .layui-layer-loading2 {
  display: none !important;
}

@keyframes shop-layer-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.shop-auth {
  padding: 24px;
  background: #ffffff;
}

.shop-auth-head {
  margin-bottom: 16px;
}

.shop-auth-eyebrow {
  display: none;
}

.shop-auth-subtitle {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 20px;
}

.shop-auth-form {
  margin: 0;
}

.shop-auth-field + .shop-auth-field {
  margin-top: 10px;
}

.shop-auth-label {
  display: block;
  margin-bottom: 6px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 500;
}

.shop-auth-input-wrap {
  display: flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.shop-auth-input-wrap:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.shop-auth-prefix {
  display: inline-flex;
  width: 38px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 15px;
}

.shop-auth-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 9px 12px 9px 0;
  color: #1f2937;
  font-size: 14px;
  outline: 0;
}

.shop-auth-input::placeholder {
  color: #94a3b8;
}

.shop-auth-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
}

.shop-auth-captcha {
  overflow: hidden;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}

.shop-auth-captcha img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.shop-auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 14px;
}

.shop-auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.shop-auth-check input {
  height: 14px;
  width: 14px;
  accent-color: #2563eb;
}

.shop-auth-link {
  color: #2563eb;
  font-size: 13px;
  text-decoration: none;
}

.shop-auth-link:hover {
  color: #1d4ed8;
}

.shop-auth-submit {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.shop-auth-submit:hover {
  background: #1d4ed8;
}

.shop-auth-footer {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.shop-login-layer {
  border: 1px solid #dbeafe;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
}

.shop-login-layer .layui-layer-title {
  border-bottom-color: #dbeafe;
  background: #eff6ff;
  color: #1e3a5f;
  font-weight: 600;
}

@media (max-width: 640px) {
  .layui-layer.shop-login-layer {
    max-width: calc(100vw - 24px);
  }

  .shop-login-layer .layui-layer-title {
    height: 50px;
    line-height: 50px;
  }

  .shop-login-layer .layui-layer-setwin {
    top: 16px;
  }

  .shop-auth {
    padding: 16px;
  }

  .shop-auth-captcha-row {
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 8px;
  }

  .shop-auth-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
}

.shop-view-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #9ca3af;
  background: transparent;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.shop-view-btn:hover {
  color: #2563eb;
  background: #eff6ff;
}

.shop-view-btn.is-active {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.shop-product-grid[data-view="list"] {
  grid-template-columns: minmax(0, 1fr);
}

.shop-product-card[data-view="list"] {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
}

.shop-product-card[data-view="list"] .shop-product-media {
  min-height: 180px;
}

.shop-product-card[data-view="list"] .shop-product-img,
.shop-product-card[data-view="list"] .shop-product-empty {
  height: 100%;
  min-height: 180px;
}

.shop-product-card[data-view="list"] .shop-product-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.shop-product-card[data-view="list"] .shop-product-info h3 {
  height: auto;
  max-height: 72px;
}

.shop-price-filter {
  --shop-price-percent-left: 0%;
  --shop-price-percent-right: 100%;
}

/* Keep cached price-filter markup spaced while templates refresh. */
.shop-price-filter > .space-x-4,
.shop-price-filter > .gap-4 {
  column-gap: 16px;
}

.shop-price-range {
  position: relative;
  height: 32px;
  user-select: none;
}

.shop-price-track,
.shop-price-progress {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.shop-price-track {
  left: 0;
  right: 0;
  background: #e5e7eb;
}

.shop-price-progress {
  left: var(--shop-price-percent-left);
  right: calc(100% - var(--shop-price-percent-right));
  background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
}

.shop-price-thumb {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 4;
  width: 16px;
  height: 16px;
  margin: 0;
  transform: translateY(-50%);
  padding: 0;
  border: 2px solid #2563eb;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
  cursor: grab;
}

.shop-price-thumb:active {
  cursor: grabbing;
}

.shop-price-thumb:focus {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.14),
    0 2px 8px rgba(37, 99, 235, 0.18);
}

.shop-price-thumb::before {
  content: "";
  position: absolute;
  left: -10px;
  top: -10px;
  width: 36px;
  height: 36px;
}

.shop-price-thumb[data-price-min-thumb] {
  z-index: 5;
}

.shop-price-thumb[data-price-max-thumb] {
  z-index: 6;
}

.shop-price-number::-webkit-inner-spin-button,
.shop-price-number::-webkit-outer-spin-button {
  margin: 0;
}

@media (max-width: 640px) {
  .shop-toast-stack {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .shop-toast {
    max-width: none;
  }

  .shop-auth-captcha-row {
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 8px;
  }

  .shop-product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-product-card[data-view="list"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-product-grid[data-view="list"] {
    gap: 16px;
  }
}
