/**
 * Pharma shop footer — premium RTL layout
 * (Glass panel, soft gradient, hovers, works with store-enhancements + icons-inline)
 */
body.pharma-footer .p-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 40px;
  padding: clamp(16px, 3.5vw, 28px) max(10px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-right, 0px));
  /* Soft green/blue deep gradient */
  background:
    radial-gradient(ellipse 90% 70% at 12% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 96% 88%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0a1828 0%, #07121f 45%, #050b14 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Ambient orbs (no extra HTTP; GPU-friendly) */
body.pharma-footer .p-footer__ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 18% 22%, rgba(45, 212, 191, 0.09) 0%, transparent 100%),
    radial-gradient(closest-side at 80% 40%, rgba(99, 102, 241, 0.07) 0%, transparent 100%);
  opacity: 0.9;
}

body.pharma-footer .p-footer-inner.p-footer__glass {
  position: relative;
  z-index: 1;
  max-width: min(1120px, 100%);
  margin-inline: auto;
  padding: clamp(28px, 4.5vw, 44px) clamp(20px, 3vw, 32px) clamp(22px, 3.5vw, 32px);
  /* Glassmorphism */
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(15, 23, 42, 0.35) 48%,
    rgba(255, 255, 255, 0.04) 100%
  );
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* 3 columns: brand | categories | contact — meta full width */
body.pharma-footer .p-footer__glass {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 40px);
  align-items: start;
}
body.pharma-footer .p-ft-col--brand {
  padding-inline: 0;
  border-inline: none;
}
/* Low-opacity vertical dividers (desktop) */
@media (min-width: 901px) {
  body.pharma-footer .p-ft-col--cats {
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
    padding-inline-start: clamp(20px, 2.5vw, 28px);
  }
  body.pharma-footer .p-ft-col--contact {
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
    padding-inline-start: clamp(20px, 2.5vw, 28px);
  }
}

body.pharma-footer .p-ft-tagline {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.75);
  max-width: 22em;
}

/* CTA: glow + clear hierarchy */
body.pharma-footer .p-ft-cta-wa.p-ft-cta-wa--premium {
  position: relative;
  z-index: 0;
  margin-top: 0;
  padding: 15px 26px;
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 50%, #15803d 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 2px 0 rgba(0, 0, 0, 0.12) inset,
    0 8px 32px rgba(16, 185, 129, 0.35),
    0 0 48px rgba(34, 197, 94, 0.2);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, filter 0.25s ease;
}
body.pharma-footer .p-ft-cta-wa.p-ft-cta-wa--premium::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(130deg, rgba(52, 211, 153, 0.5), rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.25));
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  body.pharma-footer .p-ft-cta-wa.p-ft-cta-wa--premium:hover {
    filter: brightness(1.04);
    transform: translateY(-2px);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.25) inset,
      0 3px 0 rgba(0, 0, 0, 0.1) inset,
      0 14px 40px rgba(16, 185, 129, 0.45),
      0 0 56px rgba(52, 211, 153, 0.28);
  }
}

/* صف الأزرار: ديسكتوب/تابلت = صف أفقي (RTL: واتساب يمين، إنستغرام يسار) | موبايل ≤600px = عمودي */
body.pharma-footer .p-ft-cta-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: min(36rem, 100%);
  margin-top: 6px;
  box-sizing: border-box;
}

body.pharma-footer .p-ft-cta-row > .p-ft-cta-wa,
body.pharma-footer .p-ft-cta-row > .p-ft-cta-ig {
  flex: 1 1 calc(50% - 6px);
  min-width: min(9.5rem, 100%);
  width: auto;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
}

body.pharma-footer .p-ft-col--brand .p-ft-cta-row {
  align-self: stretch;
}

body.pharma-footer .p-ft-cta-ig.p-ft-cta-ig--premium {
  position: relative;
  z-index: 0;
  text-align: center;
  justify-content: center;
  padding: 15px 22px;
  background: linear-gradient(145deg, #f09433 0%, #e6683c 28%, #dc2743 52%, #bc1888 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 2px 0 rgba(0, 0, 0, 0.12) inset,
    0 8px 32px rgba(225, 48, 108, 0.32),
    0 0 40px rgba(236, 72, 153, 0.18);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, filter 0.25s ease;
}

body.pharma-footer .p-ft-cta-ig.p-ft-cta-ig--premium::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(130deg, rgba(251, 113, 133, 0.45), rgba(219, 39, 119, 0.2), rgba(168, 85, 247, 0.22));
  filter: blur(10px);
  opacity: 0.5;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  body.pharma-footer .p-ft-cta-ig.p-ft-cta-ig--premium:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.28) inset,
      0 3px 0 rgba(0, 0, 0, 0.1) inset,
      0 14px 40px rgba(225, 48, 108, 0.42),
      0 0 52px rgba(244, 114, 182, 0.28);
  }
}

/* Section titles */
body.pharma-footer h4.p-ft-heading {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.65);
  margin: 0 0 1.1rem;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Category list + icons */
body.pharma-footer ul.p-ft-cat-list,
body.pharma-footer #footerCategories {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.pharma-footer .p-ft-cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 4px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(226, 232, 240, 0.88) !important;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* RTL: subtle shift toward visual right = positive X */
body.pharma-footer .p-ft-cat-link .p-ft-cat-ico {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.6, 1);
}
body.pharma-footer .p-ft-cat-link .p-ft-cat-txt {
  flex: 1;
  min-width: 0;
}
@media (hover: hover) and (pointer: fine) {
  body.pharma-footer .p-ft-cat-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc !important;
    transform: translateX(5px);
  }
  body.pharma-footer .p-ft-cat-link:hover .p-ft-cat-ico {
    transform: scale(1.1);
  }
}

/* Contact list */
body.pharma-footer .p-ft-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.pharma-footer .p-ft-contact-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px 8px 2px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(226, 232, 240, 0.9) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transition: background 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.pharma-footer .p-ft-contact-ico {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: rgba(94, 234, 212, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease, color 0.25s ease;
}
body.pharma-footer .p-ft-contact-ico svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.pharma-footer .p-ft-contact-ico--fill {
  /* WhatsApp / solid icons */
  stroke: none;
  fill: currentColor;
}
body.pharma-footer .p-ft-contact-ico--fill svg {
  stroke: none;
  fill: currentColor;
  width: 18px;
  height: 18px;
}
body.pharma-footer .p-ft-ig-chip .p-ft-contact-ico {
  color: rgba(244, 114, 182, 0.95);
}
body.pharma-footer .p-ft-contact-txt { flex: 1; min-width: 0; }
body.pharma-footer .p-ft-row--static {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px 8px 2px;
  color: rgba(203, 213, 225, 0.88);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
body.pharma-footer .p-ft-row--static .p-ft-contact-ico { margin-top: 1px; }
@media (hover: hover) and (pointer: fine) {
  body.pharma-footer .p-ft-contact-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
  }
  body.pharma-footer .p-ft-contact-link:hover .p-ft-contact-ico {
    transform: scale(1.08);
    color: #5eead4;
  }
  body.pharma-footer .p-ft-contact-link.p-ft-ig-chip:hover .p-ft-contact-ico {
    color: #fbcfe8;
  }
}

/* Social: scale on hover */
body.pharma-footer .p-ft-soc .p-soc {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1), background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
body.pharma-footer .p-ft-soc {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
  gap: 8px !important;
}
@media (hover: hover) and (pointer: fine) {
  body.pharma-footer .p-ft-soc .p-soc:hover {
    transform: scale(1.08) translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
  }
  body.pharma-footer .p-ft-soc .p-soc--wa:hover {
    box-shadow: 0 8px 24px rgba(35, 197, 95, 0.35);
  }
}

/* Bottom row */
body.pharma-footer .p-ft-meta {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 12px;
}
body.pharma-footer .p-ft-gradient-rule {
  margin: 0 0 1rem;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.12) 50%, transparent 100%);
  height: 1px;
}

/* GSAP fromTo sets initial “before reveal” state; if scripts fail, content stays visible */
body.pharma-footer .p-footer--gsap-fail .p-footer-reveal {
  opacity: 1 !important;
  transform: none !important;
}
body.pharma-footer .p-footer--gsap-on .p-footer-reveal {
  will-change: auto;
}

/* Tablet: brand full width, then cats + contact */
@media (max-width: 900px) {
  body.pharma-footer .p-footer-inner.p-footer__glass,
  body.pharma-footer .p-footer__glass {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.pharma-footer .p-ft-col--brand {
    grid-column: 1 / -1;
  }
  body.pharma-footer .p-ft-col--cats,
  body.pharma-footer .p-ft-col--contact {
    border: none;
    padding-inline: 0;
  }
  body.pharma-footer .p-ft-cta-wa--premium,
  body.pharma-footer .p-ft-cta-wa,
  body.pharma-footer .p-ft-cta-ig--premium,
  body.pharma-footer .p-ft-cta-row {
    max-width: 100%;
  }
  body.pharma-footer .p-ft-tagline {
    max-width: none;
  }
}

/* Mobile: single column */
@media (max-width: 600px) {
  body.pharma-footer .p-footer__glass,
  body.pharma-footer .p-footer-inner.p-footer__glass {
    grid-template-columns: 1fr;
  border-radius: 0;
  border-inline: none;
  }
  body.pharma-footer .p-ft-col--brand {
    text-align: center;
    align-items: center;
  }
  body.pharma-footer .p-ft-brand-block {
    align-items: center;
  }
  body.pharma-footer .p-ft-tagline,
  body.pharma-footer .p-ft-url {
    text-align: center;
    margin-inline: auto;
  }
  body.pharma-footer .p-ft-soc {
    justify-content: center;
  }
  body.pharma-footer .p-ft-cta-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    max-width: 100%;
    width: 100%;
    margin-inline: auto;
    gap: 10px;
  }
  body.pharma-footer .p-ft-cta-row > .p-ft-cta-wa,
  body.pharma-footer .p-ft-cta-row > .p-ft-cta-ig {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: min(26rem, 100%);
    margin-inline: auto;
  }
}

/* Reduced motion: show footer blocks without JS wait */
@media (prefers-reduced-motion: reduce) {
  body.pharma-footer .p-footer-reveal {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto;
  }
  body.pharma-footer .p-ft-cat-link,
  body.pharma-footer .p-ft-contact-link,
  body.pharma-footer .p-ft-soc .p-soc {
    transition: none;
  }
}

/* الفوتر الموحّد (#footer) يظهر فقط في الصفحة الرئيسية — إخفاؤه في صفحات المتجر وجميع أحجام الشاشات */
body.pharma-footer:not(.index-page) #footer.p-footer,
body.pharma-footer:not(.index-page) footer#footer {
  display: none !important;
}
