/* T-UP Sticky Top Add-to-Cart Bar */
.tiup-ux-sticky {
  display: none;
}

.tiup-ux-product .tiup-ux-sticky:not([hidden]) {
  display: block;
  position: fixed;
  top: var(--tiup-sticky-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--tiup-line, #e2e8f0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, top 0.15s ease;
  animation: tiupStickySlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tiupStickySlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tiup-ux-product .tiup-ux-sticky-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  box-sizing: border-box;
}

.tiup-ux-product .tiup-ux-sticky-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.tiup-ux-product .tiup-ux-sticky-thumb {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border: 1px solid var(--tiup-line, #e2e8f0);
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
}

.tiup-ux-product .tiup-ux-sticky-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.tiup-ux-product .tiup-ux-sticky-title {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--tiup-ink, #111);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.tiup-ux-product .tiup-ux-sticky-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--tiup-ink, #111);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tiup-ux-product .tiup-ux-sticky-price del {
  color: var(--tiup-muted, #888);
  font-size: 12px;
  font-weight: 400;
}
.tiup-ux-product .tiup-ux-sticky-price ins {
  text-decoration: none;
  color: #d35400;
}

.tiup-ux-product .tiup-ux-sticky-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tiup-ux-product .tiup-ux-sticky-status {
  margin: 0;
  font-size: 12px;
  color: #c0392b;
  font-weight: 600;
  white-space: nowrap;
}
.tiup-ux-product .tiup-ux-sticky-status:empty {
  display: none;
}

/* Quantity Stepper */
.tiup-ux-product .tiup-ux-sticky-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tiup-line, #cbd5e1);
  border-radius: 4px;
  background: #f8fafc;
  overflow: hidden;
  height: 40px;
  box-sizing: border-box;
}

.tiup-ux-product .tiup-ux-sticky-qty-btn {
  width: 32px;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--tiup-ink, #1e293b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.tiup-ux-product .tiup-ux-sticky-qty-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.tiup-ux-product .tiup-ux-sticky-qty-btn:active {
  background: #cbd5e1;
}

.tiup-ux-product .tiup-ux-sticky-qty-val {
  width: 44px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--tiup-line, #cbd5e1);
  border-right: 1px solid var(--tiup-line, #cbd5e1);
  background: #ffffff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--tiup-ink, #0f172a);
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -moz-appearance: textfield;
}
.tiup-ux-product .tiup-ux-sticky-qty-val::-webkit-outer-spin-button,
.tiup-ux-product .tiup-ux-sticky-qty-val::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Buy Button */
.tiup-ux-product .tiup-ux-sticky-buy {
  height: 40px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid var(--tiup-gold, #f2b400);
  border-radius: 4px;
  background: var(--tiup-gold, #f2b400);
  color: var(--tiup-ink, #111);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.tiup-ux-product .tiup-ux-sticky-buy:hover:not(:disabled) {
  background: #e5a800;
  box-shadow: 0 2px 8px rgba(242, 180, 0, 0.4);
}
.tiup-ux-product .tiup-ux-sticky-buy:active:not(:disabled) {
  transform: translateY(1px);
}
.tiup-ux-product .tiup-ux-sticky-buy:disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Help Button */
.tiup-ux-product .tiup-ux-sticky-help {
  height: 40px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--tiup-line, #cbd5e1);
  border-radius: 4px;
  background: #fff;
  color: var(--tiup-ink, #334155);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tiup-ux-product .tiup-ux-sticky-help:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  text-decoration: none;
}
.tiup-ux-product .tiup-ux-sticky-phone-icon {
  fill: #e67e22;
  flex-shrink: 0;
}

/* Obstructed by mobile drawer / modal */
.tiup-ux-product.tiup-ux-menu-visible .tiup-ux-sticky {
  visibility: hidden !important;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .tiup-ux-product .tiup-ux-sticky-container {
    padding: 6px 12px;
    gap: 10px;
  }
  .tiup-ux-product .tiup-ux-sticky-title {
    max-width: 220px;
  }
}

@media (max-width: 767px) {
  .tiup-ux-product .tiup-ux-sticky-container {
    padding: 6px 10px;
    gap: 8px;
    min-height: 50px;
  }
  .tiup-ux-product .tiup-ux-sticky-info {
    display: none;
  }
  .tiup-ux-product .tiup-ux-sticky-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .tiup-ux-product .tiup-ux-sticky-qty {
    height: 38px;
  }
  .tiup-ux-product .tiup-ux-sticky-qty-btn {
    width: 28px;
  }
  .tiup-ux-product .tiup-ux-sticky-qty-val {
    width: 36px;
    font-size: 12px;
  }
  .tiup-ux-product .tiup-ux-sticky-buy {
    flex: 1 1 auto;
    height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }
  .tiup-ux-product .tiup-ux-sticky-help {
    height: 38px;
    padding: 0 10px;
  }
  .tiup-ux-product .tiup-ux-sticky-help-text {
    display: none;
  }
}
