@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #14181f;
  --linen: #f6f1e7;
  --fog: #dcd5c9;
  --brass: #b98d4f;
  --sage: #7c8471;
  --charcoal: #2b2a28;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--charcoal);
  background-color: var(--linen);
}

.font-display {
  font-family: "Fraunces", serif;
}

/* Visible keyboard focus, everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Signature element: the stitched seam
   A dashed running-stitch line used as a section divider, echoing the
   seam line on a real duvet cover or pillow edge.
   ========================================================================== */
.stitch-seam {
  position: relative;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0,
    currentColor 6px,
    transparent 6px,
    transparent 12px
  );
  opacity: 0.55;
}

.stitch-seam::before,
.stitch-seam::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: currentColor;
  opacity: 0.55;
}
.stitch-seam::before {
  left: 0;
}
.stitch-seam::after {
  right: 0;
}

/* ==========================================================================
   Fabric swatch — CSS-woven product visual (no photography required)
   Set --c1 / --c2 inline per product to reflect its actual colourway.
   ========================================================================== */
.fabric-swatch {
  position: relative;
  background: linear-gradient(135deg, var(--c1, #ede6d6), var(--c2, #dcd5c9));
  overflow: hidden;
}

.fabric-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.16) 0px,
      rgba(255, 255, 255, 0.16) 1px,
      transparent 1px,
      transparent 9px
    ),
    repeating-linear-gradient(
      28deg,
      rgba(20, 24, 31, 0.05) 0px,
      rgba(20, 24, 31, 0.05) 1px,
      transparent 1px,
      transparent 11px
    );
  mix-blend-mode: soft-light;
}

.fabric-swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 60px rgba(20, 24, 31, 0.18);
}

/* ==========================================================================
   Swing tag — the small hang-tag badge pinned to a product visual,
   modelled on a real bedding swing ticket (thread count / material).
   ========================================================================== */
.swing-tag {
  position: absolute;
  top: 14px;
  right: 0;
  background: var(--linen);
  color: var(--charcoal);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px 5px 10px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10% 100%, 0 65%);
  box-shadow: 0 2px 6px rgba(20, 24, 31, 0.18);
  white-space: nowrap;
}

.swing-tag::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--fog);
  border: 1px solid rgba(20, 24, 31, 0.3);
}

/* Category pill active state underline (thread-style) */
.pill-active {
  background-color: var(--ink);
  color: var(--linen);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Quantity stepper */
.qty-stepper button {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--charcoal);
  transition: background-color 0.15s ease;
}
.qty-stepper button:hover {
  background-color: var(--fog);
}

/* Custom scrollbar for horizontal rails */
.rail::-webkit-scrollbar {
  height: 6px;
}
.rail::-webkit-scrollbar-thumb {
  background-color: var(--fog);
  border-radius: 3px;
}

/* Product card lift */
.product-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -18px rgba(20, 24, 31, 0.35);
}

.add-to-cart-overlay {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.product-card:hover .add-to-cart-overlay,
.product-card:focus-within .add-to-cart-overlay {
  transform: translateY(0%);
}

/* Toast */
#toast {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
@keyframes skeleton-pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.skeleton-loader {
  animation: skeleton-pulse 1.5s infinite ease-in-out;
}