/* ===== পণ্য কার্ড ও বিস্তারিত ডায়ালগ (পণ্য পেজ) ===== */
.prod-card{position:relative;background:#fff;border:1px solid #e1eae2;border-radius:18px;background-image:none;overflow:hidden;box-shadow:0 1px 2px rgba(23,61,31,.06);transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.prod-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(23,61,31,.12);border-color:#c9dccb;background-image:none}
.prod-view{display:block;width:100%;margin:0;padding:0;border:0;background:none;cursor:pointer;font:inherit;text-align:inherit;color:inherit}
.prod-view .prod-img-wrap{display:block;height:auto;aspect-ratio:4/3;background:linear-gradient(160deg,#f1f7f0,#e4efe2);border-radius:0}
.prod-view img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}
.prod-card:hover .prod-view img{transform:scale(1.04)}
.prod-card:has(.prod-stock.out) .prod-view img{filter:grayscale(.35);opacity:.85}
.prod-tag{top:10px;left:10px;font-size:11px;padding:4px 10px;border-radius:999px;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.prod-info{padding:14px 16px 16px}
.prod-cat{align-self:flex-start;display:inline-block;font-size:11px;letter-spacing:0;text-transform:none;color:var(--green-mid);background:var(--green-pale);padding:3px 10px;border-radius:999px;margin-bottom:8px}
.prod-info h3{font-size:15.5px;line-height:1.4;min-height:0;margin:0 0 4px}
.prod-title-btn{all:unset;display:block;cursor:pointer;color:var(--text-dark);font-weight:700;font-size:inherit;line-height:1.4}
.prod-title-btn:hover{color:var(--green)}
.prod-sci{margin:0 0 6px}
.prod-desc{margin:0 0 8px}
.prod-stock{display:inline-flex;align-self:flex-start;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:3px 10px 3px 8px;border-radius:999px;background:#eef5ee;margin:2px 0 8px}
.prod-stock.in{background:#e8f5e9;color:#2e7d32}
.prod-stock.low{background:#fff3e0;color:#e65100}
.prod-stock.out{background:#fdecec;color:#c62828}
.prod-stock i{width:7px;height:7px}
.prod-price{font-size:18px;font-weight:800;color:var(--green-dark)}
.prod-price del{font-size:12.5px;color:#aaa;font-weight:500;margin-left:6px}
.prod-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.prod-actions .btn-buy{flex:1 1 0;min-width:0;min-height:42px;font-size:13.5px;padding:10px 6px}
.prod-actions .btn-notify{flex:1 1 100%;min-height:42px;display:flex;align-items:center;justify-content:center}
.prod-actions .add-cart-btn2{flex:0 0 42px;width:42px;height:42px}
.prod-more{flex:1 1 100%;background:none;border:0;color:var(--green);font-weight:700;font-size:13px;padding:6px 0 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px;text-align:center}
.prod-more:hover{color:var(--green-dark)}

/* ফোকাস দৃশ্যমান (কীবোর্ড ব্যবহারকারী) */
.prod-view:focus-visible,.prod-title-btn:focus-visible,.prod-more:focus-visible,.btn-buy:focus-visible,.add-cart-btn2:focus-visible,.btn-notify:focus-visible,.pd-close:focus-visible{outline:3px solid var(--gold);outline-offset:2px}

/* ---- বিস্তারিত ডায়ালগ ---- */
.pd-overlay{position:fixed;inset:0;z-index:10050;background:rgba(10,30,15,.55);display:flex;align-items:center;justify-content:center;padding:16px;animation:pdFade .2s ease}
.pd-overlay[hidden]{display:none}
.pd-box{position:relative;background:#fff;border-radius:20px;max-width:880px;width:100%;max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 30px 60px rgba(0,0,0,.3)}
.pd-close{position:absolute;top:12px;right:12px;z-index:2;width:42px;height:42px;border-radius:50%;border:0;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.18);font-size:18px;cursor:pointer;color:var(--text-dark)}
.pd-grid{display:grid;grid-template-columns:1fr 1fr}
.pd-media{position:relative;min-height:340px;background:linear-gradient(160deg,#f1f7f0,#e4efe2)}
.pd-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pd-media .prod-noimg{position:absolute;inset:0}
.pd-media .prod-tag{top:14px;left:14px}
.pd-body{padding:26px 26px 24px;display:flex;flex-direction:column;gap:6px}
.pd-body .prod-cat{margin-bottom:4px}
.pd-body h2{font-size:22px;line-height:1.35;margin:2px 0 2px;color:var(--text-dark)}
.pd-body .prod-sci{font-size:13px;margin:0}
.pd-body .prod-stock{margin:8px 0 2px}
.pd-price{font-size:26px;font-weight:800;color:var(--green-dark);margin:6px 0 2px}
.pd-price del{font-size:15px;color:#aaa;font-weight:500;margin-left:8px}
.pd-facts{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:10px 0 4px;padding:0}
.pd-facts div{background:var(--green-pale);border-radius:12px;padding:10px 12px}
.pd-facts dt{font-size:11.5px;color:var(--text-muted);font-weight:600}
.pd-facts dd{margin:2px 0 0;font-size:14px;font-weight:700;color:var(--text-dark)}
.pd-desc{font-size:14.5px;line-height:1.75;color:#3b4a40;max-height:200px;overflow:auto;padding-right:4px}
.pd-desc p{margin:0 0 8px}
.pd-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto;padding-top:14px}
.pd-actions .btn-buy,.pd-actions .add-cart-btn2,.pd-actions .btn-notify{flex:1 1 180px;min-height:46px;display:flex;align-items:center;justify-content:center;border-radius:12px;font-size:14.5px}
.pd-actions .add-cart-btn2{width:auto;border-radius:12px}
body.pd-open{overflow:hidden}
@keyframes pdFade{from{opacity:0}to{opacity:1}}
@media (max-width:700px){
  .pd-grid{grid-template-columns:1fr}
  .pd-media{min-height:0;aspect-ratio:4/3}
  .pd-body{padding:18px 18px 20px}
  .pd-body h2{font-size:19px}
  .pd-price{font-size:22px}
}
@media (prefers-reduced-motion:reduce){
  .pd-overlay{animation:none}
  .prod-card,.prod-view img{transition:none}
}

/* ডায়ালগ খোলা থাকলে ভাসমান বাটন লুকানো (কন্টেন্ট ঢেকে না থাকে) */
body.pd-open .float-btns{display:none}

/* ================================================================
   Sohel Nursery — premium shared product-card refresh (CSS only)
   Scope: existing .prod-card components on homepage and products page.
   Product data, price logic, stock logic, modal, checkout and cart JS are unchanged.
   ================================================================ */
:root {
  --sn-card-ink: #17271d;
  --sn-card-muted: #6b786e;
  --sn-card-border: #e2ebe2;
  --sn-card-surface: #ffffff;
  --sn-card-soft: #f2f8f0;
}
.prod-grid {
  align-items: stretch;
  gap: clamp(12px, 1.55vw, 22px);
}
.prod-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--sn-card-border);
  border-radius: 17px;
  background: var(--sn-card-surface);
  box-shadow: 0 3px 12px rgba(15, 67, 37, .055);
  overflow: hidden;
  isolation: isolate;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.prod-card:hover {
  transform: translateY(-3px);
  border-color: #c6ddc9;
  box-shadow: 0 12px 26px rgba(15, 67, 37, .12);
}
.prod-view { flex: 0 0 auto; overflow: hidden; }
.prod-view .prod-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f7ed, #e0efdf);
}
.prod-view img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.prod-card:hover .prod-view img { transform: scale(1.035); }
.prod-tag {
  z-index: 1;
  top: 11px;
  left: 11px;
  max-width: calc(100% - 56px);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.prod-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 14px 15px;
  min-width: 0;
}
.prod-cat {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 0 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf6eb;
  color: #17633c;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
}
.prod-info h3 {
  width: 100%;
  margin: 0 0 3px;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.prod-title-btn {
  color: var(--sn-card-ink);
  font-weight: 800;
  line-height: inherit;
}
.prod-title-btn:hover { color: #087343; }
.prod-sci {
  color: var(--sn-card-muted);
  font-size: 11px;
  line-height: 1.45;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.prod-desc {
  color: #59675d;
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 8px;
}
.prod-stock {
  align-self: flex-start;
  margin: 2px 0 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.35;
}
.prod-stock i { flex: 0 0 7px; }
.prod-price-row { width: 100%; margin-top: auto; padding-top: 5px; }
.prod-price {
  color: #075c36;
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 900;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.prod-price del { color: #98a39b; font-size: 11px; margin-left: 5px; }
.prod-actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
}
.prod-actions .btn-buy {
  grid-column: 1;
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.prod-actions .add-cart-btn2 {
  grid-column: 2;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 50%;
  box-shadow: none;
}
.prod-actions .prod-more { grid-column: 1 / -1; }
.prod-actions .btn-notify { grid-column: 1 / -1; border-radius: 999px; font-size: 12px; }
.prod-noimg { display: grid; place-items: center; min-height: 100%; font-size: 44px; }
.prod-card :focus-visible { outline: 3px solid #e1ad28; outline-offset: 2px; }
@media (min-width: 1100px) {
  .prod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .prod-card { border-radius: 13px; }
  .prod-info { padding: 10px 10px 12px; }
  .prod-cat { font-size: 9.5px; padding: 3px 7px; margin-bottom: 5px; }
  .prod-info h3 { font-size: 13px; line-height: 1.4; }
  .prod-sci { font-size: 9.5px; margin-bottom: 6px; }
  .prod-desc { font-size: 10.5px; }
  .prod-stock { font-size: 9px; padding: 3px 7px; margin-bottom: 6px; }
  .prod-price { font-size: 16px; }
  .prod-price del { font-size: 9px; }
  .prod-actions { grid-template-columns: minmax(0, 1fr) 34px; gap: 6px; margin-top: 9px; }
  .prod-actions .btn-buy { min-height: 36px; padding: 7px 5px; font-size: 10px; }
  .prod-actions .add-cart-btn2 { width: 34px; height: 36px; min-height: 36px; border-radius: 999px; }
  .prod-tag { top: 7px; left: 7px; padding: 4px 7px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .prod-card, .prod-view img { transition: none !important; }
  .prod-card:hover { transform: none; }
}

/* ================================================================
   STANDARD PRODUCT CARD (সব কার্ডে একই আকার ও একই লেআউট)
   ছবি সবসময় 4:3, শিরোনাম ২ লাইন, বাটনগুলো সব কার্ডে একই লাইনে।
   কার্টের পরিমাণ (−  ১  +) কার্ডের ভেতরেই থাকে।
   ================================================================ */
.prod-grid { align-items: stretch; }
.prod-card { display: flex; flex-direction: column; height: 100%; }
.prod-card .prod-view { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.prod-card .prod-img-wrap { display: block; position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sn-card-soft, #f2f8f0); }
.prod-card .prod-img-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prod-card .prod-noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 44px; }
.prod-card .prod-info { display: flex; flex-direction: column; flex: 1 1 auto; padding: 12px 14px 14px; }
.prod-card h3 { margin: 4px 0 0; min-height: 2.6em; font-size: 15px; line-height: 1.3; }
.prod-card .prod-title-btn { text-align: left; }
.prod-card .prod-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 0; min-height: 2.6em; }
.prod-card .prod-stock { align-self: flex-start; margin: 8px 0 0; }
.prod-card .prod-price-row { margin-top: 6px; }
.prod-card .prod-actions { margin-top: auto; padding-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.prod-card .prod-actions .btn-buy { min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 999px; font-size: 13px; }
.prod-card .prod-actions .btn-notify { grid-column: 1 / -1; min-height: 40px; border-radius: 999px; font-size: 12.5px; display: flex; align-items: center; justify-content: center; }
.prod-card .prod-actions .prod-more { grid-column: 1 / -1; min-height: 36px; border-radius: 999px; background: transparent; border: 1.5px solid var(--sn-card-border, #e2ebe2); color: var(--sn-card-ink, #17271d); font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.prod-card .prod-cart-slot { display: flex; justify-content: flex-end; align-items: center; min-width: 40px; }
.prod-card .add-cart-btn2 { width: 40px; height: 40px; min-height: 40px; border-radius: 50%; }
.prod-qty { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 2px; border-radius: 999px; background: #eef6ec; border: 1.5px solid #cfe3cb; }
.prod-qty button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fff; color: #1B5E20; font-size: 18px; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); font-family: inherit; }
.prod-qty button:disabled { opacity: .4; cursor: not-allowed; }
.prod-qty-n { min-width: 26px; text-align: center; font-weight: 800; font-size: 14px; color: #17271d; }
@media (max-width: 650px) {
  .prod-card h3 { font-size: 13px; }
  .prod-card .prod-actions { gap: 6px; }
  .prod-card .prod-actions .btn-buy { min-height: 36px; font-size: 11px; padding: 6px 6px; }
  .prod-card .add-cart-btn2 { width: 36px; height: 36px; min-height: 36px; }
  .prod-qty { height: 36px; }
  .prod-qty button { width: 28px; height: 28px; font-size: 15px; }
  .prod-qty-n { min-width: 20px; font-size: 12px; }
  .prod-card .prod-actions .prod-more { min-height: 32px; font-size: 11px; }
}
