/* ProCart BD v1.5.6 — Dark Mode UI polish (visitor test, 28 Nov 2026)
   Fixes, in dark mode only unless noted:
   1. White placeholder blocks on the product page, cart thumbnail,
      homepage hero media and vendor hero art.
   2. Product cards blending into the dark page background.
   3. Muted text (old prices, breadcrumbs, placeholder captions) too dim.
   4. Discount badges too dull; Add to Cart vs Order Now hierarchy weak.
   5. Disabled buttons that still look clickable (both modes).
   6. Checkout / quick-order modal taller than the viewport (both modes).
   Real product photos are untouched: rules target placeholder states only. */

/* ---------- 1. Dark placeholder blocks ---------- */
html[data-pc-theme="dark"] .pc-pdp-stage.is-placeholder,
html[data-pc-theme="dark"] .pc-pdp-main-image,
html[data-pc-theme="dark"] .pc-pdp-placeholder,
html[data-pc-theme="dark"] .pc-pdp-placeholder-gallery,
html[data-pc-theme="dark"] .pc-thumb-item.pc-placeholder-thumb,
html[data-pc-theme="dark"] .pc-skybuy-main-image-wrap:not(.has-real-image),
html[data-pc-theme="dark"] .pc-card-placeholder,
html[data-pc-theme="dark"] .pc-tv-noimg {
  background: linear-gradient(145deg, #1e293b, #243044) !important;
  border-color: #3b4963 !important;
  color: #aebdd0 !important;
}
html[data-pc-theme="dark"] .pc-pdp-placeholder *,
html[data-pc-theme="dark"] .pc-card-placeholder *,
html[data-pc-theme="dark"] .pc-tv-noimg * { color: #aebdd0 !important; }

/* Homepage hero media frame (was solid white in both modes) */
html[data-pc-theme="dark"] .pc-hero-081 .pc-tv-media {
  background: #243044 !important;
  border: 1px solid #3b4963 !important;
}

/* Vendor "Open Your Shop" hero art panel */
html[data-pc-theme="dark"] .pc-shop-hero-art {
  background: #243044 !important;
  border: 1px solid #3b4963 !important;
  border-radius: 16px;
  padding: 12px;
}

/* Cart / WooCommerce thumbnails that fall back to the placeholder image */
html[data-pc-theme="dark"] .woocommerce-cart .product-thumbnail,
html[data-pc-theme="dark"] .woocommerce-checkout .product-thumbnail,
html[data-pc-theme="dark"] .pc-modal-product .pc-modal-ph {
  background: #243044 !important;
  border-color: #3b4963 !important;
  color: #aebdd0 !important;
}

/* ---------- 2. Card separation in dark mode ---------- */
html[data-pc-theme="dark"] .pc-card,
html[data-pc-theme="dark"] .pc-content-card,
html[data-pc-theme="dark"] .pc-cust-wish-card {
  border: 1px solid #3b4963 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35) !important;
}
html[data-pc-theme="dark"] .pc-card:hover {
  border-color: #53627b !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45) !important;
}

/* ---------- 3. Brighter muted text in dark mode ---------- */
html[data-pc-theme="dark"] .pc-card-price del,
html[data-pc-theme="dark"] .price del,
html[data-pc-theme="dark"] .pc-pdp-price del,
html[data-pc-theme="dark"] .woocommerce-breadcrumb,
html[data-pc-theme="dark"] .pc-breadcrumb,
html[data-pc-theme="dark"] .pc-breadcrumb a,
html[data-pc-theme="dark"] ::placeholder {
  color: #aebdd0 !important;
  opacity: 1 !important;
}

/* ---------- 4. Badges and secondary button in dark mode ---------- */
html[data-pc-theme="dark"] .pc-discount-badge,
html[data-pc-theme="dark"] .pc-product-discount-badge,
html[data-pc-theme="dark"] .pc-pdp-sale-badge,
html[data-pc-theme="dark"] .pc-card .onsale,
html[data-pc-theme="dark"] .woocommerce span.onsale {
  background: #ea580c !important;
  border-color: #f97316 !important;
  color: #fff7ed !important;
}
/* Add to Cart (secondary) gets a pale-blue tint so Order Now stays primary */
html[data-pc-theme="dark"] .pc-card .pc-btn-ghost,
html[data-pc-theme="dark"] .pc-pdp .pc-pdp-button:not(.pc-pdp-buy),
html[data-pc-theme="dark"] .single_add_to_cart_button:not(.pc-pdp-buy) {
  background: #2d3c56 !important;
  border-color: #53627b !important;
  color: #dbeafe !important;
}

/* ---------- 5. Disabled buttons must look disabled (both modes) ---------- */
button:disabled,
input[type="submit"]:disabled,
.pc-btn-primary:disabled,
.pc-modal-submit:disabled,
.pc114-submit:disabled,
a.button.disabled,
button.disabled {
  opacity: .55 !important;
  filter: grayscale(.35);
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* ---------- 6. Checkout / quick-order modal fits the viewport (both modes) ---------- */
.pc-modal,
.pc114-dialog {
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.pc-modal .pc-order-summary,
.pc114-dialog .pc114-total {
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.pc-modal .pc-modal-submit,
.pc114-dialog .pc114-submit {
  position: sticky;
  bottom: 0;
  z-index: 3;
}

/* ---------- 7. Contact page: fill the empty intro column (both modes) ---------- */
.pc146-contact-direct { margin-bottom: 14px; }
.pc146-contact-intro::after {
  content: "Hotline: +880 9696-865065 (10 AM – 10 PM)\A Jamalpur, Mymensingh Division, Bangladesh";
  white-space: pre-line;
  display: block;
  padding: 16px;
  border: 1px solid var(--pc-border-color, #e4e9f2);
  border-radius: 14px;
  background: var(--pc-bg-subtle, #f7f9fc);
  color: var(--pc-text-muted, #5a6784);
  font-size: 13px;
  line-height: 1.7;
}
