/* =========================================================
   BWET SHOP RESPONSIVE LAYER — compact two-card catalogue
   Loaded last on Shop, Cart, Checkout and Payment Status.
   ========================================================= */

html,body{max-width:100%;overflow-x:hidden}
.shop-section .container,
.cart-section .container,
.checkout-section .container{box-sizing:border-box!important}

/* ---------- CATALOGUE ---------- */
.shop-section{padding:24px 0 68px!important}
.shop-section>.container{
  width:min(100%,820px)!important;
  padding-inline:clamp(12px,3vw,24px)!important;
}
.shop-tools{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  margin-bottom:16px!important;
  padding-bottom:12px!important;
}
.shop-search-wrap{width:min(100%,390px)!important;max-width:390px!important}
.shop-tools input{height:40px!important;min-height:40px!important;font-size:13px!important}
.shop-tool-actions{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}
.cart-button{flex:0 0 auto!important;min-height:38px!important;padding-inline:11px!important}

/* Exactly two compact product cards per row. */
.product-grid{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
}
.product-item{
  min-width:0!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  padding:8px!important;
  border:1px solid rgba(23,23,23,.10)!important;
  border-top:2px solid #c99a2f!important;
  border-radius:11px!important;
  background:#fff!important;
  overflow:hidden!important;
  transform:none!important;
  box-shadow:none!important;
}
.product-media{
  position:relative!important;
  width:100%!important;
  height:120px!important;
  max-height:120px!important;
  aspect-ratio:auto!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  background:#eee8dc!important;
  overflow:hidden!important;
  isolation:isolate!important;
}
.product-media img{
  display:block!important;
  object-position:center!important;
}
.product-media-bg{
  position:absolute!important;
  inset:-8px!important;
  width:calc(100% + 16px)!important;
  height:calc(100% + 16px)!important;
  object-fit:cover!important;
  filter:blur(12px) saturate(.9)!important;
  opacity:.24!important;
  transform:scale(1.06)!important;
  z-index:0!important;
  pointer-events:none!important;
}
.product-media::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  background:rgba(255,255,255,.10);
  pointer-events:none;
}
.product-media-main{
  position:relative!important;
  z-index:2!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  padding:4px!important;
  transform:none!important;
}
.product-item:hover .product-media-main{transform:none!important}
.product-fallback{position:relative!important;z-index:2!important;width:46px!important;height:46px!important;padding:0!important;opacity:.35!important;object-fit:contain!important}
.product-copy{
  min-width:0!important;
  flex:1!important;
  display:flex!important;
  flex-direction:column!important;
  padding-top:8px!important;
}
.product-meta{
  min-width:0!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:3px 6px!important;
  font-size:9.5px!important;
  line-height:1.25!important;
  letter-spacing:.035em!important;
}
.product-meta span,.product-meta strong{min-width:0!important;overflow-wrap:anywhere!important}
.product-meta strong{font-size:12px!important;line-height:1.2!important}
.product-copy h2{
  margin:5px 0 3px!important;
  font-size:14px!important;
  line-height:1.15!important;
  letter-spacing:-.02em!important;
  overflow-wrap:anywhere!important;
}
.product-copy p{
  min-height:0!important;
  margin:0 0 7px!important;
  color:#6f6a60!important;
  font-size:10px!important;
  line-height:1.35!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:1!important;
  overflow:hidden!important;
}
.product-actions{
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:5px!important;
  margin-top:auto!important;
  padding-top:5px!important;
}
.product-actions .btn,.product-actions .buy-now{
  width:100%!important;
  max-width:none!important;
  min-height:34px!important;
  height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  padding:0 8px!important;
  border-radius:7px!important;
  font-size:10.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
  text-align:center!important;
}
.product-actions .btn img{width:13px!important;height:13px!important;flex:0 0 auto!important}
.shop-empty{grid-column:1/-1!important;min-height:220px!important;padding:24px 16px!important;border-radius:12px!important}

/* ---------- CART DRAWER ---------- */
.cart-drawer{width:min(430px,calc(100vw - 12px))!important;max-width:100vw!important}
.drawer-item{min-width:0!important}.drawer-item>div{min-width:0!important}.drawer-item h3{overflow-wrap:anywhere!important}
.drawer-actions{gap:8px!important}.drawer-actions .btn{min-width:0!important}

/* ---------- CART PAGE ---------- */
.cart-hero{padding:34px 0 26px!important}.cart-hero h1{font-size:clamp(32px,5vw,48px)!important}
.cart-section{padding:32px 0 72px!important}
.cart-section>.container{width:min(100%,1080px)!important;padding-inline:clamp(16px,4vw,48px)!important}
.cart-layout{min-width:0!important;grid-template-columns:minmax(0,1fr) minmax(260px,320px)!important;gap:28px!important}
.cart-row,.cart-copy,.cart-line{min-width:0!important}.cart-copy h2{overflow-wrap:anywhere!important}.cart-summary{min-width:0!important}

/* ---------- CHECKOUT ---------- */
.checkout-hero{padding:32px 0 24px!important}.checkout-hero h1{font-size:clamp(32px,5vw,48px)!important}
.checkout-section{padding:30px 0 68px!important}
.checkout-section>.container{width:min(100%,700px)!important;padding-inline:clamp(16px,4vw,36px)!important}
.checkout-grid,.checkout-form,.checkout-summary{max-width:100%!important;min-width:0!important}
.checkout-form{box-sizing:border-box!important;border:1px solid rgba(23,23,23,.10)!important;border-radius:14px!important;background:#fff!important}
.checkout-form input{max-width:100%!important}
.checkout-summary{box-sizing:border-box!important;border-radius:14px!important;background:rgba(255,255,255,.55)!important}
.checkout-line>*{min-width:0!important;overflow-wrap:anywhere!important}

/* ---------- PAYMENT STATUS ---------- */
.payment-shell{box-sizing:border-box!important;width:100%!important;min-height:0!important;padding:clamp(28px,6vw,64px) 16px!important}
.payment-shell>div{width:min(100%,620px)!important}
.payment-state{box-sizing:border-box!important;width:100%!important;padding:clamp(28px,6vw,46px) clamp(18px,5vw,30px)!important;border-radius:14px!important}
.payment-receipt{max-width:100%!important}

@media(max-width:820px){
  .shop-tools{grid-template-columns:1fr!important;align-items:stretch!important}
  .shop-search-wrap{width:100%!important;max-width:none!important}
  .shop-tool-actions{justify-content:space-between!important}
  .cart-layout{grid-template-columns:1fr!important}.cart-summary{position:static!important}
}

@media(max-width:620px){
  .shop-section{padding-top:18px!important;padding-bottom:52px!important}
  .shop-section>.container,.cart-section>.container,.checkout-section>.container{padding-inline:10px!important}
  .shop-tools{gap:9px!important;margin-bottom:13px!important;padding-bottom:10px!important}
  .shop-tool-actions{align-items:center!important;justify-content:space-between!important;gap:7px!important}
  .shop-tool-actions #shopCount{font-size:10.5px!important}.cart-button{min-height:36px!important;font-size:11px!important}

  /* Keep two cards side-by-side on phones. */
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .product-item{padding:6px!important;border-radius:9px!important}
  .product-media{height:96px!important;max-height:96px!important;border-radius:7px!important}
  .product-copy{padding-top:6px!important}
  .product-meta{font-size:8.5px!important;gap:2px 4px!important}
  .product-meta strong{font-size:10.5px!important}
  .product-copy h2{font-size:12px!important;margin:4px 0 3px!important}
  .product-copy p{display:none!important}
  .product-actions{gap:4px!important;padding-top:4px!important}
  .product-actions .btn,.product-actions .buy-now{height:31px!important;min-height:31px!important;padding:0 5px!important;font-size:9.5px!important;gap:4px!important}
  .product-actions .btn img{width:11px!important;height:11px!important}

  .cart-drawer{width:100vw!important;max-width:100vw!important}
  .cart-drawer-head,.cart-drawer-foot,.cart-drawer-body{padding-inline:16px!important}
  .drawer-item{grid-template-columns:52px minmax(0,1fr)!important;gap:10px!important}
  .drawer-item>img{width:52px!important;height:58px!important}
  .drawer-item>div:last-child{grid-column:2!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
  .drawer-actions{grid-template-columns:1fr!important}

  .cart-hero,.checkout-hero{padding:25px 0 20px!important}
  .cart-section,.checkout-section{padding-top:24px!important;padding-bottom:56px!important}
  .cart-row{grid-template-columns:58px minmax(0,1fr)!important;gap:10px!important;padding:12px 0!important}
  .cart-image{width:58px!important;height:58px!important}
  .cart-quantity{grid-column:2!important;flex-wrap:wrap!important}
  .cart-line{grid-column:2!important;display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:8px!important;text-align:left!important}
  .cart-summary{padding:16px!important}

  .checkout-form{padding:15px!important}.checkout-form #payButton{width:min(100%,245px)!important}
  .checkout-summary{padding:15px!important}.checkout-line{gap:12px!important}
  .payment-receipt{grid-template-columns:minmax(0,1fr) auto!important;gap:8px 12px!important}
}

@media(max-width:360px){
  .shop-section>.container{padding-inline:8px!important}
  .product-grid{gap:6px!important}
  .product-media{height:86px!important;max-height:86px!important}
  .product-item{padding:5px!important}
  .product-meta{font-size:8px!important}.product-meta strong{font-size:10px!important}
  .product-copy h2{font-size:11.5px!important}
  .product-actions .btn,.product-actions .buy-now{height:30px!important;min-height:30px!important;font-size:9px!important}
  .shop-tool-actions{align-items:stretch!important;flex-direction:column!important}
  .cart-button{width:100%!important;justify-content:center!important}
  .checkout-form #payButton{width:100%!important}
  .payment-receipt{grid-template-columns:1fr!important;text-align:center!important}.payment-receipt strong{text-align:center!important}
}
