:root {
  --dspb-bg: #ffffff;
  --dspb-text: #111827;
  --dspb-muted: #6b7280;
  --dspb-btn-bg: #f59e0b;
  --dspb-btn-text: #ffffff;
  --dspb-border: #e5e7eb;
  --dspb-radius: 20px;
  --dspb-offset: 10px;
  --dspb-z: 9999;
  --dspb-shadow: 0 16px 40px rgba(15,23,42,.16);
  --dspb-safe-area: env(safe-area-inset-bottom, 0px);
}

.dspb-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(var(--dspb-offset) + var(--dspb-safe-area));
  z-index: var(--dspb-z);
  width: auto;
  max-width: 760px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--dspb-border);
  border-radius: calc(var(--dspb-radius) + 4px);
  background: var(--dspb-bg);
  box-shadow: var(--dspb-shadow);
  backdrop-filter: saturate(1.1) blur(10px);
  -webkit-backdrop-filter: saturate(1.1) blur(10px);
  transform: translate3d(0, 0, 0);
  transition: opacity .24s ease, transform .24s ease, visibility .24s ease;
}

.dspb-bar.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 16px, 0);
}

.dspb-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dspb-product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.dspb-thumb-wrap {
  flex: 0 0 52px;
}

.dspb-thumb {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--dspb-border);
}

.dspb-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dspb-title {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--dspb-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dspb-price-wrap {
  display: grid;
  gap: 2px;
}

.dspb-price-label {
  font-size: 10px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--dspb-muted);
  opacity: .92;
}

.dspb-price,
.dspb-price .price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--dspb-text);
}

.dspb-price .amount,
.dspb-price bdi,
.dspb-price ins {
  color: var(--dspb-text);
  font-weight: 900;
  text-decoration: none;
}

.dspb-price del,
.dspb-price del .amount,
.dspb-price del bdi {
  color: var(--dspb-muted) !important;
  font-size: 12px;
  font-weight: 700;
  opacity: .78;
  text-decoration-thickness: 1.5px;
}

.dspb-price ins {
  background: transparent;
}

.dspb-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  flex: 0 0 auto;
}

.dspb-actions.has-qty {
  grid-template-columns: auto minmax(132px, 1fr);
  align-items: stretch;
}

.dspb-qty {
  display: inline-grid;
  grid-template-columns: 42px minmax(34px, auto) 42px;
  align-items: center;
  height: 46px;
  border-radius: 16px;
  border: 1px solid var(--dspb-border);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.dspb-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 46px;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--dspb-text);
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, opacity .15s ease;
}

.dspb-qty-btn:hover,
.dspb-qty-btn:active {
  background: rgba(15, 23, 42, .05);
}

.dspb-qty-btn:active {
  transform: scale(.97);
}

.dspb-qty-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dspb-qty-value {
  min-width: 34px;
  padding: 0 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  color: var(--dspb-text);
  user-select: none;
}

.dspb-qty-input {
  display: none !important;
}

.dspb-button,
.dspb-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--dspb-btn-bg);
  color: var(--dspb-btn-text) !important;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}

.dspb-button:hover,
.dspb-link:hover {
  transform: translateY(-1px);
  filter: saturate(1.03);
}

.dspb-button.is-disabled,
.dspb-button:disabled {
  opacity: .58;
  cursor: not-allowed;
  box-shadow: none;
}

.dspb-button.is-attention {
  animation: dspb-pulse .32s ease 2;
}

@keyframes dspb-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

body.single-product {
  padding-bottom: 112px;
}

@media (min-width: 850px) {
  .dspb-mobile-only {
    display: none !important;
  }

  .dspb-bar:not(.dspb-mobile-only) {
    left: 22px;
    right: 22px;
  }
}

@media (max-width: 620px) {
  .dspb-bar {
    left: 8px;
    right: 8px;
    padding: 8px;
    border-radius: 22px;
  }

  .dspb-inner {
    gap: 8px;
  }

  .dspb-thumb-wrap {
    flex-basis: 46px;
  }

  .dspb-thumb {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .dspb-title {
    max-width: 28vw;
  }

  .dspb-price,
  .dspb-price .price {
    font-size: 14px;
  }

  .dspb-actions.has-qty {
    grid-template-columns: auto minmax(116px, 1fr);
    gap: 6px;
  }

  .dspb-qty {
    grid-template-columns: 38px minmax(28px, auto) 38px;
    height: 42px;
    border-radius: 14px;
  }

  .dspb-qty-btn {
    width: 38px;
    height: 42px;
  }

  .dspb-button,
  .dspb-link {
    min-width: 116px;
    height: 42px;
    border-radius: 14px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  .dspb-title {
    display: none;
  }

  .dspb-price-label {
    font-size: 9px;
  }

  .dspb-actions.has-qty {
    grid-template-columns: auto minmax(108px, 1fr);
  }

  .dspb-product {
    gap: 8px;
  }
}
