/* PATH: /assets/css/shop-store.css */
/* MICEP SHOP — responsive public/customer Store styling
   Surgical replacement: keeps existing class names and page structure. */

.store-page,
.store-page *{box-sizing:border-box}

.store-page{
  padding:32px 0 64px;
  background:#f6faf8;
  min-height:70vh;
  color:#17352a;
}

.store-container{
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
}

/* ---------- Header ---------- */
.store-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  margin-bottom:26px;
}

.store-eyebrow{
  margin:0 0 5px;
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#087548;
}

.store-head h1{
  margin:0 0 7px;
  color:#063f2d;
  font-size:clamp(1.9rem,4vw,2.75rem);
  line-height:1.08;
  letter-spacing:-.025em;
}

.store-head p{
  margin:0;
  max-width:720px;
  color:#63776f;
  line-height:1.6;
}

.store-cart{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  flex:0 0 auto;
  min-height:46px;
  padding:10px 15px;
  border:1px solid #d5e6de;
  border-radius:12px;
  background:#fff;
  color:#116b48;
  text-decoration:none;
  font-weight:800;
  box-shadow:0 3px 12px rgba(11,72,49,.05);
  transition:.18s ease;
}

.store-cart:hover{
  border-color:#a9cfbd;
  transform:translateY(-1px);
  box-shadow:0 7px 18px rgba(11,72,49,.09);
}

.store-cart b{
  display:inline-grid;
  place-items:center;
  min-width:25px;
  height:25px;
  padding:0 6px;
  border-radius:999px;
  background:#e9f7ef;
  color:#087548;
}

/* ---------- Search/filter ---------- */
.store-filter{
  display:grid;
  grid-template-columns:minmax(0,1fr) 240px auto;
  gap:10px;
  align-items:center;
  margin-bottom:25px;
  padding:12px;
  border:1px solid #e0ebe6;
  border-radius:16px;
  background:#fff;
  box-shadow:0 5px 20px rgba(10,63,43,.045);
}

.store-filter input,
.store-filter select,
.buy-form input,
.buy-form select,
.checkout-card input,
.checkout-card select,
.checkout-card textarea,
.form-grid input,
.form-grid select,
.form-grid textarea{
  width:100%;
  min-height:44px;
  margin:0;
  padding:10px 12px;
  border:1px solid #d3e2dc;
  border-radius:10px;
  background:#fff;
  color:#17352a;
  font:inherit;
  line-height:1.35;
  outline:none;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}

.store-filter input::placeholder,
.checkout-card textarea::placeholder,
.form-grid textarea::placeholder{
  color:#8a9b95;
}

.store-filter input:focus,
.store-filter select:focus,
.buy-form input:focus,
.buy-form select:focus,
.checkout-card input:focus,
.checkout-card select:focus,
.checkout-card textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus{
  border-color:#15915b;
  box-shadow:0 0 0 3px rgba(21,145,91,.11);
}

.store-filter select,
.buy-form select,
.checkout-card select,
.form-grid select{
  cursor:pointer;
}

.store-filter .store-btn{
  min-height:44px;
  white-space:nowrap;
}

/* ---------- Buttons ---------- */
.store-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  padding:10px 16px;
  border:1px solid #13814f;
  border-radius:10px;
  background:#13814f;
  color:#fff;
  text-decoration:none;
  font:inherit;
  font-weight:800;
  line-height:1.2;
  cursor:pointer;
  box-shadow:0 3px 10px rgba(19,129,79,.13);
  transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease;
}

.store-btn:hover{
  background:#0e7045;
  border-color:#0e7045;
  transform:translateY(-1px);
  box-shadow:0 6px 15px rgba(19,129,79,.18);
}

.store-btn:focus-visible,
.store-cart:focus-visible,
.store-back:focus-visible{
  outline:3px solid rgba(19,129,79,.22);
  outline-offset:2px;
}

.store-btn.secondary{
  background:#fff;
  color:#176146;
  border-color:#cfe1d9;
  box-shadow:none;
}

.store-btn.secondary:hover{
  background:#f4faf7;
  border-color:#a9cdbd;
}

.store-btn-large{
  width:100%;
  min-height:48px;
  padding:13px 18px;
}

/* ---------- Product catalogue ---------- */
.store-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.store-card{
  min-width:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #dfeae5;
  border-radius:17px;
  box-shadow:0 5px 18px rgba(9,62,42,.045);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.store-card:hover{
  transform:translateY(-2px);
  border-color:#c8ddd4;
  box-shadow:0 10px 26px rgba(9,62,42,.09);
}

.store-image{
  position:relative;
  height:220px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#edf8f2,#f7fbf9);
  color:#168052;
  text-decoration:none;
  font-weight:900;
}

.store-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .25s ease;
}

.store-card:hover .store-image img{
  transform:scale(1.025);
}

.store-card-body{
  min-width:0;
  display:flex;
  flex:1;
  flex-direction:column;
  gap:7px;
  padding:16px;
}

.store-card-body small{
  color:#6a8077;
  line-height:1.35;
}

.store-card h2{
  margin:0;
  color:#123e2f;
  font-size:1.02rem;
  line-height:1.35;
}

.store-card-body strong{
  color:#0e7d4d;
  font-size:1.1rem;
}

.store-stock,
.store-out{
  font-size:.76rem;
  font-weight:800;
}

.store-stock{color:#19824e}
.store-out{color:#b33a3a}

.store-card .store-btn{
  width:100%;
  margin-top:auto;
}

/* ---------- Empty/alerts ---------- */
.store-empty,
.checkout-card,
.order-hero{
  width:100%;
  background:#fff;
  border:1px solid #dfeae5;
  border-radius:18px;
  box-shadow:0 5px 20px rgba(9,62,42,.045);
}

.store-empty{
  padding:38px 26px;
  text-align:center;
}

.store-alert{
  margin:0 0 18px;
  padding:13px 15px;
  border:1px solid transparent;
  border-radius:11px;
  line-height:1.5;
}

.store-alert.success{
  background:#eaf8ef;
  border-color:#ccebd8;
  color:#126b42;
}

.store-alert.error{
  background:#fff0f0;
  border-color:#f1caca;
  color:#a22f2f;
}

.store-back{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  margin:0 0 18px;
  color:#176146;
  text-decoration:none;
  font-weight:800;
}

/* ---------- Product detail ---------- */
.product-detail{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:30px;
  padding:22px;
  background:#fff;
  border:1px solid #dfeae5;
  border-radius:20px;
  box-shadow:0 7px 25px rgba(9,62,42,.055);
}

.product-media{
  min-width:0;
  min-height:440px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#eef7f2;
  color:#168052;
  font-weight:900;
}

.product-media img{
  display:block;
  width:100%;
  height:100%;
  max-height:600px;
  object-fit:contain;
}

.product-copy{
  min-width:0;
  padding:4px 2px;
}

.product-copy h1{
  margin:4px 0 8px;
  color:#073f2d;
  font-size:clamp(1.8rem,4vw,2.8rem);
  line-height:1.1;
  letter-spacing:-.025em;
}

.product-price{
  margin:0 0 15px;
  color:#13814f;
  font-size:1.5rem;
  font-weight:900;
}

.product-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:20px 0;
}

.product-meta span{
  padding:7px 10px;
  border:1px solid #dcebe4;
  border-radius:999px;
  background:#f1f7f4;
  color:#45665a;
  font-size:.72rem;
}

.buy-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) 120px;
  gap:12px;
  align-items:end;
}

.buy-form label{
  display:grid;
  gap:6px;
  color:#284a3d;
  font-weight:700;
}

.buy-form .store-btn{
  grid-column:1/-1;
}

/* ---------- Cart ---------- */
.cart-list{
  display:grid;
  gap:10px;
}

.cart-row{
  min-width:0;
  display:grid;
  grid-template-columns:80px minmax(0,1fr) 90px 130px;
  gap:14px;
  align-items:center;
  padding:12px;
  background:#fff;
  border:1px solid #dfeae5;
  border-radius:14px;
  box-shadow:0 3px 12px rgba(9,62,42,.035);
}

.cart-thumb{
  width:80px;
  height:70px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#eef7f2;
  color:#168052;
  font-size:.7rem;
  font-weight:900;
}

.cart-thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.cart-info{
  min-width:0;
  display:grid;
  gap:4px;
}

.cart-info h2{
  margin:0;
  color:#173f31;
  font-size:1rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.cart-info strong{color:#13814f}

.cart-qty{
  width:100%;
  min-height:40px;
  padding:8px 9px;
  border:1px solid #d6e4de;
  border-radius:8px;
  background:#fff;
}

.cart-line{
  text-align:right;
  color:#173f31;
  font-weight:900;
}

.cart-summary{
  width:min(100%,420px);
  margin:15px 0 0 auto;
  padding:18px;
  display:grid;
  gap:12px;
  background:#fff;
  border:1px solid #dfeae5;
  border-radius:14px;
  box-shadow:0 5px 18px rgba(9,62,42,.045);
}

.cart-summary>div,
.summary-line,
.summary-total,
.summary-grand{
  display:flex;
  justify-content:space-between;
  gap:15px;
}

.summary-grand{
  padding-top:12px;
  border-top:1px solid #dfeae5;
  color:#0d4734;
  font-size:1.15rem;
  font-weight:900;
}

/* ---------- Checkout ---------- */
.checkout-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);
  gap:18px;
  align-items:start;
}

.checkout-card{
  display:grid;
  gap:16px;
  padding:24px;
}

.checkout-card h2{
  margin:4px 0 0;
  color:#0c4432;
  font-size:1.2rem;
}

.checkout-card label{
  min-width:0;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.form-grid label,
.checkout-card>label{
  display:grid;
  gap:6px;
  color:#294b3e;
  font-weight:700;
}

.checkout-card textarea{
  min-height:110px;
  resize:vertical;
}

.checkout-choice{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.checkout-choice label{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:42px;
  padding:9px 12px;
  border:1px solid #d9e7e1;
  border-radius:10px;
  background:#fbfdfc;
  font-weight:700;
}

.checkout-choice input{
  width:auto;
  min-height:0;
}

.checkout-note{
  padding:13px 14px;
  border-left:4px solid #13814f;
  border-radius:8px;
  background:#eef8f2;
  color:#49645a;
  line-height:1.5;
}

.checkout-summary{
  position:sticky;
  top:15px;
  height:max-content;
}

/* ---------- Orders ---------- */
.order-hero{
  margin-bottom:18px;
  padding:24px;
}

.deadline{
  margin-top:14px;
  padding:14px;
  border:1px solid #f0dfb8;
  border-radius:10px;
  background:#fff8e9;
  color:#76520e;
  line-height:1.5;
}

.order-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.order-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.contact-card{
  width:100%;
  max-width:650px;
  margin:0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width:1050px){
  .store-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:900px){
  .product-detail,
  .checkout-grid,
  .order-grid{
    grid-template-columns:1fr;
  }

  .checkout-summary{
    position:static;
  }

  .product-media{
    min-height:360px;
  }
}

@media (max-width:720px){
  .store-page{padding:24px 0 48px}

  .store-container{
    width:min(100% - 24px,1180px);
  }

  .store-head{
    flex-direction:column;
    gap:14px;
    margin-bottom:20px;
  }

  .store-head h1{
    font-size:clamp(1.75rem,8vw,2.25rem);
  }

  .store-cart{
    width:100%;
  }

  .store-filter{
    grid-template-columns:1fr;
    padding:11px;
  }

  .store-filter .store-btn{
    width:100%;
  }

  .store-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  .store-image{
    height:190px;
  }

  .store-card-body{
    padding:13px;
  }

  .product-detail{
    gap:18px;
    padding:15px;
    border-radius:16px;
  }

  .product-media{
    min-height:300px;
  }

  .buy-form{
    grid-template-columns:1fr;
  }

  .buy-form .store-btn{
    grid-column:auto;
  }

  .cart-row{
    grid-template-columns:64px minmax(0,1fr);
    gap:10px;
  }

  .cart-thumb{
    width:64px;
    height:64px;
  }

  .cart-qty{
    width:100%;
  }

  .cart-line{
    text-align:left;
  }

  .cart-summary{
    width:100%;
  }

  .form-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .checkout-card{
    padding:18px;
  }

  .order-actions{
    flex-direction:column;
  }

  .order-actions .store-btn{
    width:100%;
  }
}

@media (max-width:500px){
  .store-container{
    width:calc(100% - 20px);
  }

  .store-grid{
    grid-template-columns:1fr;
  }

  .store-image{
    height:220px;
  }

  .store-empty,
  .order-hero{
    padding:22px 17px;
  }

  .product-media{
    min-height:250px;
  }

  .checkout-choice{
    display:grid;
    grid-template-columns:1fr;
  }

  .checkout-choice label{
    width:100%;
  }

  .cart-row{
    grid-template-columns:56px minmax(0,1fr);
  }

  .cart-thumb{
    width:56px;
    height:56px;
  }
}

/* Accessibility / touch */
@media (prefers-reduced-motion:reduce){
  .store-btn,
  .store-cart,
  .store-card,
  .store-image img{
    transition:none;
  }
}

.store-page button,
.store-page a,
.store-page input,
.store-page select,
.store-page textarea{
  -webkit-tap-highlight-color:transparent;
}


/* ---------- Phase 2 customer commerce ---------- */
.store-card-price{
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
}
.store-card-price strong{color:#0e7d4d;font-size:1.1rem}
.store-compare-price,
.product-compare-price{
  color:#8b9a94;
  text-decoration:line-through;
  font-size:.86rem;
  font-weight:700;
}
.store-short-description{
  margin:0;
  color:#63776f;
  font-size:.86rem;
  line-height:1.45;
}
.store-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:6px 9px;
  border-radius:999px;
  font-size:.74rem;
  font-weight:900;
}
.store-badge.preorder{
  background:#fff5df;
  color:#8a5b09;
}
.store-card-add{margin-top:auto}
.store-text-link{
  display:inline-flex;
  justify-content:center;
  color:#176146;
  font-size:.82rem;
  font-weight:800;
  text-decoration:none;
}
.product-short-description{
  color:#526b61;
  font-size:1rem;
  line-height:1.65;
}
.product-description{
  margin:20px 0;
  color:#3f5d51;
  line-height:1.7;
}
.product-quantity-description{
  margin:12px 0;
  padding:10px 12px;
  border:1px dashed #cddfd7;
  border-radius:10px;
  background:#f7fbf9;
  color:#45665a;
  font-size:.9rem;
}
.product-availability{
  display:flex;
  gap:8px;
  align-items:center;
  width:max-content;
  margin:12px 0;
  padding:7px 10px;
  border-radius:999px;
  background:#edf8f1;
  color:#116b48;
  font-size:.8rem;
}
.product-availability.preorder{
  background:#fff5df;
  color:#8a5b09;
}
/* Pre-order notice is a full-width information panel, not a max-content badge. */
.product-availability.preorder.preorder-notice{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  white-space:normal;
  overflow-wrap:anywhere;
  border-radius:12px;
}
.product-availability.preorder.preorder-notice p{
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}

.product-availability.out{
  background:#fff0f0;
  color:#a22f2f;
}
.paybits-box,
.group-buy-box,
.group-buy-request-box{
  margin-top:22px;
  padding:18px;
  border:1px solid #d8e8e1;
  border-radius:15px;
  background:#f8fcfa;
}
.paybits-box h2,
.group-buy-box h2,
.group-buy-request-box h2{
  margin:3px 0 8px;
  color:#0a4934;
}
.paybits-box p,
.group-buy-box p,
.group-buy-request-box p{
  color:#5f746b;
  line-height:1.55;
}
.paybits-form,
.group-buy-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) 150px 140px;
  gap:10px;
  align-items:end;
}
.paybits-form label,
.group-buy-form label{
  display:grid;
  gap:7px;
  font-weight:800;
  color:#294b3e;
}
.paybits-note{
  margin:10px 0 0;
  font-size:.82rem;
}
.group-buy-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:13px 0;
}
.group-buy-stats span{
  padding:8px 10px;
  border:1px solid #d7e6df;
  border-radius:10px;
  background:#fff;
  color:#49665a;
  font-size:.8rem;
}
.store-section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin:34px 0 16px;
}
.store-section-head h2{margin:0;color:#0a4934}
.store-related-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
}
.paybits-checkout{
  margin:12px 0 18px;
  padding:15px;
  border:1px solid #d5e7df;
  border-radius:13px;
  background:#f8fcfa;
}
.paybits-checkout>label{
  display:grid;
  gap:7px;
  font-weight:800;
}
.paybits-calculation{
  margin-top:12px;
  padding:12px;
  border-radius:10px;
  background:#edf8f1;
  color:#185d42;
  line-height:1.55;
}
.paybits-terms{
  margin-top:13px;
  padding:12px;
  border:1px solid #eadfbe;
  border-radius:10px;
  background:#fffaf0;
  color:#6d5a28;
  font-size:.84rem;
  line-height:1.55;
}
.paybits-terms ul{margin:7px 0 10px 18px;padding:0}
.terms-check{
  display:flex!important;
  gap:8px;
  align-items:flex-start;
  font-weight:800!important;
}
.terms-check input{width:auto!important;min-height:auto!important;margin-top:3px!important}
.coupon-line{display:grid;gap:7px;margin:13px 0;font-weight:800}
.coupon-inline{display:grid;grid-template-columns:1fr auto;gap:8px}
.coupon-inline .store-btn{min-height:44px}
.installment-list{
  display:grid;
  gap:8px;
  margin:12px 0;
}
.installment-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid #dfeae5;
  border-radius:10px;
  background:#fbfdfc;
}
.installment-row>div{display:grid;gap:3px}
.installment-row small{color:#73837c;font-size:.75rem}
.paybits-order-summary{
  display:grid;
  gap:5px;
  margin-top:12px;
  padding:12px;
  border-radius:10px;
  background:#eef8f2;
  color:#245b47;
  line-height:1.45;
}
.form-wide{grid-column:1/-1}
.request-card{padding:25px}
@media(max-width:900px){
  .store-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .paybits-form,
  .group-buy-form{grid-template-columns:1fr}
  .store-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .installment-row{grid-template-columns:1fr}
  .installment-row .store-btn{width:100%}
}
@media(max-width:500px){
  .store-related-grid{grid-template-columns:1fr}
}

.installment-bank-note{display:block;max-width:260px;color:#6c5a2b;font-size:.74rem;line-height:1.4}


/* Delivery-rule and cart UX update */
.checkout-help{display:block;margin-top:5px;color:#718079;font-size:.8rem;line-height:1.4}
.cart-remove-form{display:flex;align-items:center;justify-content:flex-end}
.cart-remove{border:1px solid #efb7bc;background:#fff5f5;color:#b21f2b;border-radius:8px;padding:8px 10px;font:inherit;font-weight:800;cursor:pointer}
.cart-remove:hover{background:#ffe9eb}
@media(max-width:700px){.cart-remove-form{justify-content:flex-start}.cart-remove{width:100%}}


/* ---------- Mobile quantity controls and cart removal containment ---------- */
.store-card-add,
.store-add-row,
.store-qty-picker {
  min-width: 0;
  max-width: 100%;
}

.store-add-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.store-qty-picker {
  display: inline-flex;
  align-items: stretch;
  gap: 5px;
  width: max-content;
  max-width: 100%;
}

.store-qty-picker .store-qty-btn {
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 4px;
  border: 1px solid #cbd9d2;
  border-radius: 5px;
  background: #f5f8f6;
  color: #17352a;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.store-qty-picker .store-qty-input {
  flex: 0 1 72px;
  width: 72px;
  min-width: 42px;
  max-width: 100%;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid #cbd9d2;
  border-radius: 5px;
  box-sizing: border-box;
}

.store-add-row > .store-btn {
  width: 100%;
  min-width: 0;
}

.cart-row,
.cart-remove-form,
.cart-remove {
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .cart-row {
    overflow: hidden;
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .cart-remove-form {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
  }

  .cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .store-add-row {
    gap: 7px;
  }
}

@media (max-width: 380px) {
  .store-qty-picker {
    gap: 4px;
  }

  .store-qty-picker .store-qty-btn {
    flex-basis: 32px;
    width: 32px;
    min-width: 32px;
  }

  .store-qty-picker .store-qty-input {
    flex-basis: 60px;
    width: 60px;
  }
}


/* ---------- Mobile cart controls and order bank-transfer layout ---------- */
.cart-remove{
  width:auto!important;
  min-width:36px!important;
  min-height:36px;
  padding:5px 9px!important;
  border:1px solid #efb7bc;
  border-radius:8px;
  background:#fff5f5;
  color:#b21f2b;
  font-size:0!important;
  line-height:1;
}
.cart-remove::before{
  content:"×";
  font-size:1.5rem;
  font-weight:700;
}
.cart-remove:hover{background:#ffe9eb}
@media(max-width:720px){
  .cart-remove-form{grid-column:auto!important;width:auto!important;justify-content:flex-start!important}
  .cart-remove{width:38px!important;min-width:38px!important;max-width:38px!important;padding:4px!important;white-space:nowrap;overflow:hidden}
  .cart-row{grid-template-columns:56px minmax(0,1fr) 40px!important;gap:9px}
  .cart-qty{width:100%;max-width:84px}
}
.store-qty-picker .store-qty-input{flex:0 0 64px;width:64px;min-width:52px}
@media(max-width:380px){.store-qty-picker .store-qty-input{flex-basis:54px;width:54px;min-width:48px}}

/* The cart drawer stays on the Shop page after a successful add. */
body.store-cart-open{overflow:hidden}
.store-cart-drawer{position:fixed;inset:0;z-index:99999;visibility:hidden;pointer-events:none}
.store-cart-drawer.is-visible{visibility:visible;pointer-events:auto}
.store-cart-scrim{position:absolute;inset:0;background:rgba(12,22,17,.68);opacity:0;transition:opacity .2s}
.store-cart-panel{position:absolute;top:0;right:0;bottom:0;width:min(520px,88vw);display:flex;flex-direction:column;background:#fff;color:#17352a;box-shadow:-8px 0 28px rgba(0,0,0,.16);transform:translateX(100%);transition:transform .24s ease}
.store-cart-drawer.is-visible .store-cart-scrim{opacity:1}
.store-cart-drawer.is-visible .store-cart-panel{transform:translateX(0)}
.store-cart-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 24px;border-bottom:1px solid #e3e9e5}
.store-cart-panel-head h2{margin:0;font-size:1.45rem;color:#172f25}
.store-cart-close{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;color:#263d32;font:inherit;cursor:pointer;white-space:nowrap}
.store-cart-close:first-letter{font-size:1.5rem}
.store-cart-added{margin:14px 18px 0;padding:13px 15px;border-radius:12px;background:#eaf8ef;color:#116b48;font-weight:800}
.store-cart-added.is-error{background:#fff0f0;color:#a22f2f}
.store-cart-items{flex:1;min-height:0;overflow-y:auto;padding:8px 18px}
.store-cart-mini-item{display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px 0;border-bottom:1px solid #edf1ee}
.store-cart-mini-thumb{width:76px;height:66px;display:grid;place-items:center;overflow:hidden;border-radius:9px;background:#f0f6f2;color:#14764c;font-size:.7rem;font-weight:900}
.store-cart-mini-thumb img{width:100%;height:100%;object-fit:contain}
.store-cart-mini-info{display:grid;gap:7px;min-width:0}
.store-cart-mini-info strong{font-size:1rem;line-height:1.35;overflow-wrap:anywhere}
.store-cart-mini-info small{color:#718079}
.store-cart-mini-info span{color:#718079}
.store-cart-mini-line{font-weight:800;white-space:nowrap}
.store-cart-empty{padding:20px 0;color:#63776f}
.store-cart-panel-bottom{margin-top:auto;border-top:1px solid #e3e9e5}
.store-cart-subtotal{display:flex;justify-content:space-between;gap:12px;padding:18px 24px;font-size:1.15rem;font-weight:800}
.store-cart-subtotal strong{color:#d87912;font-size:1.35rem}
.store-cart-panel-actions{display:grid;gap:10px;padding:0 18px 22px}
.store-cart-view,.store-cart-checkout{display:flex;align-items:center;justify-content:center;min-height:54px;padding:12px 16px;border-radius:10px;text-decoration:none;font-weight:800}
.store-cart-view{background:#eaf1ff;color:#2860a7}
.store-cart-checkout{background:#13814f;color:#fff}
.bank-transfer-card{display:grid;gap:0;padding:18px;border:1px solid #d7e7de;border-left:5px solid #13814f;border-radius:14px;background:#fbfefc}
.bank-transfer-card h3{margin:0 0 8px;color:#0c4432;font-size:1.15rem}
.bank-transfer-instruction{margin:0 0 12px;color:#4d665a;line-height:1.55}
.bank-detail{display:grid;gap:4px;padding:12px 0;border-top:1px solid #e3ece7;min-width:0}
.bank-detail span{font-size:.72rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:#718079}
.bank-detail strong{font-size:1rem;line-height:1.45;overflow-wrap:anywhere;color:#17352a}
.bank-account-number strong{font-size:1.45rem;letter-spacing:.04em;color:#087548}
.bank-reference strong{display:inline-block;width:max-content;max-width:100%;padding:7px 10px;border-radius:8px;background:#fff3df;color:#96530a;overflow-wrap:anywhere}
@media(max-width:500px){
 .store-cart-panel{width:min(100%,440px)}
 .store-cart-panel-head{padding:18px 16px}
 .store-cart-items{padding:8px 14px}
 .store-cart-mini-item{grid-template-columns:58px minmax(0,1fr);gap:10px}
 .store-cart-mini-thumb{width:58px;height:58px}
 .store-cart-mini-line{grid-column:2}
 .store-cart-subtotal{padding:16px}
 .bank-transfer-card{padding:14px}
}


/* ---------- MFP slide-in cart drawer ---------- */
.mfp-cart-drawer{position:fixed;inset:0;z-index:99990;visibility:hidden;pointer-events:none}
.mfp-cart-drawer.is-open{visibility:visible;pointer-events:auto}
.mfp-cart-backdrop{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(8,27,20,.48);opacity:0;transition:opacity .22s ease;cursor:pointer}
.mfp-cart-drawer.is-open .mfp-cart-backdrop{opacity:1}
.mfp-cart-panel{position:absolute;top:0;right:0;display:flex;flex-direction:column;width:min(430px,100%);height:100%;height:100dvh;background:#fff;box-shadow:-12px 0 36px rgba(0,0,0,.18);transform:translateX(102%);transition:transform .24s ease;overflow:hidden}
.mfp-cart-drawer.is-open .mfp-cart-panel{transform:translateX(0)}
.mfp-cart-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 20px 16px;border-bottom:1px solid #e1ece6}
.mfp-cart-panel-head h2{margin:5px 0 0;color:#063f2d;font-size:1.35rem}
.mfp-cart-close{flex:0 0 38px;width:38px;height:38px;border:0;border-radius:50%;background:#f2f6f4;color:#17352a;font-size:28px;line-height:1;cursor:pointer}
.mfp-cart-panel-content{flex:1;overflow:auto;padding:14px 18px}
.mfp-cart-item{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #edf2ef}
.mfp-cart-item img,.mfp-cart-item-placeholder{flex:0 0 64px;width:64px;height:64px;object-fit:cover;border-radius:9px;background:#f0f6f2}
.mfp-cart-item-placeholder{display:grid;place-items:center;color:#087548;font-size:.7rem;font-weight:800}
.mfp-cart-item-info{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:4px;color:#17352a}
.mfp-cart-item-info strong{overflow-wrap:anywhere}
.mfp-cart-item-info small{color:#65786f}
.mfp-cart-item-info b{color:#087548}
.mfp-cart-empty{color:#65786f;line-height:1.5}
.mfp-cart-panel-footer{padding:16px 18px calc(16px + env(safe-area-inset-bottom));border-top:1px solid #e1ece6;background:#fff;display:grid;gap:9px}
.mfp-cart-subtotal{display:flex;justify-content:space-between;gap:12px;padding:2px 0 7px;color:#17352a}
.mfp-cart-subtotal strong{font-size:1.1rem;color:#063f2d}
.mfp-cart-panel-footer .store-btn{width:100%;text-align:center}
.mfp-cart-continue{border:0;background:transparent;color:#087548;font:inherit;font-weight:800;padding:9px;cursor:pointer}
body.mfp-cart-open{overflow:hidden}

/* Quantity input stays compact but expands for multi-digit values. */
.store-qty-picker{display:inline-flex;align-items:center;gap:5px;max-width:100%;width:max-content}
.store-qty-picker .store-qty-input{box-sizing:content-box;flex:0 0 auto;width:2.2ch;min-width:2.2ch;max-width:5ch;text-align:center;padding-left:7px;padding-right:7px}
.store-qty-picker .store-qty-btn{flex:0 0 34px;width:34px;min-width:34px}
@media(max-width:380px){
 .store-qty-picker{gap:4px}
 .store-qty-picker .store-qty-input{width:2.2ch;min-width:2.2ch;max-width:5ch;padding-left:5px;padding-right:5px}
 .store-qty-picker .store-qty-btn{flex-basis:32px;width:32px;min-width:32px}
}

/* Compact red remove control inside mobile cart rows. */
.cart-remove{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;padding:0;border:0;border-radius:50%;background:#c62828;color:#fff;font-size:22px;font-weight:700;line-height:1;cursor:pointer}


/* Cart usability patch: responsive count, quantity stepper, and non-overlapping totals. */
.cart-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.cart-items-count{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:5px 11px;border-radius:999px;background:#e8f6ee;color:#087548;font-weight:800;white-space:nowrap}
.cart-qty-stepper{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0}
.cart-qty-stepper button{flex:0 0 30px;width:30px;height:36px;border:1px solid #cbded4;border-radius:7px;background:#f4f8f5;color:#087548;font-size:18px;font-weight:800;cursor:pointer}
.cart-qty-stepper .cart-qty{box-sizing:content-box;flex:0 1 auto;width:2.5ch;min-width:2.5ch;max-width:5ch;padding:7px 4px;text-align:center}
.cart-row{grid-template-columns:80px minmax(130px,1fr) minmax(110px,auto) minmax(110px,auto) 40px;gap:12px}
.cart-line{min-width:0;text-align:right;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.35}
.cart-info strong,.cart-line,.cart-summary strong{position:relative;z-index:1}
.cart-summary>div{align-items:center;flex-wrap:wrap}
@media(max-width:900px){.cart-row{grid-template-columns:64px minmax(0,1fr) minmax(110px,auto);gap:10px}.cart-thumb{width:64px;height:64px}.cart-qty-stepper{grid-column:2;justify-content:flex-start}.cart-line{grid-column:3;grid-row:2}.cart-remove-form{grid-column:3;grid-row:1}}
@media(max-width:600px){.cart-head-actions{justify-content:flex-start}.cart-row{grid-template-columns:56px minmax(0,1fr) 38px;gap:9px}.cart-thumb{width:56px;height:56px}.cart-info{grid-column:2;grid-row:1}.cart-qty-stepper{grid-column:1 / 3;grid-row:2;justify-content:flex-start}.cart-line{grid-column:1 / 3;grid-row:3;text-align:left;font-size:1rem}.cart-remove-form{grid-column:3;grid-row:1}.cart-qty-stepper .cart-qty{width:2.5ch;min-width:2.5ch;max-width:5ch}}


/* Final cart row layout for the individual quantity update form. */
.cart-quantity-area{min-width:0;display:flex;align-items:center}
.cart-update-one-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.cart-qty-stepper{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0}
.cart-qty-stepper .store-qty-btn{flex:0 0 30px;width:30px;min-width:30px;height:36px;padding:0;border:1px solid #cbded4;border-radius:7px;background:#f4f8f5;color:#087548;font-size:18px;font-weight:800;cursor:pointer}
.cart-qty-stepper .cart-qty{box-sizing:content-box;flex:0 1 auto;width:2.5ch;min-width:2.5ch;max-width:5ch;padding:7px 4px;text-align:center}
.cart-update-button{min-height:34px;padding:6px 9px;border:1px solid #cfe1d9;border-radius:7px;background:#fff;color:#176146;font-weight:800;cursor:pointer}
.cart-remove-form{justify-self:end}
.cart-row{grid-template-columns:80px minmax(120px,1fr) minmax(150px,auto) minmax(105px,auto) 36px}
.cart-line{position:static;z-index:auto;text-align:right;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.35}
.store-cart b{display:inline-grid!important;visibility:visible!important;opacity:1!important;position:static!important;flex:0 0 auto}
@media(max-width:900px){
 .cart-row{grid-template-columns:64px minmax(0,1fr) minmax(110px,auto)}
 .cart-thumb{width:64px;height:64px}
 .cart-quantity-area{grid-column:2;grid-row:2}
 .cart-line{grid-column:3;grid-row:2;text-align:right}
 .cart-remove-form{grid-column:3;grid-row:1}
}
@media(max-width:600px){
 .cart-row{grid-template-columns:56px minmax(0,1fr) 34px;gap:9px}
 .cart-thumb{width:56px;height:56px}
 .cart-info{grid-column:2;grid-row:1}
 .cart-quantity-area{grid-column:1/3;grid-row:2}
 .cart-line{grid-column:1/3;grid-row:3;text-align:left;font-size:1rem}
 .cart-remove-form{grid-column:3;grid-row:1}
 .cart-update-one-form{gap:7px}
}


/* ---------- Surgical cart usability fixes: count badge, touch steppers, compact mobile drawer ---------- */
.store-head .store-cart b,
.product-topbar .store-cart b,
.store-cart b[data-store-cart-count] {
  display: inline-grid !important;
  visibility: visible !important;
  place-items: center;
  flex: 0 0 auto;
  min-width: 26px;
  width: auto;
  height: 26px;
  padding: 0 7px;
  border: 1px solid #c6e5d3;
  border-radius: 999px;
  background: #087548;
  color: #fff !important;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  opacity: 1;
}

.store-qty-picker,
.cart-qty-stepper {
  touch-action: manipulation;
}

.store-qty-picker .store-qty-btn,
.cart-qty-stepper .store-qty-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.store-qty-picker .store-qty-input,
.cart-qty-stepper .store-qty-input,
.cart-qty-stepper .cart-qty {
  -moz-appearance: textfield;
  appearance: textfield;
  -webkit-appearance: none;
  text-align: center;
}

.store-qty-picker .store-qty-input::-webkit-inner-spin-button,
.store-qty-picker .store-qty-input::-webkit-outer-spin-button,
.cart-qty-stepper input[type="number"]::-webkit-inner-spin-button,
.cart-qty-stepper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Keep the shop visible beside the drawer, especially on phones. */
.mfp-cart-panel {
  width: min(430px, 88vw);
  max-width: 88vw;
}

.mfp-cart-backdrop {
  background: rgba(8, 27, 20, .12) !important;
}

@media (max-width: 600px) {
  .mfp-cart-panel {
    width: min(360px, 84vw);
    max-width: 84vw;
  }
  .mfp-cart-panel-head {
    gap: 8px;
    padding: 15px 12px 12px;
  }
  .mfp-cart-panel-head h2 {
    font-size: 1.08rem;
  }
  .mfp-cart-panel-content {
    padding: 10px 12px;
  }
  .mfp-cart-item {
    gap: 8px;
    padding: 9px 0;
  }
  .mfp-cart-item img,
  .mfp-cart-item-placeholder {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }
  .mfp-cart-panel-footer {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    gap: 7px;
  }
}


/* Cart quantity controls: keep the custom minus/plus only and avoid touch double-firing. */
.cart-qty-stepper,
.store-qty-picker { touch-action: manipulation; }
.cart-qty-stepper .store-qty-btn,
.store-qty-picker .store-qty-btn { cursor:pointer; touch-action:manipulation; }
.cart-qty-stepper input[type=number],
.store-qty-picker input[type=number] { -moz-appearance:textfield; appearance:textfield; -webkit-appearance:none; }
.cart-qty-stepper input[type=number]::-webkit-inner-spin-button,
.cart-qty-stepper input[type=number]::-webkit-outer-spin-button,
.store-qty-picker input[type=number]::-webkit-inner-spin-button,
.store-qty-picker input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.cart-line, [data-cart-subtotal] { font-variant-numeric:tabular-nums; }


/* Cart drawer quantity and quick-remove controls */
.mfp-cart-item{position:relative;padding-right:34px}
.mfp-cart-item-controls{display:flex;align-items:center;gap:5px;margin:8px 0}
.mfp-cart-mini-qty{width:30px;height:30px;border:1px solid #d7e4dc;border-radius:6px;background:#f2f8f4;color:#087443;font-weight:800;cursor:pointer}
.mfp-cart-drawer-qty{width:48px;height:30px;border:1px solid #d7e4dc;border-radius:5px;text-align:center;font-weight:700;padding:2px}
.mfp-cart-remove{position:absolute;right:0;top:0;width:28px;height:28px;border:0;border-radius:50%;background:#c62828;color:#fff;font-size:22px;line-height:24px;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center}
.mfp-cart-remove:hover{background:#a71919}
.mfp-cart-item[data-busy="1"]{opacity:.65;pointer-events:none}

/* ---------- Choose payment method: responsive payment options ---------- */
.checkout-card form:has(.payment-choice){
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
  width:100%;
  min-width:0;
}

.checkout-card .payment-choice{
  display:flex;
  align-items:flex-start;
  gap:13px;
  width:100%;
  min-width:0;
  margin:0;
  padding:17px 18px;
  border:1px solid #dce9e3;
  border-radius:13px;
  background:#fbfdfc;
  color:#17352a;
  font-weight:400;
  line-height:1.5;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease;
}

.checkout-card .payment-choice:hover,
.checkout-card .payment-choice:focus-within{
  border-color:#8fc7aa;
  background:#f4fbf7;
  box-shadow:0 0 0 3px rgba(19,129,79,.07);
}

.checkout-card .payment-choice input[type="radio"]{
  appearance:auto;
  -webkit-appearance:radio;
  flex:0 0 20px;
  width:20px;
  min-width:20px;
  max-width:20px;
  height:20px;
  min-height:20px;
  margin:3px 0 0;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  box-shadow:none;
  accent-color:#13814f;
  cursor:pointer;
}

.checkout-card .payment-choice span{
  display:block;
  flex:1 1 auto;
  min-width:0;
  overflow-wrap:anywhere;
}

.checkout-card .payment-choice strong{
  display:block;
  margin:0 0 3px;
  color:#0b4933;
  font-size:1rem;
  font-weight:800;
}

.checkout-card .payment-choice small{
  display:block;
  color:#62766d;
  font-size:.92rem;
  line-height:1.55;
}

.checkout-card form:has(.payment-choice) > .store-btn,
.checkout-card form:has(.payment-choice) > button.store-btn{
  width:100%;
  min-height:49px;
  margin-top:2px;
  white-space:normal;
}

@media (max-width:600px){
  .checkout-card:has(form .payment-choice){
    padding:15px;
    gap:14px;
  }
  .checkout-card .payment-choice{
    gap:11px;
    padding:15px 13px;
    border-radius:12px;
  }
  .checkout-card .payment-choice strong{font-size:.98rem}
  .checkout-card .payment-choice small{font-size:.9rem}
}

/* Backorder messaging */
.cart-backorder-warning{display:block;margin-top:.35rem;padding:.45rem .6rem;border-left:3px solid #b7791f;border-radius:4px;background:#fff7e6;color:#7c4300;font-size:.85rem;line-height:1.45}
.store-backorder-setting small{display:block;margin-top:.35rem;color:#64748b;font-size:.82rem;line-height:1.4}


/* Product detail layout: keep stock notices and option availability inside the
   product column instead of allowing long text to stretch beyond the card. */
.product-detail{
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  align-items:start;
}
.product-media{
  min-width:0;
  width:100%;
  min-height:440px;
  box-sizing:border-box;
}
.product-media img{
  width:100%;
  max-width:100%;
  height:auto;
  max-height:600px;
  object-fit:contain;
}
.product-copy,
.product-copy > *{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.product-availability{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  width:fit-content;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  box-sizing:border-box;
  border-radius:14px;
  line-height:1.45;
}
.product-availability strong,
.product-availability p{
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
}
#product-variant-stock-count{
  display:block;
  width:fit-content;
  max-width:100%;
  margin:.5rem 0 1rem;
  white-space:normal;
  overflow-wrap:anywhere;
  box-sizing:border-box;
}
.buy-form,
.buy-form label,
.buy-form select,
.buy-form input{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.buy-form select{
  width:100%;
}
.store-qty-picker{
  width:max-content;
  max-width:100%;
}
@media (max-width:900px){
  .product-detail{
    grid-template-columns:minmax(0,1fr);
  }
  .product-media{
    min-height:360px;
  }
}
@media (max-width:600px){
  .product-detail{
    padding:14px;
    gap:16px;
  }
  .product-media{
    min-height:240px;
    max-height:360px;
  }
  .product-media img{
    max-height:360px;
  }
  .product-copy h1{
    font-size:clamp(1.65rem,7vw,2.25rem);
    overflow-wrap:anywhere;
  }
  .product-availability{
    width:100%;
    border-radius:12px;
    align-items:flex-start;
  }
  #product-variant-stock-count{
    width:100%;
    border-radius:10px;
  }
}
