/* Product details page — design B "Ice Counter" (client pick, 2026-11-20).
   Loaded after product.css, which stays as the base (ভাগা মাছ details uses it too). Everything here
   is scoped under .pdx, so the ভাগা মাছ page is untouched. Site fonts and colour variables only.
   Photo size is the same as before (the 420px column + 72px thumbs from product.css), by request. */

.pdx {
  --pdx-navy: var(--navy);
  --pdx-ice: #eef4fd;
  --pdx-on-navy: #cdd7f6;
  --pdx-on-navy-soft: #b9c6ef;
  --pdx-gold: var(--gold);
  background: #e9f1fb;
  padding-bottom: 8px;
}

/* ---------- Navy top band ---------- */
.pdx-hero {
  background-color: var(--pdx-navy);
  color: #fff;
}

/* Product page background (client, 2026-11-23): the sub-category's "Product page background",
   else the category's (Admin → Product Categories / Sub-Categories). The view sets --pdx-hero-bg
   and .has-bg only when one exists; otherwise the band stays plain navy. The navy tint keeps the white text readable (stronger on the right,
   where the name, price and buttons sit). */
.pdx-hero.has-bg {
  background-image:
    linear-gradient(90deg, rgba(0, 12, 82, 0.35) 0%, rgba(0, 12, 82, 0.5) 45%, rgba(0, 12, 82, 0.68) 100%),
    var(--pdx-hero-bg);
  background-size: cover;
  background-position: center;
}
/* Side padding stays the .container's own: only top/bottom are set here. */
.pdx-hero-inner { padding-top: 22px; padding-bottom: 64px; }

.pdx .pdx-crumb {
  padding-top: 0;
  margin-bottom: 26px;
  color: var(--pdx-on-navy-soft);
  display: flex;
  flex-wrap: wrap;
  row-gap: 4px;
}
.pdx .pdx-crumb a { color: #dbe4ff; font-weight: 500; }
.pdx .pdx-crumb a:hover { color: var(--pdx-gold); }

.pdx-hero-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

/* Photo: same size as before; only the frame/thumbs are recoloured for the navy band. */
.pdx .gallery-main { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28); border-radius: 22px; }
.pdx .gallery-main img { border-radius: 22px; }
.pdx .thumb { border-color: rgba(255, 255, 255, 0.18); background: #0d1f6b; opacity: .78; }
.pdx .thumb:hover { border-color: var(--pdx-on-navy-soft); opacity: 1; }
.pdx .thumb.active { border-color: var(--pdx-gold); opacity: 1; }
.pdx .thumb-nav { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.pdx .thumb-nav:hover { border-color: var(--pdx-gold); color: var(--pdx-gold); }

.pdx-hero-txt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pdx-hero-cat { color: var(--pdx-gold); font-weight: 600; font-size: 15px; align-self: flex-start; }
.pdx-hero-cat:hover { text-decoration: underline; }
.pdx-title {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.08;
  color: #fff;
  overflow-wrap: anywhere;
}
.pdx .pdx-short-desc { margin: 0; font-size: 16px; line-height: 1.7; color: var(--pdx-on-navy); }

.pdx-hero-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; padding-top: 4px; }
.pdx-hero-from { font-size: 15px; color: var(--pdx-on-navy); }
.pdx-hero-price strong { font-size: clamp(34px, 3.6vw, 46px); line-height: 1; color: var(--pdx-gold); font-weight: 800; }
.pdx-hero-unit { font-size: 16px; color: var(--pdx-on-navy); }
.pdx-hero-off {
  align-self: center;
  background: var(--pdx-gold);
  color: #2a1d00;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.pdx-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pdx-fav {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid #4a5aa8;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pdx-fav:hover { border-color: var(--pdx-gold); }
.pdx-fav svg { width: 18px; height: 18px; flex-shrink: 0; }
.pdx-fav .ico-heart { fill: none; stroke: currentColor; stroke-width: 2; }
.pdx-fav.active { background: #fff; color: var(--red); border-color: #fff; }
/* Share pill (<x-share-menu variant="pill">, 2026-11-21): golden, by client request. Same shape
   as the favourite pill; dark text on gold, like the discount badge. */
.pdx .share-menu--pill .share-menu-btn { border-color: var(--pdx-gold); background: var(--pdx-gold); color: #2a1d00; font-weight: 600; transition: background .15s ease, border-color .15s ease; }
.pdx .share-menu--pill .share-menu-btn:hover { background: #ffcd5e; border-color: #ffcd5e; }

.pdx button:focus-visible,
.pdx a:focus-visible { outline: 3px solid var(--pdx-gold); outline-offset: 2px; }

/* ---------- Option cards ---------- */
.pdx-main { padding-bottom: 56px; }
.pdx-config {
  position: relative;
  z-index: 1;
  margin-top: -30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 18px;
  align-items: start;
}
.pdx-card {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(11, 21, 80, 0.08);
  min-width: 0;
}
.pdx .option-block { margin-bottom: 0; }
.pdx-card-title { margin: 0 0 4px; font-size: 19px; color: var(--navy-text); }
.pdx-card-subtitle { margin: 18px 0 4px; font-size: 15px; color: var(--navy-text); }
.pdx .option-sub { margin-bottom: 12px; }

/* Shared look for every option: a soft ice row that turns navy when picked. */
.pdx .pdx-list { display: flex; flex-direction: column; gap: 10px; margin-top: 0; }
.pdx .pdx-list > .tier-opt,
.pdx .pdx-list > .processing-opt,
.pdx .pdx-list > .cutting-opt {
  position: relative;
  width: 100%;
  border: 1.5px solid transparent;
  border-radius: 16px;
  background: var(--pdx-ice);
  color: var(--navy-text);
  padding: 14px 16px 14px 48px;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pdx .pdx-list > .tier-opt:hover,
.pdx .pdx-list > .processing-opt:hover,
.pdx .pdx-list > .cutting-opt:hover { border-color: var(--lightblue); }
.pdx .pdx-list > .tier-opt.active,
.pdx .pdx-list > .processing-opt.active,
.pdx .pdx-list > .cutting-opt.active { background: var(--pdx-navy); border-color: var(--pdx-navy); color: #fff; }

/* Radio dot on the left (sizes/bands); processing + cutting reuse their own check circle there. */
.pdx .pdx-list > .tier-opt::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  border: 2px solid #8f9bc7;
  background: #fff;
  box-sizing: border-box;
}
.pdx .pdx-list > .tier-opt.active::before { border: 6px solid var(--pdx-gold); background: var(--pdx-navy); }
.pdx .pdx-list .proc-check,
.pdx .pdx-list .cutting-check { left: 16px; right: auto; top: 15px; }
.pdx .pdx-list > .processing-opt.active .proc-check,
.pdx .pdx-list > .cutting-opt.active .cutting-check { background: var(--pdx-gold); border-color: var(--pdx-gold); color: var(--pdx-navy); }

/* Size rows: weight + size on the left, price on the right. */
.pdx .pdx-list > .tier-opt { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.pdx-opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pdx .pdx-list .tier-label { font-size: 16px; font-weight: 700; color: inherit; }
.pdx .pdx-list .tier-size { font-size: 12.5px; text-align: left; color: #3d4a7a; }
.pdx .pdx-list .tier-price-row { flex-direction: column; align-items: flex-end; gap: 0; flex-shrink: 0; }
.pdx .pdx-list .tier-price { font-size: 15px; font-weight: 700; color: var(--red); }
.pdx .pdx-list .tier-opt:not(.has-discount) .tier-price { color: var(--navy-text); }
.pdx .pdx-list .tier-price-old { font-size: 12px; }
.pdx .pdx-list > .tier-opt.active .tier-size,
.pdx .pdx-list > .tier-opt.active .tier-price-old { color: var(--pdx-on-navy-soft); }
.pdx .pdx-list > .tier-opt.active .tier-price { color: var(--pdx-gold); }
.pdx .pdx-list .tier-badge { top: -7px; right: 10px; }

/* Fixed packs (client, 2026-11-26): gold quantity pill shaped like the Share button, a dash, then the
   size label in its own fixed colour. Colours live here on purpose (not in the DB). */
.pdx-pack-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pdx .pdx-list .pdx-qty-pill {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
  border-radius: 999px; background: var(--pdx-gold); color: #2a1d00;
  font-size: 15px; font-weight: 700; line-height: 1;
}
.pdx-pack-dash { font-weight: 700; color: inherit; opacity: .7; }
.pdx-size-tag {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px;
  border-radius: 999px; color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
  box-shadow: 0 1px 3px var(--tag-glow, rgba(0, 0, 0, .15));
}
.pdx-size-tag--small   { background: #2f7d5b; --tag-glow: rgba(47, 125, 91, .25); }
.pdx-size-tag--medium  { background: #a8435a; --tag-glow: rgba(168, 67, 90, .25); }
.pdx-size-tag--large   { background: #b5602b; --tag-glow: rgba(181, 96, 43, .25); }
.pdx-size-tag--premium { background: #6a4c93; --tag-glow: rgba(106, 76, 147, .25); }
.pdx .pdx-list .pdx-pack-head + .tier-size { margin-top: 4px; }

/* Per-kg weights: compact chips (there can be many, every 0.5 kg). */
.pdx .pdx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
.pdx .pdx-chips > .tier-opt {
  border-radius: 14px;
  border-color: transparent;
  background: var(--pdx-ice);
  padding: 10px 14px;
}
.pdx .pdx-chips > .tier-opt[hidden] { display: none; }
.pdx .pdx-chips > .tier-opt.active { background: var(--pdx-navy); border-color: var(--pdx-navy); }
.pdx .pdx-chips > .tier-opt.active .tier-label,
.pdx .pdx-chips > .tier-opt.active .tier-price { color: var(--pdx-gold); }
.pdx .pdx-chips > .tier-opt.active .tier-label { color: #fff; }
.pdx .pdx-chips > .tier-opt.active .tier-price-old { color: var(--pdx-on-navy-soft); }

/* Processing rows. */
.pdx .pdx-list .proc-label,
.pdx .pdx-list .cutting-label { font-size: 15.5px; color: inherit; padding-right: 0; margin-bottom: 8px; }
/* gap (2026-11-26): on phones "Net Weight (Approx.) ⓘ" and its value touched. */
.pdx .pdx-list .proc-weight-row { font-size: 12.5px; color: #3d4a7a; gap: 8px; }
.pdx .pdx-list .proc-weight-row strong { color: inherit; font-size: 13px; white-space: nowrap; }
.pdx .pdx-list .proc-loss-note { text-align: left; white-space: normal; font-size: 12px; color: #3d4a7a; margin-top: 4px; }
.pdx .pdx-list > .processing-opt.active .proc-weight-row,
.pdx .pdx-list > .processing-opt.active .proc-loss-note { color: var(--pdx-on-navy); }
.pdx .pdx-list > .processing-opt.active .proc-weight-row strong { color: #fff; }
.pdx .pdx-list > .processing-opt.active .info-tip { color: var(--pdx-gold); }

/* Cutting rows. */
.pdx .pdx-list .cutting-label { margin-bottom: 2px; }
.pdx .pdx-list .cutting-desc { font-size: 12.5px; color: #3d4a7a; }
.pdx .pdx-list > .cutting-opt.active .cutting-desc { color: var(--pdx-on-navy); }
.pdx .cutting-grid.is-disabled > .cutting-opt { background: var(--pdx-ice); }

/* ---------- Order bar ---------- */
.pdx .pdx-order {
  position: static;
  max-width: none; /* product.css caps .buy-box at 480px below 1150px — the order bar stays full width */
  margin-top: 18px;
  background: #fff;
  border: 2px solid var(--pdx-navy);
  border-radius: 22px;
  padding: 18px 22px;
  box-shadow: 0 10px 28px rgba(11, 21, 80, 0.08);
  gap: 0;
}
.pdx-order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.pdx .qty-row { flex-shrink: 0; }
.pdx .qty-row-label { font-size: 14.5px; }
.pdx .qty-stepper { border: 0; border-radius: 14px; background: var(--pdx-ice); }
.pdx .qty-btn { width: 46px; height: 46px; background: transparent; font-size: 18px; }
.pdx .qty-btn:hover { background: var(--pdx-navy); color: #fff; }
.pdx #qtyValue { font-size: 18px; font-weight: 700; }

.pdx-order-total { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.pdx .buy-price-sub { margin: 0; font-size: 13.5px; color: #3d4a7a; }
.pdx .buy-price { font-size: 36px; line-height: 1.15; color: var(--navy-text); }
.pdx .buy-price-cutting { margin: 0; font-size: 13px; }

.pdx-order-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.pdx .btn-addcart-lg {
  width: auto;
  min-width: 210px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 16px;
  font-size: 15.5px;
}
.pdx .btn-buynow {
  width: auto;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 16px;
  border: 0;
  background: var(--pdx-navy);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
}
.pdx .btn-buynow:hover { background: var(--blue-dark); color: #fff; }

.pdx-order-extra {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--pdx-on-navy-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: start;
}
.pdx-order-notes { display: flex; flex-direction: column; gap: 10px; }
.pdx .price-estimate-note { margin-bottom: 0; }

/* ---------- Tabs + Good to know ---------- */
.pdx-info {
  margin-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}
.pdx .pdx-tabs-card {
  margin-top: 0;
  background: #fff;
  border-radius: 22px;
  padding: 10px 26px 26px;
  box-shadow: var(--card-shadow);
  min-width: 0;
}
.pdx .tabs-nav { border-bottom: 0; gap: 8px; padding: 10px 0 4px; }
.pdx .tab-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  margin: 0;
  border-radius: 999px;
  background: var(--pdx-ice);
  color: var(--navy-text);
}
.pdx .tab-btn:hover { color: var(--navy-text); background: var(--bg-tint-2); }
.pdx .tab-btn.active { background: var(--pdx-navy); color: #fff; }
.pdx .tab-panels { padding-top: 18px; }

.pdx .pdx-gtk { margin-top: 0; }
.pdx .pd-gtk-title { font-size: 22px; font-weight: 700; margin: 0 0 12px; }
.pdx .pd-gtk .pd-faq-item { border: 0; border-radius: 16px; padding: 2px 18px; }
.pdx .pd-gtk .pd-faq-item[open] { box-shadow: inset 0 0 0 1.5px var(--pdx-navy); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pdx-hero-grid { grid-template-columns: 380px minmax(0, 1fr); gap: 32px; }
}

/* Tablet portrait: two option cards per row; an odd last card (usually Cutting) takes the full
   row and lays its options side by side, so it never sits alone next to an empty gap. */
@media (max-width: 900px) and (min-width: 621px) {
  .pdx-config { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdx-config > .pdx-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pdx-config > .pdx-card:last-child:nth-child(odd) .pdx-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  }
}
@media (max-width: 620px) {
  .pdx-config { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .pdx-hero-inner { padding-bottom: 54px; }
  .pdx-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .pdx .product-gallery { max-width: 480px; width: 100%; margin: 0 auto; }
  .pdx-info { grid-template-columns: minmax(0, 1fr); }
  .pdx-order-extra { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .pdx-card { padding: 18px; border-radius: 18px; }
  .pdx .pdx-order { padding: 16px; }
  .pdx-order-btns { width: 100%; }
  .pdx .btn-addcart-lg,
  .pdx .btn-buynow { flex: 1 1 100%; min-width: 0; }
  .pdx .buy-price { font-size: 30px; }
  .pdx .pdx-tabs-card { padding: 8px 16px 20px; }
}

/* Stock badge (2026-11-21): under the product name, natural width in the column. */
.pdx .pdx-stock-badge { align-self: flex-start; }

/* Only one option card (e.g. sweets / grocery: sizes only, no processing or cutting) —
   2026-11-22. Alone, the card spans the whole row and each option became a page-wide bar with
   the price far right. Its options sit side by side as compact tiles instead (auto-fill keeps
   empty tracks, so two options stay ~260px each, left-aligned, not stretched). Phones keep
   the normal stacked list. */
@media (min-width: 621px) {
  .pdx-config > .pdx-card:only-child .pdx-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .pdx-config > .pdx-card:only-child .pdx-list > .tier-opt { min-height: 72px; }
}
@media (min-width: 1100px) {
  .pdx-config > .pdx-card:only-child .pdx-list { grid-template-columns: repeat(auto-fill, minmax(260px, 300px)); }
}
