/* Shared base: each variant sets the custom properties below. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* Fabric-like placeholders for product imagery */
.tone-satin-black  { background: linear-gradient(135deg, #0b0a0c 0%, #2a2630 38%, #0f0e12 52%, #3a3440 70%, #121015 100%); }
.tone-satin-wine   { background: linear-gradient(130deg, #2a0812 0%, #6b1a2e 35%, #3a0c18 55%, #8a2a40 72%, #2e0a14 100%); }
.tone-velvet-wine  { background: radial-gradient(120% 90% at 30% 20%, #7a1d33 0%, #4a0f1e 45%, #22060d 100%); }
.tone-velvet-black { background: radial-gradient(120% 90% at 70% 25%, #2d2830 0%, #141216 50%, #060507 100%); }
.tone-champagne    { background: linear-gradient(140deg, #c9b08a 0%, #efe0c4 35%, #b8976a 60%, #e8d5b2 80%, #a88758 100%); }
.tone-tulle-rose   { background: linear-gradient(150deg, #5a2232 0%, #b06a78 40%, #6e2c3c 65%, #c58a92 85%, #4e1c2a 100%); }
.tone-lace-plum, .tone-lace-black { position: relative; }
.tone-lace-plum  { background:
  radial-gradient(circle at 50% 50%, transparent 5px, rgba(255,255,255,.05) 6px, transparent 7px) 0 0/22px 22px,
  radial-gradient(circle at 0 0, transparent 9px, rgba(255,255,255,.06) 10px, transparent 11px) 0 0/22px 22px,
  linear-gradient(160deg, #3b1630, #5d2547 45%, #2a0f22); }
.tone-lace-black { background:
  radial-gradient(circle at 50% 50%, transparent 5px, rgba(255,255,255,.06) 6px, transparent 7px) 0 0/20px 20px,
  radial-gradient(circle at 0 0, transparent 8px, rgba(255,255,255,.05) 9px, transparent 10px) 0 0/20px 20px,
  linear-gradient(160deg, #141214, #2a2428 50%, #0c0a0c); }

/* Product card */
.card { display: flex; flex-direction: column; }
.card-media {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--radius, 0);
}
.card-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .7s ease, filter .7s ease;
}
.card-img-2 { opacity: 0; transform: scale(1.12); }
.card:hover .card-img:not(.card-img-2) { transform: scale(1.06); filter: brightness(.7); }
.card:hover .card-img-2 { opacity: 1; transform: scale(1.03); }
.card-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(0deg, rgba(10,4,8,.55), transparent 35%);
  opacity: 0; transition: opacity .5s;
}
.card:hover .card-media::after { opacity: 1; }
.card-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 10px; background: var(--tag-bg, var(--accent)); color: var(--tag-fg, #1a1014);
}
.card-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; color: #f3e6cf; background: rgba(0,0,0,.25); backdrop-filter: blur(4px);
}
.card-fav.on { color: var(--accent); }
.card-add {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2;
  padding: 12px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  background: var(--btn-bg, var(--accent)); color: var(--btn-fg, #1a1014);
  transform: translateY(140%); transition: transform .35s ease;
  border-radius: var(--radius-sm, 0);
}
.card:hover .card-add, .card-add:focus-visible { transform: none; }
@media (hover: none) { .card-add { transform: none; } }
.card-body { padding: 14px 2px 0; }
.card-cat { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.card-name { margin: 4px 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.25; }
.card-price { display: flex; gap: 10px; align-items: baseline; }
.card-price s { color: var(--muted); font-size: 13px; }
.card-price b { font-weight: 500; color: var(--price, var(--text)); }

/* Cart drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(8,4,6,.55); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 91;
  background: var(--surface); color: var(--text);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .4s cubic-bezier(.2,.7,.2,1);
  border-left: 1px solid var(--line);
}
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 24px; }
.drawer-head button { font-size: 26px; line-height: 1; }
.drawer-items { flex: 1; overflow: auto; padding: 12px 24px; }
.drawer-empty { color: var(--muted); text-align: center; margin-top: 60px; }
.line { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-thumb { width: 56px; height: 72px; object-fit: cover; border-radius: var(--radius-sm-img, 0); }
.drawer-open .line { animation: lineIn .5s both; }
.drawer-open .line:nth-child(2) { animation-delay: .06s; }
.drawer-open .line:nth-child(3) { animation-delay: .12s; }
@keyframes lineIn { from { opacity: 0; transform: translateX(30px); } }

/* Cart button bump after fly-to-cart */
.bump { animation: bump .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.line-info { display: flex; flex-direction: column; font-size: 14px; }
.line-info small { color: var(--muted); }
.line b { font-weight: 500; font-size: 14px; }
.line-rm { font-size: 20px; color: var(--muted); }
.drawer-foot { padding: 20px 24px 28px; border-top: 1px solid var(--line); }
.drawer-total { display: flex; justify-content: space-between; margin-bottom: 16px; }
.drawer-foot .btn { width: 100%; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 22px; font-size: 14px;
  background: var(--toast-bg, #1a1014); color: var(--toast-fg, #f3e6cf);
  border: 1px solid var(--accent); transition: all .3s ease;
  border-radius: var(--radius-sm, 0);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
