/* Pro Pharma custom CSS — everything that isn't a Tailwind utility class
   IMPORTANT: All homepage styles are scoped to .pro-pharma-homepage wrapper
   so Woodmart's header/footer remain 100% untouched and identical to other pages. */

/* Homepage wrapper — scoped typography & background only; header/footer are outside this */
.pro-pharma-homepage {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #F7F5F2;
  color: #242424;
}
.pro-pharma-homepage h1, .pro-pharma-homepage h2, .pro-pharma-homepage h3,
.pro-pharma-homepage h4, .pro-pharma-homepage h5, .pro-pharma-homepage h6 {
  font-family: 'Inter Tight', sans-serif;
}

/* Body helper for scrollbar only — does NOT touch header/footer layout */
body.pro-pharma-home {
  overflow-x: clip;
  /* Force Woodmart container width to 1220px on homepage to match inner pages */
  --wd-container-width: 1220px;
  --wd-container-width-lg: 1220px;
}

/* === CRITICAL FIX: Force header/footer inner containers to 1220px on homepage ===
   Previous pp-full-bleed + Tailwind could make Woodmart containers expand to ~1500px.
   This resets header/footer to Woodmart's default 1220px, identical to all other pages.
   These selectors target ONLY header/footer containers — homepage sections remain full-bleed via .pro-pharma-homepage.
*/
body.pro-pharma-home .whb-header .container,
body.pro-pharma-home .whb-header .whb-row > .container,
body.pro-pharma-home .whb-main-header .container,
body.pro-pharma-home .site-footer .container,
body.pro-pharma-home .footer-container .container,
body.pro-pharma-home footer .container,
body.pro-pharma-home .wd-footer .container {
  max-width: 1220px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  box-sizing: border-box !important;
}
body.pro-pharma-home .whb-header,
body.pro-pharma-home .site-footer,
body.pro-pharma-home footer {
  max-width: 100% !important;
}

/* ================================================================
   Full-bleed sections — scoped ONLY to homepage wrapper.
   This breaks sections out of Woodmart's boxed .container without
   affecting header/footer (which are outside .pro-pharma-homepage).
   Uses 100vw with negative margins — header/footer are not descendants,
   so their width stays exactly as Woodmart defines for other pages.
   ================================================================ */
.pro-pharma-homepage .pp-full-bleed {
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  max-width: 100vw !important;
  box-sizing: border-box;
  position: relative;
}

/* Safety: ensure no header/footer element ever inherits pp-full-bleed */
header.pp-full-bleed, footer.pp-full-bleed,
.whb-header.pp-full-bleed, .site-footer.pp-full-bleed {
  width: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@keyframes pp-marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.animate-marquee {
  display: flex;
  width: max-content;
  animation: pp-marquee 25s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}
.animate-marquee-reverse {
  animation-direction: reverse;
}

/* Browse Categories prev/next arrows */
.pp-cat-arrow {
  width: 32px;
  height: 40px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
}
.pp-cat-arrow:focus,
.pp-cat-arrow:active,
.pp-cat-arrow:hover {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.pp-scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.pp-scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Custom scrollbar — scoped to homepage wrapper only, NOT global */
.pro-pharma-homepage ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.pro-pharma-homepage ::-webkit-scrollbar-track {
  background: #09262b;
}
.pro-pharma-homepage ::-webkit-scrollbar-thumb {
  background: #258f85;
  border-radius: 4px;
}
.pro-pharma-homepage ::-webkit-scrollbar-thumb:hover {
  background: #42d5cb;
}

.pro-pharma-page-wrap { position: relative; z-index: 1; }

.pp-add-to-cart.loading { opacity: .6; pointer-events: none; }

.pp-icon-stack {
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  padding: 6px 8px;
}
/* Our Best Sellers — fixed 40×120 for every product card (was auto, varied per card) */
#shop .pp-icon-stack {
  width: 40px !important;
  height: 120px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;
}
#shop .pp-icon-stack .pp-icon-row {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
#shop .pp-icon-stack .pp-icon-btn {
  width: 26px;
  height: 26px;
}
.pp-icon-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-icon-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: transparent;
  color: #333333;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: color .15s ease;
}
/* Native <button> (used for the "Add to cart" icon on simple/in-stock
   products) carries its own UA box model — default padding, border,
   min-height and baseline — that a partial reset (appearance/margin/etc.)
   never fully removes in every browser. That's why that one icon could sit
   a px or two off while the <a>-based icons (view / wishlist / "Select
   options" on variable products) always lined up correctly.
   `all: unset` wipes every UA default in one go, then we rebuild only what
   .pp-icon-btn needs — making the button pixel-identical to the anchors. */
button.pp-icon-btn {
  all: unset;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: transparent;
  color: #333333;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease;
}
button.pp-icon-btn:hover,
button.pp-icon-btn:focus,
button.pp-icon-btn:active,
button.pp-icon-btn:visited {
  background-color: transparent !important;
  color: inherit;
}
.pp-icon-btn i {
  background: none;
}
.pp-icon-btn:hover {
  color: #42d5cb;
}
.pp-icon-btn.loading { opacity: .6; pointer-events: none; }

.pp-icon-stack .wd-wishlist-btn {
  display: contents;
}
.pp-icon-stack a.pp-wishlist-btn {
  all: unset;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #333333;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
  transition: color .15s ease;
}
.pp-icon-stack a.pp-wishlist-btn:hover {
  color: #42d5cb;
}

.pp-wishlist-badge {
  display: none;
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #42d5cb;
  border: 2px solid #ffffff;
  box-sizing: content-box;
}
.pp-wishlist-badge i {
  font-size: 8px;
  color: #ffffff;
}
.pp-wishlist-btn.added .pp-wishlist-badge {
  display: flex;
}
.pp-wishlist-btn.added:hover .pp-wishlist-badge {
  background: #3abbb2;
}

/* Hide Woodmart's default "Browse Wishlist" button/link after adding — keep heart + tick only */
.wd-wishlist-browsed,
.browse-wishlist,
a.wd-wishlist-browsed,
.wd-wishlist-btn .wd-wishlist-browsed,
.wd-wishlist-btn a.wd-wishlist-browsed {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.pp-wishlist-btn.added {
  /* keep heart visible, hide any Browse text Woodmart injects */
  color: #333333 !important;
}
.pp-wishlist-btn i,
.pp-wishlist-btn.added i.fa-heart,
.pp-wishlist-btn.added i.far,
.pp-wishlist-btn.added i.fas {
  /* keep heart icon always visible — Woodmart may try to hide it after adding, we force show */
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
@supports selector(:has(*)) {
  .pp-icon-row:has(.pp-wishlist-btn.added) .pp-icon-tooltip {
    display: none !important;
    opacity: 0 !important;
  }
}

.pp-icon-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) scale(.95);
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.pp-icon-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #111827;
}
.pp-icon-row:hover .pp-icon-tooltip {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.pp-product-card .added_to_cart,
.pp-product-card .wc-forward {
  display: none !important;
}

.pro-pharma-homepage h3 {
  border-top: none !important;
}

.pp-mini-list > a:last-child {
  border-bottom: none !important;
}

/* Remove only Woodmart's main content wrapper gap — scoped narrowly
   so header (.whb-header .container) and footer (.site-footer .container)
   are completely untouched and remain identical to other pages. */
body.pro-pharma-home .main-page-wrapper {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
body.pro-pharma-home .main-page-wrapper > .container {
  padding-bottom: 0 !important;
}
.pro-pharma-homepage .pp-full-bleed:last-of-type {
  margin-bottom: 0 !important;
}

/* Mobile: product card icons always visible (no hover on touch) */
@media (max-width: 1024px) {
  .pp-icon-stack {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .pp-icon-tooltip {
    display: none !important;
  }
}

/* Our Best Sellers — hide search/view icon on mobile only (keep cart + wishlist) */
@media (max-width: 640px) {
  #shop .pp-icon-stack .pp-icon-row:nth-child(2) {
    display: none !important;
  }
}

/* Mobile-only font sizes — desktop keeps original sizes, mobile matches screenshot but not too small */
@media (max-width: 640px) {
  .pro-pharma-homepage .pp-full-bleed {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }
  body.pro-pharma-home .main-page-wrapper > .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .pro-pharma-homepage {
    padding-left: 0;
    padding-right: 0;
  }
  /* Trust badges 17px -> 14px mobile */
  .pro-pharma-homepage .grid-cols-2 span[style*="font-size:17px"] {
    font-size: 14px !important;
  }
  /* Marquee 23px -> 16px mobile */
  .pro-pharma-homepage .pp-full-bleed[style*="font-size:23px"] {
    font-size: 16px !important;
  }
  /* Featured headings 19px -> 16px mobile */
  .pro-pharma-homepage h3[style*="font-size:19px"] {
    font-size: 16px !important;
  }
  /* Bottom heading clamp 36-59 -> 28-42 mobile */
  .pro-pharma-homepage h2[style*="clamp(36px"] {
    font-size: clamp(28px, 8vw, 42px) !important;
  }
  /* Bottom description 18px -> 14px mobile */
  .pro-pharma-homepage p[style*="font-size:18px"] {
    font-size: 14px !important;
  }
  /* Bottom buttons 16px -> 14px mobile */
  .pro-pharma-homepage a[style*="font-size:16px"][style*="background-color:#42d5cb"],
  .pro-pharma-homepage a[style*="font-size:16px"][style*="color:#42d5cb"] {
    font-size: 14px !important;
  }
  /* Bottom badge 15px -> 13px mobile */
  .pro-pharma-homepage span[style*="font-size:15px"][style*="color:#0f766e"] {
    font-size: 13px !important;
  }
  /* Middle pills 17px -> 13px mobile */
  .pro-pharma-homepage span[style*="font-size:17px"][style*="color:rgb(0, 143"] {
    font-size: 13px !important;
  }
  /* Product card 16px -> 14px name, 13px price mobile */
  .pp-product-card h3[style*="font-size:16px"] {
    font-size: 14px !important;
  }
  .pp-product-card p[style*="font-size:16px"] {
    font-size: 13px !important;
  }
  /* Product mini 16px -> 13px name, 12px price mobile */
  .pp-mini-list h4[style*="font-size:16px"] {
    font-size: 13px !important;
  }
  .pp-mini-list p[style*="font-size:16px"] {
    font-size: 12px !important;
  }
  /* Category name 16px -> 15px mobile */
  .pp-cat-item span[style*="font-size:16px"] {
    font-size: 15px !important;
  }
  /* Why Choose feature desc 15px -> 12px mobile */
  .pro-pharma-homepage p[style*="font-size:15px"] {
    font-size: 12px !important;
  }
}
