:root {
  --ink: #171715;
  --paper: #fff;
  --ease: cubic-bezier(.2,.75,.2,1);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
button { color: inherit; font: inherit; }
.storefront { position: relative; width: 100%; height: 100%; min-height: 520px; overflow: hidden; isolation: isolate; background: #fff; }
.floor { position: absolute; z-index: 0; inset: 0; }
.floor::before {
  content: ""; position: absolute; z-index: 0; inset: 0;
  background-image: linear-gradient(rgba(20,18,16,.035), rgba(20,18,16,.035)), url('assets/carpet.webp');
  background-position: center center; background-size: cover;
  opacity: 1; transition: opacity .45s ease;
}
.topbar { position: absolute; z-index: 30; pointer-events: none; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: flex-end; padding: 25px 30px; }
.topbar > * { pointer-events: auto; }
.bag-button { border: 0; background: rgba(255,255,255,.72); padding: 10px 13px; border-radius: 2px; cursor: pointer; letter-spacing: .08em; font-size: 10px; font-weight: 700; backdrop-filter: blur(8px); }
.bag-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 6px; border-radius: 50%; background: #171715; color: #fff; font-size: 9px; }
.product-object { position: absolute; z-index: 10; left: 31%; top: 51%; width: clamp(132px, 15vw, 220px); padding: 0; border: 0; outline-offset: 8px; background: transparent; cursor: pointer; transform: translate(-50%,-50%) rotate(-1.4deg); transition: left .9s var(--ease), top .9s var(--ease), width .9s var(--ease), transform .45s var(--ease), filter .45s var(--ease); filter: drop-shadow(0 12px 10px rgba(0,0,0,.23)); -webkit-tap-highlight-color: transparent; }
.product-object img { display: block; width: 100%; height: auto; user-select: none; }
.product-object:hover, .product-object:focus-visible { z-index: 12; transform: translate(-50%,calc(-50% - 12px)) rotate(0deg) scale(1.055); filter: drop-shadow(0 22px 15px rgba(0,0,0,.3)); }
.product-panel { position: absolute; z-index: 20; inset: 0; width: 100%; height: 100%; padding: 28px 34px; background: var(--paper); opacity: 0; pointer-events: none; transition: opacity .48s ease; }
.back-button { position: relative; z-index: 2; padding: 8px 0; border: 0; background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.back-button span { margin-right: 8px; font-size: 14px; vertical-align: -1px; }
.product-copy { position: absolute; z-index: 7; left: 7vw; right: auto; width: min(38vw, 520px); bottom: clamp(55px, 17vh, 150px); padding-top: 25px; border-top: 1px solid #e8e8e5; opacity: 0; transform: translateY(14px); transition: opacity .4s ease .3s, transform .5s var(--ease) .3s; }
.eyebrow { margin: 0 0 12px; color: #777; font-size: 9px; letter-spacing: .13em; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 43px); line-height: .98; letter-spacing: -.055em; font-weight: 500; }
.product-subtitle { margin: 11px 0 0; color: #666; font-size: 12px; }
.description { max-width: 390px; margin: 26px 0 30px; color: #555; font-size: 12px; line-height: 1.65; }
.purchase-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.price { font-size: 10px; font-weight: 700; letter-spacing: .09em; }
.add-button { border: 0; padding: 15px 18px; background: #171715; color: #fff; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .1em; transition: background .2s ease, transform .2s ease; }
.add-button:hover { background: #454541; transform: translateY(-2px); }
.add-button span { margin-left: 22px; font-size: 13px; }
.checkout-note { margin: 13px 0 0; color: #999; font-size: 9px; line-height: 1.5; }
.storefront.is-open .floor::before { opacity: 0; }
/* Let clicks pass through the now-transparent carpet layer to the product panel. */
.storefront.is-open .product-panel { z-index: 20; opacity: 1; pointer-events: auto; }
.storefront.is-open .product-object { left: 76%; top: 37%; width: clamp(170px, 19vw, 270px); transform: translate(-50%,-50%) rotate(0); z-index: 25; pointer-events: none; filter: drop-shadow(0 17px 14px rgba(0,0,0,.19)); }
.storefront.is-open .product-copy { opacity: 1; transform: translateY(0); }
.cart-backdrop { position: absolute; z-index: 39; inset: 0; background: rgba(0,0,0,.25); }
.cart-panel { position: absolute; z-index: 40; top: 0; right: 0; width: min(420px, 100%); height: 100%; padding: 27px 28px; background: #fff; transform: translateX(101%); transition: transform .45s var(--ease); display: flex; flex-direction: column; }
.cart-panel.is-visible { transform: translateX(0); }
.cart-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e7e7e4; padding-bottom: 18px; }
.cart-heading h2 { margin: 0; font-size: 11px; letter-spacing: .1em; }
.cart-heading h2 span { color: #888; font-weight: 400; }
.cart-close { border: 0; background: transparent; font-size: 25px; line-height: 1; cursor: pointer; }
.cart-content { flex: 1; padding: 20px 0; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 13px; font-size: 11px; }
.cart-item img { width: 64px; height: 82px; object-fit: contain; }
.cart-item-title { font-weight: 700; }
.cart-item-meta { margin-top: 5px; color: #888; font-size: 9px; }
.remove-item { border: 0; background: transparent; color: #777; text-decoration: underline; font-size: 9px; cursor: pointer; }
.empty-cart { color: #777; font-size: 12px; }
.cart-footnote { padding-top: 14px; border-top: 1px solid #e7e7e4; color: #999; font-size: 9px; line-height: 1.5; }
.toast { position: absolute; z-index: 50; bottom: 25px; left: 50%; padding: 11px 15px; background: #171715; color: #fff; font-size: 10px; letter-spacing: .04em; opacity: 0; transform: translate(-50%, 10px); transition: opacity .25s ease, transform .25s ease; pointer-events: none; white-space: nowrap; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  .topbar { padding: 18px 17px; }
  .product-object { left: 50%; top: 51%; width: clamp(145px, 39vw, 205px); }
  .product-panel { padding: 17px 20px; }
  .storefront.is-open .product-object { left: 50%; top: 27%; width: clamp(155px, 42vw, 215px); }
  .product-copy { left: 22px; right: 22px; width: auto; bottom: 28px; }
  h1 { font-size: clamp(29px, 8vw, 38px); }
  .description { margin: 18px 0 20px; }
  .purchase-row { align-items: flex-end; }
  .add-button { padding: 14px 13px; }
  .cart-panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
