/* ---------------- Product tile ---------------- */
.psi-product-tile{
  --psi-tile-width: 160px;
  --psi-tile-height: 160px;
  display:inline-block; width:var(--psi-tile-width);
  font-family:"Fira Sans",Arial,Helvetica,sans-serif;
  text-align:left; vertical-align:top;
}
.psi-product-img{
  width:var(--psi-tile-width); height:var(--psi-tile-height);
  border-radius:clamp(6px, calc(var(--psi-tile-width) / 20), 16px);
  overflow:hidden; background:#faf5f2;
  display:flex; align-items:center; justify-content:center;
}
.psi-product-img img{
  width:100%; height:100%; object-fit:contain; display:block;
}
.psi-product-name{
  margin-top:8px; font-size:clamp(.8rem, calc(var(--psi-tile-width) / 11.5), 1.8rem);
  font-weight:600; color:#333;
  line-height:1.3; overflow:hidden; text-overflow:ellipsis;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.psi-product-price{
  margin-top:2px; font-size:clamp(.78rem, calc(var(--psi-tile-width) / 12), 1.6rem);
  font-weight:700; color:#660000;
}
.psi-product-tile-soldout .psi-product-img{ opacity:.5; }
.psi-qty-unavailable{
  margin-top:8px; font-size:clamp(.7rem, calc(var(--psi-tile-width) / 14), 1rem);
  color:#999; font-weight:600;
  text-transform:uppercase; letter-spacing:.04em;
}

/* Quantity stepper: [ − N + ] — scales with tile width, capped so it
   never grows absurdly large on very big tiles */
.psi-qty-stepper{
  margin-top:8px; display:inline-flex; align-items:center;
  border:1.5px solid #661541; border-radius:4px; overflow:hidden;
  font-family:inherit;
}
.psi-qty-stepper button{
  width:clamp(26px, calc(var(--psi-tile-width) / 5.5), 46px);
  height:clamp(26px, calc(var(--psi-tile-width) / 5.5), 46px);
  border:none; background:#fff; color:#661541;
  font-size:clamp(.85rem, calc(var(--psi-tile-width) / 10), 1.6rem);
  font-weight:700; cursor:pointer; line-height:1;
  display:flex; align-items:center; justify-content:center;
}
.psi-qty-stepper button:hover{ background:#661541; color:#fff; }
.psi-qty-value{
  min-width:clamp(24px, calc(var(--psi-tile-width) / 6), 44px);
  text-align:center; font-size:clamp(.8rem, calc(var(--psi-tile-width) / 11), 1.4rem);
  font-weight:700; color:#333; background:#faf5f2;
}

/* ---------------- Category grid ---------------- */
.psi-product-grid{
  display:flex; flex-wrap:wrap; gap:24px 20px;
}

/* ---------------- Floating cart widget ---------------- */
.psi-cart-float{
  position:fixed; right:20px; bottom:20px; z-index:9999;
  display:flex; flex-direction:column; align-items:flex-end; gap:8px;
  font-family:"Fira Sans",Arial,Helvetica,sans-serif;
}
.psi-cart-btn{
  display:flex; align-items:center; gap:10px;
  background:#661541; color:#fff; border:none; border-radius:30px;
  padding:14px 20px; font-size:.9rem; font-weight:600; cursor:pointer;
  box-shadow:0 10px 24px rgba(102,0,0,.28); transition:background .2s, transform .15s;
}
.psi-cart-btn:hover{ background:#8c0000; transform:translateY(-2px); }
.psi-cart-btn:focus-visible{ outline:3px solid #fff; outline-offset:2px; }
.psi-cart-ic{ font-size:1.15rem; line-height:1; }
.psi-cart-badge-wrap{ align-items:center; justify-content:center; }
.psi-cart-badge{
  background:#fff; color:#660000; font-weight:800; font-size:.76rem;
  min-width:20px; height:20px; padding:0 5px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
}

@media (max-width:520px){
  .psi-cart-float{ right:12px; bottom:12px; }
  .psi-cart-label{ display:none; }
  .psi-cart-btn{ padding:14px; border-radius:50%; }
}

/* ---------------- Cart drawer ---------------- */
.psi-cart-drawer-back{
  position:fixed; inset:0; z-index:10000; background:rgba(20,10,10,.5);
  display:flex; justify-content:flex-end;
  opacity:0; pointer-events:none; transition:opacity .22s ease;
  font-family:"Fira Sans",Arial,Helvetica,sans-serif;
}
.psi-cart-drawer-back.psi-cart-drawer-open{ opacity:1; pointer-events:all; }
.psi-cart-drawer{
  width:100%; max-width:400px; height:100%; background:#fff;
  display:flex; flex-direction:column;
  transform:translateX(24px); transition:transform .22s ease;
  box-shadow:-12px 0 32px rgba(0,0,0,.18);
}
.psi-cart-drawer-back.psi-cart-drawer-open .psi-cart-drawer{ transform:translateX(0); }

.psi-cart-drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 22px; border-bottom:1px solid #eee;
}
.psi-cart-drawer-head h2{ margin:0; font-size:1.2rem; color:#660000; }
.psi-cart-drawer-close{
  background:none; border:none; font-size:1.5rem; line-height:1; cursor:pointer;
  color:#333; width:32px; height:32px;
}
.psi-cart-drawer-close:hover{ color:#8c0000; }

.psi-cart-drawer-body{ flex:1; overflow-y:auto; padding:10px 22px; }
.psi-cart-drawer-empty{ color:#777; text-align:center; margin-top:40px; }

.psi-cart-row{
  display:flex; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid #f0f0f0;
}
.psi-cart-row-img{
  width:56px; height:56px; flex:none; border-radius:6px; overflow:hidden;
  background:#faf5f2; display:flex; align-items:center; justify-content:center;
}
.psi-cart-row-img img{ width:100%; height:100%; object-fit:contain; }
.psi-cart-row-body{ flex:1; min-width:0; }
.psi-cart-row-name{ font-weight:600; font-size:.92rem; color:#333; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.psi-cart-row-price{ font-size:.84rem; color:#660000; margin-top:2px; }
.psi-cart-row-qty{ display:flex; align-items:center; gap:8px; margin-top:6px; }
.psi-cart-row-qty button{
  width:22px; height:22px; border-radius:4px; border:1px solid #ddd; background:#fff;
  cursor:pointer; font-size:.9rem; line-height:1; display:flex; align-items:center; justify-content:center;
}
.psi-cart-row-qty button:hover{ background:#f6f6f6; }
.psi-cart-row-qty span{ min-width:18px; text-align:center; font-size:.86rem; }
.psi-cart-row-remove{
  background:none; border:none; color:#999; font-size:1.1rem; cursor:pointer; flex:none; align-self:flex-start;
}
.psi-cart-row-remove:hover{ color:#8c0000; }

.psi-cart-drawer-foot{ border-top:1px solid #eee; padding:16px 22px 20px; }
.psi-cart-drawer-subtotal{ display:flex; justify-content:space-between; font-size:.95rem; margin-bottom:12px; }
.psi-cart-checkout{
  width:100%; background:#661541; color:#fff; border:none; border-radius:4px;
  padding:13px; font-size:.94rem; font-weight:700; cursor:pointer; margin-bottom:8px;
}
.psi-cart-checkout:hover{ background:#8c0000; }
.psi-cart-drawer-clear{
  width:100%; background:none; border:none; color:#8c0000; font-size:.78rem;
  cursor:pointer; padding:4px;
}
.psi-cart-drawer-clear:hover{ text-decoration:underline; }

body.psi-cart-drawer-locked{ overflow:hidden; }

@media (max-width:480px){
  .psi-cart-drawer{ max-width:100%; }
}

/* ---------------- Spotlight (promotional / "just dropped") card ---------------- */
.psi-spotlight{
  display:flex; flex-wrap:wrap; gap:36px; align-items:flex-start;
  background:#faf5f2; border-top:1px solid rgba(102,0,0,.10); border-bottom:1px solid rgba(102,0,0,.10);
  padding:32px 28px; font-family:"Fira Sans",Arial,Helvetica,sans-serif;
}
.psi-spotlight-media{
  display:flex; flex-direction:column; gap:14px; width:var(--psi-spot-w,320px); flex:none;
}
.psi-spotlight-img{
  width:100%; height:var(--psi-spot-h,320px);
  border-radius:14px; overflow:hidden; background:#f0e4dc;
  display:flex; align-items:center; justify-content:center;
}
.psi-spotlight-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.psi-spotlight-body{ flex:1; min-width:260px; padding-top:4px; }

.psi-spotlight-badge{
  display:inline-block; background:#b8860b; color:#fff; font-family:"Fira Sans Condensed",Arial,Helvetica,sans-serif;
  font-weight:700; font-size:.72rem; letter-spacing:.08em; text-transform:uppercase;
  padding:6px 14px; border-radius:20px; margin-bottom:14px;
}
.psi-spotlight-name{
  font-family:"Fira Sans",Arial,Helvetica,sans-serif !important; font-weight:800 !important; color:#660000 !important;
  font-size:clamp(1.6rem,3vw,2.2rem) !important; line-height:1.12 !important; margin:0 0 10px !important;
}
.psi-spotlight-descriptors{
  font-family:"Fira Sans Condensed",Arial,Helvetica,sans-serif; font-weight:700; font-size:.82rem;
  letter-spacing:.08em; text-transform:uppercase; color:#661541; margin-bottom:16px;
}

/* Description — rendered from Shopify's own rich-text formatting,
   so paragraphs/bold/lists/links need real styling, not just a
   flat paragraph like plain text did. */
.psi-spotlight-desc-wrap{
  position:relative; max-width:560px; margin:0 0 18px;
}
.psi-spotlight-desc{
  font-size:.98rem; line-height:1.65; color:#4a3550;
  max-height:1000px; overflow:hidden; transition:max-height .3s ease;
}
.psi-spotlight-desc p{ margin:0 0 12px; }
.psi-spotlight-desc p:last-child{ margin-bottom:0; }
.psi-spotlight-desc ul, .psi-spotlight-desc ol{ margin:0 0 12px; padding-left:20px; }
.psi-spotlight-desc li{ margin-bottom:4px; }
.psi-spotlight-desc strong, .psi-spotlight-desc b{ color:#660000; font-weight:700; }
.psi-spotlight-desc a{ color:#661541; text-decoration:underline; }

/* Collapsed state, applied by JS only when the content is actually
   longer than 8 real lines — the exact collapsed height is computed
   and set inline by JS (see setupReadMore in psi-cart.js), so it's
   always precisely 8 lines regardless of font-size. */
.psi-spotlight-desc-wrap.psi-desc-collapsed::after{
  content:""; position:absolute; left:0; right:0; bottom:34px; height:36px;
  background:linear-gradient(rgba(250,245,242,0), #faf5f2);
  pointer-events:none;
}
.psi-spotlight-readmore{
  display:inline-block; margin-top:8px; background:none; border:none; padding:0; cursor:pointer;
  font-family:"Fira Sans Condensed",Arial,Helvetica,sans-serif; font-weight:700; font-size:.84rem;
  letter-spacing:.04em; text-transform:uppercase; color:#661541;
}
.psi-spotlight-readmore:hover{ color:#8c0000; text-decoration:underline; }

.psi-spotlight-price-row{ display:flex; justify-content:center; }
.psi-spotlight-price{ font-weight:800; font-size:1.4rem; color:#660000; }

/* Add to Cart button — swaps for the [ − N + ] stepper once clicked.
   Kept as its own component (not the same wiring as the compact
   [psi_product] tile stepper) so this bigger, clearer button works
   independently. */
.psi-spotlight-cart{ width:100%; }
.psi-spotlight-addbtn{
  width:100%; background:#661541; color:#fff; border:none; border-radius:4px;
  padding:13px 18px; font-family:"Fira Sans",Arial,Helvetica,sans-serif; font-weight:700; font-size:.94rem;
  cursor:pointer; transition:background .2s;
}
.psi-spotlight-addbtn:hover{ background:#8c0000; }

/* Stepper: same solid plum as the Add to Cart button it replaces —
   not a pale bordered box — so it reads as one deliberate control,
   not an empty leftover space. */
.psi-spotlight-cart .psi-qty-stepper{
  width:100%; display:flex; align-items:stretch;
  background:#661541; border-radius:4px; overflow:hidden;
}
.psi-spotlight-cart .psi-qty-stepper button{
  flex:0 0 52px; height:48px; background:transparent; border:none; color:#fff;
  font-size:1.3rem; font-weight:700; cursor:pointer; transition:background .2s;
}
.psi-spotlight-cart .psi-qty-stepper button:hover{ background:rgba(255,255,255,.18); }
.psi-spotlight-cart .psi-qty-value{
  flex:1; display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.12); color:#fff; font-weight:800; font-size:1.05rem;
}

@media (max-width:640px){
  .psi-spotlight{ flex-direction:column; align-items:center; text-align:center; }
  .psi-spotlight-media{ width:100%; max-width:var(--psi-spot-w,320px); }
  .psi-spotlight-desc-wrap{ margin-left:auto; margin-right:auto; }
  .psi-spotlight-price-row{ justify-content:center; }
}
