/* =====================================================================
   W.I. Freight — Hamper shop (store.php + product-details.php)
   Scoped under .wsh so old shop CSS can't clash.
   ===================================================================== */

.wsh, .wsh-toast {
  --sh-primary: var(--color-primary, #2e3192);
  --sh-accent: var(--color-secondary, #be0119);
  --sh-ink: #14163a;
  --sh-muted: #5f6380;
  --sh-line: rgba(20, 22, 58, .08);
  --sh-tint: rgba(46, 49, 146, .06);
  --sh-font: "Grotesk", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --sh-ease: cubic-bezier(.2, .8, .2, 1);
}
.wsh { display: block; background: #f5f6fb; color: var(--sh-ink); }
.wsh *, .wsh *::before, .wsh *::after, .wsh-toast * { box-sizing: border-box; }
.wsh *:not(.bi), .wsh-toast *:not(.bi) { font-family: var(--sh-font); }
.wsh a { text-decoration: none; }
.wsh-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wsh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hero ---------- */
.wsh-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 5.5rem;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(255, 255, 255, .14), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(190, 1, 25, .35), transparent 60%),
    linear-gradient(135deg, var(--sh-primary) 0%, #1d1f6b 100%);
}
.wsh-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  pointer-events: none;
}
.wsh-hero .wsh-container { position: relative; z-index: 1; }
.wsh-crumbs {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-bottom: 1.1rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: .85rem;
  color: rgba(255, 255, 255, .75);
}
.wsh-crumbs a { color: rgba(255, 255, 255, .9); }
.wsh-crumbs a:hover { color: #fff; }
.wsh-crumbs .bi { font-size: .7rem; }
.wsh-crumbs-dark { background: #fff; border: 1px solid var(--sh-line); color: var(--sh-muted); }
.wsh-crumbs-dark a { color: var(--sh-primary); }
.wsh-crumbs-dark a:hover { color: var(--sh-accent); }
.wsh-eyebrow {
  display: flex; width: max-content; margin: 0 auto .7rem;
  align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #ff6b7d;
}
.wsh-eyebrow-dark { margin: 0 0 .6rem; color: var(--sh-accent); }
.wsh-hero h1 { margin: 0 0 .75rem; font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; color: #fff; }
.wsh-hero p { max-width: 36rem; margin: 0 auto 2rem; font-size: 1.08rem; line-height: 1.6; color: rgba(255, 255, 255, .82); }

.wsh-search {
  display: flex; align-items: center; gap: .6rem;
  max-width: 560px;
  height: 60px;
  margin: 0 auto;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .55);
  cursor: text;
}
.wsh-search .bi { color: var(--sh-primary); font-size: 1.15rem; }
.wsh-search input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  color: var(--sh-ink); font-size: 1.02rem;
}
.wsh .wsh-search input::placeholder { color: #9a9db3 !important; opacity: 1; }
.wsh-search:focus-within { box-shadow: 0 0 0 4px rgba(255, 255, 255, .3), 0 24px 48px -24px rgba(0, 0, 0, .55); }

/* ---------- Toolbar + grid ---------- */
.wsh-main { padding: 0 0 4.5rem; }
.wsh-toolbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: -2rem 0 1.75rem;
  padding: .8rem 1rem .8rem 1.4rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 36px -22px rgba(20, 22, 58, .4);
}
.wsh-count { font-weight: 700; color: var(--sh-primary); }
.wsh-sort { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--sh-muted); font-size: .92rem; }
.wsh-sort select {
  height: 42px;
  padding: 0 2.2rem 0 .9rem;
  border: 1px solid var(--sh-line);
  border-radius: 12px;
  background: #f7f8fc;
  color: var(--sh-ink);
  font-size: .95rem;
  cursor: pointer;
}

.wsh-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }

.wsh-card {
  display: flex; flex-direction: column;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--sh-line);
  overflow: hidden;
  box-shadow: 0 16px 32px -26px rgba(20, 22, 58, .5);
  animation: sh-in .5s var(--sh-ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
  transition: transform .3s var(--sh-ease), box-shadow .3s;
}
.wsh-card:hover { transform: translateY(-6px); box-shadow: 0 28px 44px -28px rgba(20, 22, 58, .6); }
@keyframes sh-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wsh-card-img { display: grid; place-items: center; aspect-ratio: 1; padding: 1.25rem; background: radial-gradient(circle at 50% 60%, #fff, #f1f2f8); }
.wsh .wsh-card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--sh-ease); }
.wsh-card:hover .wsh-card-img img { transform: scale(1.06); }
.wsh-card-body { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.1rem 1.1rem; flex: 1 1 auto; }
.wsh-unit {
  align-self: flex-start;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--sh-tint);
  color: var(--sh-muted);
  font-size: .78rem;
  font-weight: 600;
}
.wsh-card h3 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.wsh-card h3 a { color: var(--sh-ink); }
.wsh-card h3 a:hover { color: var(--sh-primary); }
.wsh-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .35rem; }
.wsh-price { font-size: 1.35rem; font-weight: 700; color: var(--sh-accent); letter-spacing: -.01em; }
.wsh-add {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 40px;
  padding: 0 .95rem;
  border: 0;
  border-radius: 999px;
  background: var(--sh-primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.wsh-add:hover { background: var(--sh-accent); transform: translateY(-1px); }
.wsh-add.is-busy { opacity: .7; pointer-events: none; }
.wsh-add.is-done { background: #128c4a; }
.wsh-add.is-done .bi::before { content: "\f26e"; } /* check */

/* skeleton */
.wsh-skel { padding: 1rem; gap: .7rem; animation: none; }
.wsh-skel span { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, #eceef6 25%, #f6f7fb 50%, #eceef6 75%) 0 0 / 200% 100%; animation: sh-shimmer 1.2s linear infinite; }
.wsh-skel .wsh-skel-img { height: auto; aspect-ratio: 1; border-radius: 16px; }
.wsh-skel span:last-child { width: 50%; }
@keyframes sh-shimmer { to { background-position: -200% 0; } }

.wsh-empty {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--sh-line);
  text-align: center;
  color: var(--sh-muted);
}
.wsh-empty > .bi { font-size: 2.2rem; color: var(--sh-primary); }
.wsh-empty h3 { margin: .75rem 0 .35rem; font-size: 1.3rem; color: var(--sh-ink); }
.wsh-empty p { margin: 0 0 1.25rem; }

.wsh-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; }
.wsh-perks > div { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.25rem; border-radius: 18px; background: #fff; border: 1px solid var(--sh-line); }
.wsh-perks .bi { flex: 0 0 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--sh-tint); color: var(--sh-accent); font-size: 1.25rem; }
.wsh-perks strong { display: block; color: var(--sh-ink); }
.wsh-perks span { color: var(--sh-muted); font-size: .9rem; }
.wsh-perks a { color: var(--sh-primary); font-weight: 600; }

/* ---------- Buttons ---------- */
.wsh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 52px;
  padding: 0 1.35rem;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.wsh-btn:hover { transform: translateY(-2px); }
.wsh-btn-red { background: var(--sh-accent); color: #fff; box-shadow: 0 14px 26px -14px var(--sh-accent); }
.wsh-btn-red:hover { color: #fff; }
.wsh-btn-outline { background: #fff; color: var(--sh-primary); border-color: rgba(46, 49, 146, .25); }
.wsh-btn-outline:hover { color: var(--sh-primary); background: var(--sh-tint); }
.wsh a:focus-visible, .wsh button:focus-visible, .wsh input:focus-visible, .wsh select:focus-visible { outline: 3px solid rgba(46, 49, 146, .45); outline-offset: 2px; }

/* ---------- Product page ---------- */
.wsh-product-wrap { padding: 2rem 0 4.5rem; }
.wsh-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 1.5rem;
}
.wsh-p-media {
  position: sticky; top: 100px;
  display: grid; place-items: center;
  aspect-ratio: 1;
  padding: 2.5rem;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 60%, #fff, #eef0f8);
  border: 1px solid var(--sh-line);
  box-shadow: 0 30px 60px -40px rgba(20, 22, 58, .6);
}
.wsh .wsh-p-media img { width: 100%; height: 100%; object-fit: contain; animation: sh-in .6s var(--sh-ease) both; }
.wsh-p-info h1 { margin: 0 0 .9rem; font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--sh-primary); }
.wsh-p-price-row { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.25rem; }
.wsh-p-price { font-size: 2.2rem; font-weight: 700; color: var(--sh-accent); letter-spacing: -.02em; }
.wsh-p-desc { margin: 0 0 1.5rem; font-size: 1.05rem; line-height: 1.75; color: #3b3e62; }
.wsh-p-buy { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 2rem; padding: 1.25rem; border-radius: 20px; background: #fff; border: 1px solid var(--sh-line); }
.wsh-p-buy .wsh-btn { flex: 1 1 160px; }
.wsh-qty { display: inline-flex; align-items: center; height: 52px; border-radius: 14px; border: 1.5px solid var(--sh-line); background: #f7f8fc; overflow: hidden; }
.wsh-qty button { width: 46px; height: 100%; border: 0; background: transparent; color: var(--sh-primary); font-size: 1.2rem; cursor: pointer; }
.wsh-qty button:hover { background: var(--sh-tint); }
.wsh-qty input { width: 48px; height: 100%; border: 0; background: transparent; text-align: center; font-size: 1.05rem; font-weight: 700; color: var(--sh-ink); -moz-appearance: textfield; }
.wsh-qty input::-webkit-outer-spin-button, .wsh-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wsh-p-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.wsh-p-facts li { display: flex; align-items: center; gap: .9rem; }
.wsh-p-facts .bi { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--sh-tint); color: var(--sh-accent); font-size: 1.15rem; }
.wsh-p-facts strong { display: block; color: var(--sh-ink); }
.wsh-p-facts span { color: var(--sh-muted); font-size: .92rem; }

.wsh-p-missing { display: none; grid-column: 1 / -1; padding: 3rem 1.5rem; border-radius: 22px; background: #fff; text-align: center; color: var(--sh-muted); }
.wsh-p-missing > .bi { font-size: 2.4rem; color: var(--sh-primary); }
.wsh-p-missing h2 { margin: .75rem 0 .4rem; font-size: 1.5rem; color: var(--sh-ink); }
.wsh-p-missing p { margin: 0 0 1.5rem; }
.wsh-product.is-missing > :not(.wsh-p-missing), .wsh-product.is-error > :not(.wsh-p-missing) { display: none; }
.wsh-product.is-missing .wsh-p-missing, .wsh-product.is-error .wsh-p-missing { display: block; }
.wsh-product.is-loading .wsh-p-info h1, .wsh-product.is-loading .wsh-p-price-row { opacity: .4; }
.wsh-product:not(.is-loading):not(.is-missing):not(.is-error) .wsh-p-missing { display: none; }

.wsh-more { margin-top: 4rem; }
.wsh-more h2 { margin: 0 0 1.25rem; font-size: 1.5rem; font-weight: 700; color: var(--sh-ink); }

/* ---------- Toast ---------- */
.wsh-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 3000;
  display: flex; align-items: center; gap: .75rem;
  max-width: calc(100% - 32px);
  padding: .85rem 1rem .85rem 1.1rem;
  border-radius: 16px;
  background: #14163a;
  color: #fff;
  font-size: .95rem;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.wsh-toast.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.wsh-toast > .bi { color: #4be083; font-size: 1.2rem; }
.wsh-toast.is-error > .bi { color: #ff6b7d; }
.wsh-toast a { margin-left: .5rem; padding: .4rem .8rem; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; white-space: nowrap; text-decoration: none; }
.wsh-toast a:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .wsh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .wsh-product { grid-template-columns: 1fr; gap: 2rem; }
  .wsh-p-media { position: static; max-width: 520px; width: 100%; margin: 0 auto; }
  .wsh-perks { grid-template-columns: 1fr; }
}
@media (max-width: 767px) { .wsh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; } }
@media (max-width: 575px) {
  .wsh-container { padding: 0 16px; }
  .wsh-hero { padding: 2.5rem 0 4.5rem; }
  .wsh-hero p { font-size: 1rem; margin-bottom: 1.5rem; }
  .wsh-search { height: 54px; }
  .wsh-toolbar { padding: .7rem .9rem; }
  .wsh-sort span { display: none; }
  .wsh-card { border-radius: 18px; }
  .wsh-card-img { padding: .75rem; }
  .wsh-card-body { padding: .8rem .85rem .9rem; }
  .wsh-card h3 { font-size: .95rem; }
  .wsh-price { font-size: 1.1rem; }
  .wsh-add { width: 40px; padding: 0; justify-content: center; }
  .wsh-add span { display: none; }
  .wsh-p-media { padding: 1.5rem; border-radius: 22px; }
  .wsh-p-buy { padding: 1rem; }
  .wsh-p-buy .wsh-btn { flex: 1 1 100%; }
  .wsh-qty { flex: 1 1 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .wsh *, .wsh-toast { animation: none !important; transition-duration: .01ms !important; }
}
