input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

@keyframes fade-in {
  from {
      background-color: rgba(0, 0, 0, 0);
  }
  to {
      background-color: rgba(0, 0, 0, 0.8);
  }
}

@keyframes fade-out {
  from {
      background-color: rgba(0, 0, 0, 0.8);
  }
  to {
      background-color: rgba(0, 0, 0, 0);
  }
}

@keyframes slide-in {
  from {
      transform: translateX(500px);
  }
  to {
      transform: translateX(0px);
  }
}

@keyframes slide-out {
  from {
      transform: translateX(0px);
  }
  to {
      transform: translateX(500px);
  }
}


#cart-drawer[data-state="open"] {
  animation: fade-in 0.4s forwards;
}

body.cart-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

#cart-drawer[data-state="closed"] {
  animation: fade-out 0.4s forwards;
}

#cart-drawer[data-state="open"] > div {
  animation: slide-in 0.4s forwards;
}

#cart-drawer[data-state="closed"] > div {
  animation: slide-out 0.4s forwards;
}

.dialog[data-state="open"] {
  animation: fade-in 0.4s forwards;
}

.dialog[data-state="closed"] {
  animation: fade-out 0.4s forwards;
}

.dialog[data-state="open"] > div {
  animation: dialog-in 0.2s forwards;
}

.dialog[data-state="closed"] > div {
  animation: dialog-out 0.2s forwards;
}

@keyframes dialog-in {
  from {
      opacity: 0;
      scale: 50%;
  }
  to {
      opacity: 1;
      scale: 100%;
  }
}

@keyframes dialog-out {
  from {
      opacity: 1;
      scale: 100%;
  }
  to {
      opacity: 0;
      scale: 50%;
  }
}

.reveal-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transition-delay: var(--delay, 0s);
}

.reveal-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.rich-content iframe {
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  width: 100%;
  height: auto;
}

/* Rich-content typography. Tailwind preflight strips heading and list styles, so seller CMS/editor HTML
   (page.content, product descriptions, manual payment instructions) needs them restored here. */
.rich-content :first-child {
  margin-top: 0;
}

.rich-content p {
  margin: 0.75rem 0;
}

.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5, .rich-content h6 {
  font-weight: 700;
  line-height: 1.1;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  text-wrap: pretty;
}

.rich-content h1, .rich-content h2 {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
}

.rich-content h1 {
  font-size: 1.4rem;
}

.rich-content h2 {
  font-size: 1.2rem;
}

.rich-content h3 {
  font-size: 1.1rem;
}

.rich-content h4, .rich-content h5, .rich-content h6 {
  font-size: 1rem;
}

.rich-content ul, .rich-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.rich-content ul {
  list-style: disc outside;
}

.rich-content ol {
  list-style: decimal outside;
}

.rich-content ul ul {
  list-style: circle;
}

.rich-content li {
  display: list-item;
}

.rich-content li p {
  margin: 0.25em 0;
}

.rich-content a {
  color: hsl(var(--primary));
}

.rich-content a:hover {
  text-decoration: underline;
}

.rich-content blockquote {
  border-left: 3px solid rgb(var(--foreground) / 0.25);
  margin: 1.5rem 0;
  padding-left: 1rem;
}

.rich-content hr {
  border: none;
  border-top: 1px solid rgb(var(--foreground) / 0.15);
  margin: 2rem 0;
}

.rich-content code {
  background-color: rgb(var(--foreground) / 0.1);
  border-radius: 0.4rem;
  font-size: 0.85rem;
  padding: 0.25em 0.3em;
}

.rich-content pre {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
}

.rich-content pre code {
  background: none;
  font-size: 0.8rem;
  padding: 0;
}

.rich-content img {
  max-width: 100%;
  height: auto;
}

.grid-background {
  background-image: linear-gradient(to right,hsla(0,0%,100%,.03) 1px,transparent 1px),linear-gradient(to bottom,hsla(0,0%,100%,.03) 1px,transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 85% at 40% 30%, #000 0%, #fff0 110%)
}

@keyframes loading {
  0% {
      left: -50%;
  }

  to {
      left: 100%;
  }
}

.detail-dash {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1) 50%, rgb(var(--foreground) / 0) 0%);
  background-position: center bottom;
  background-size: 16px;
  background-repeat: repeat-x;
  width: 100%;
  height: 1px;
}

/* Payment tooltip in the recent-payments widget, opened by tap on mobile */
.group.is-active .payment-tooltip {
  opacity: 1;
  pointer-events: auto;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: hsl(var(--primary));
  border-radius: 0.25rem;
}

.animate-float {
  animation: floatRandom 15s ease-in-out infinite;
}

@keyframes floatRandom {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(-6px, -10px) rotate(-1deg);
  }
  40% {
    transform: translate(4px, -5px) rotate(1deg);
  }
  60% {
    transform: translate(-4px, -12px) rotate(-1.5deg);
  }
  80% {
    transform: translate(3px, -7px) rotate(1deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


.gradient-text {
  /* --primary/--secondary carry the store's own colors, so the gradient follows
     whatever the seller configured. Never put a fixed hex here. */
  background: linear-gradient(90deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 50%, hsl(var(--primary)) 100%);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 7s ease-in-out infinite;
}


.glass {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
}

.glass::after {
  content: "";
  transition: all 850ms cubic-bezier(.19,1,.22,1);
  background-color: white;
  opacity: .2;
  width: 50px;
  height: 200px;
  position: absolute;
  left: -85px;
  top: -80px;
  z-index: 1;
  transform: rotate(30deg);
  filter: blur(2px);
}

.glass:hover::after {
  left: 130%;
}

.glass-secondary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
}

.glass-secondary::after {
  content: "";
  transition: all 850ms cubic-bezier(.19,1,.22,1);
  background: linear-gradient(to right, transparent, hsl(var(--secondary) / 0.15), transparent);
  width: 100%;
  height: 200%;
  position: absolute;
  left: -150%;
  top: -50%;
  z-index: 1;
  transform: rotate(30deg);
  filter: blur(10px);
}

.glass-secondary:hover::after {
  left: 150%;
}

.faq-content {
  overflow: hidden;
}

.faq-summary {
  list-style: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: -2px;
}

.faq-icon {
  transition: transform 240ms cubic-bezier(.2, 0, 0, 1);
}

.faq-item[open]:not(.is-closing) .faq-icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .faq-icon {
    transition: none;
  }
}

@media (forced-colors: active) {
  .faq-summary:focus-visible {
    outline-color: Highlight;
  }
}
