#quickViewOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1040;
  opacity: 0;
  transition: opacity .25s ease-in-out;
}

#quickViewSheet {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(480px, 100%);
  background: #fff;
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform .25s ease-in-out;
  overflow: auto;
  box-shadow: 0 0 24px rgba(0,0,0,.2);
}

#quickViewSheet.qv-open {
  transform: translateX(0);
}

/* Inner */
.qv-sheet-inner { padding: 12px; }
.qv-close { background: transparent; border: none; font-size: 24px; line-height: 1; }
.qv-body { display: grid; grid-template-columns: 1fr; gap: 10px; }
.qv-media img { width: 100%; border-radius: 6px; }
.qv-thumbs { display: flex; gap: 6px; margin-top: 8px; }
.qv-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: .7; border: 1px solid #eee; }
.qv-thumb.active, .qv-thumb:hover { opacity: 1; }
.qv-colours { display: flex; gap: 6px; flex-wrap: wrap; }
.qv-colour { width: 24px; height: 24px; border-radius: 4px; border-width: 2px; border-style: solid; cursor: pointer; outline: none; }
.qv-colour.active { box-shadow: 0 0 0 2px #333 inset; }
.qv-sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.qv-size { padding: 3px 7px; border: 1px solid #ddd; background: #fff; cursor: pointer; border-radius: 4px; font-size: 12px; }
.qv-size.active { background: #222; color: #fff; border-color: #222; }

/* Reuse details page classes but scale down inside sheet */
#quickViewSheet .product__details__text h3 { font-size: 18px; margin-bottom: 8px; }
#quickViewSheet .product__details__price { font-size: 16px; margin-bottom: 8px; }
#quickViewSheet .product__details__text p { font-size: 13px; line-height: 1.5; margin-bottom: 12px; }

/* Colour and size buttons from details page are large; scale within sheet */
#quickViewSheet .colour_button { width: 36px !important; height: 36px !important; border-width: 2px !important; }
#quickViewSheet .sc-3050c0d6-0.fHbA-dd { gap: 6px; }
#quickViewSheet .size_button { padding: 4px 8px; font-size: 12px; line-height: 1.2; }
#quickViewSheet .quantity .pro-qty { display: inline-flex; align-items: center; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; }
#quickViewSheet .quantity .pro-qty .qtybtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; cursor: pointer; user-select: none; color: #555; background: #f7f7f7; }
#quickViewSheet .quantity .pro-qty input { width: 56px; height: 32px; border: none; text-align: center; outline: none; }
#quickViewSheet .btn { padding: 6px 10px; font-size: 12px; }
#quickViewSheet .qv-actions { 
  display: flex; 
  gap: 8px; 
  margin-top: 12px; 
  flex-direction: row;
}
#quickViewSheet .qv-actions .btn { 
  flex: 1; 
  padding: 10px 12px; 
  font-size: 12px; 
  line-height: 1.3;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
#quickViewSheet #qvAddToCart { 
  background-color: #b88e2f; 
  border-color: #b88e2f; 
  color: white;
  font-weight: 500;
}
#quickViewSheet #qvAddToCart.loading { opacity: .7; }
#quickViewSheet #qvAddToCart:hover { 
  background-color: #a67c1f; 
  border-color: #a67c1f; 
}
#quickViewSheet #qvViewDetails { 
  background-color: #f8f9fa; 
  border: 1px solid #dee2e6; 
  color: #495057;
}
#quickViewSheet #qvViewDetails:hover { 
  background-color: #e9ecef; 
  border-color: #adb5bd; 
}

/* Compact spacing for sections */
#quickViewSheet .sc-b9686cc4-1.IjCFx.section { padding-bottom: 12px !important; }
#quickViewSheet .colour_text, #quickViewSheet .size_text { font-size: 13px; margin-bottom: 6px; }
#quickViewSheet .quantity.buttons_added { padding-bottom: 12px !important; }

@media (min-width: 576px) {
  .qv-body { grid-template-columns: 1fr 1fr; }
}

/* Mobile: keep some breathing space */
@media (max-width: 575.98px) {
  #quickViewSheet {
    width: calc(100% - 24px);
    left: 12px;
    right: 12px;
    border-radius: 8px;
  }
}

/* Home page card CTA size */
.featured .quick-view-btn { padding: 6px 10px !important; font-size: 12px !important; line-height: 1.2 !important; }

/* Overlay visibility helper */
#quickViewOverlay.visible { opacity: 1; }

/* Closing state triggers slide-out */
#quickViewSheet.qv-closing { transform: translateX(-100%); }



