/* SE Product Selector Widget — southend-widgets v2.0.4 */
:root {
  --sew-f: 'Noto Sans', -apple-system, sans-serif;
  --sew-navy: #101A20;
  --sew-blue: #0090CE;
  --sew-gray: #C5D1DC;
  --sew-lt:   #E3EDF6;
  --sew-wh:   #F5F7FF;
}

/* ── Outer wrapper ── */
.sew-ps {
  font-family: var(--sew-f);
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  overflow-x: clip;
  max-width: 100%;
}

/* Force track's scroll context to be independent of body overflow-x:hidden */
.sew-ps-right {
  overflow: visible;
  position: relative;
}

/* ── Remove Elementor section/column backgrounds wrapping this widget ── */
.elementor-section:has(.sew-ps),
.elementor-section:has(.sew-ps) > .elementor-container,
.elementor-section:has(.sew-ps) > .elementor-container > .elementor-row,
.elementor-section:has(.sew-ps) > .elementor-container > .elementor-row > .elementor-column,
.elementor-section:has(.sew-ps) > .elementor-container > .elementor-row > .elementor-column > .elementor-column-wrap,
.e-con:has(.sew-ps) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* ── Search row: search input + Browse All button side by side ── */
.sew-ps-search-row {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.sew-ps-search-row .sew-ps-search-wrap { flex: 1; }
.sew-ps-search-row .sew-ps-browse     { flex-shrink: 0; }

/* ── Search bar ── */
.sew-ps-search-wrap {
  position: relative;
  width: 100%;
}
.sew-ps-search-input {
  display: block;
  width: 100%;
  height: 40px;
  border-radius: 30px;
  border: 1.5px solid var(--sew-gray);
  background: #ffffff;
  padding: 0 48px 0 20px;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--sew-f);
  color: var(--sew-navy);
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s;
}
.sew-ps-search-input::placeholder { color: var(--sew-navy); font-weight: 500; }
.sew-ps-search-input:focus { border-color: var(--sew-blue); }
.sew-ps-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ── Inner row: filters left, cards right ── */
.sew-ps-inner {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  width: 100%;
}

/* ── Filter tabs ── */
.sew-ps-filters {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
}
.sew-ps-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 193px;
  height: 40px;
  border-radius: 30px;
  border: 1.5px solid var(--sew-navy);
  background: transparent;
  color: var(--sew-navy);
  font-size: 16px;
  font-family: var(--sew-f);
  font-weight: 400;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  padding: 0;
  text-align: center;
}
.sew-ps-tab.active {
  background: var(--sew-navy);
  color: var(--sew-wh);
  border-color: var(--sew-navy);
  font-weight: 700;
}
.sew-ps-tab:hover:not(.active) {
  background: rgba(16,26,32,0.06);
}

/* ── Right column ── */
.sew-ps-right {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
  min-width: 0;
}

/* ── Cards track (horizontal scroll) ── */
.sew-ps-track {
  display: flex;
  gap: 24px;
  overflow-x: scroll;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  align-items: stretch;
  touch-action: pan-x;
  position: relative;
  will-change: scroll-position;
}

/* ── Individual card — dark navy with product photo ── */
.sew-ps-card {
  position: relative;
  flex: 0 0 302px;
  width: 302px;
  height: 420px;
  border-radius: 35px;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: transparent !important;
  cursor: pointer;
  touch-action: pan-x;
  -webkit-user-drag: none;
  text-decoration: none;
  display: block;
}



/* Card text info block — anchored to bottom left, black text */
.sew-ps-card-info {
  position: absolute;
  bottom: 16px;
  left: 26px;
  right: 75px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Figma: 18px semibold */
.sew-ps-card-name {
  font-size: 18px;
  font-weight: 600;
  color: #101A20;
  line-height: normal;
  display: block;
}
/* Figma: 16px regular — "2.5 ml / mg" */
.sew-ps-card-stat {
  font-size: 16px;
  font-weight: 400;
  color: #101A20;
  line-height: 1.4;
  display: block;
}
/* Figma: 16px regular — "Injectable" */
.sew-ps-card-dosage,
.sew-ps-card-form {
  font-size: 16px;
  font-weight: 400;
  color: #101A20;
  line-height: 1.4;
  display: block;
}

/* Arrow button — Figma 1163:22+23: white circle, dark chevron */
.sew-ps-card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 26, 32, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  text-decoration: none;
  touch-action: pan-x;
  -webkit-user-drag: none;
  transition: box-shadow .2s;
}
.sew-ps-card-arrow svg {
  color: #101A20;
  display: block;
}
.sew-ps-card:hover .sew-ps-card-arrow {
  box-shadow: 0 4px 14px rgba(16, 26, 32, 0.18);
}

/* Hidden card (filtered out) */
.sew-ps-card.sew-hidden { display: none; }

/* ── Scrollbar (custom draggable thumb) ── */
.sew-ps-bar {
  height: 5px;
  border-radius: 50px;
  background: var(--sew-lt);
  width: 100%;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.sew-ps-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  min-width: 40px;
  border-radius: 50px;
  background: var(--sew-blue);
  cursor: grab;
  user-select: none;
}
.sew-ps-bar-fill:active { cursor: grabbing; }

/* ── Browse All button — Figma 370:795: blue outline ghost, 220×40px ── */
.sew-ps-browse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 40px;
  border-radius: 30px;
  border: 1.5px solid var(--sew-blue);
  color: var(--sew-blue);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--sew-f);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.sew-ps-browse:hover {
  background: var(--sew-blue);
  color: #ffffff;
}

/* ══════════════════════════════════════════════
   SE: PRODUCTS HEADER WIDGET  (.sew-ph)
   Figma 1206:21 — two-col header above product cards
   ══════════════════════════════════════════════ */
.sew-ph {
  font-family: var(--sew-f);
  display: flex;
  align-items: flex-end;
  gap: 301px;
  width: 100%;
  margin-bottom: 50px;
}

.sew-ph-left {
  display: flex;
  flex-direction: column;
  gap: 25px;
  flex-shrink: 0;
  width: 413px;
}

.sew-ph-eyebrow {
  display: inline-flex;
  height: 25px;
  padding: 0 12px;
  align-items: center;
  align-self: flex-start;
  font-family: var(--sew-f);
  font-size: 14px;
  font-weight: 400;
  color: var(--sew-navy);
  background: linear-gradient(to right, var(--sew-gray), rgba(197,209,220,0.5));
  border-radius: 50px;
  white-space: nowrap;
}

.sew-ph-heading {
  font-family: var(--sew-f);
  font-size: 40px;
  color: var(--sew-navy);
  line-height: normal;
  margin: 0;
  padding: 0;
}

.sew-ph-heading strong {
  display: block;
  font-weight: 700;
  font-style: normal;
}

.sew-ph-heading em {
  display: block;
  font-weight: 300;
  font-style: italic;
}

.sew-ph-right {
  flex: 1;
  min-width: 0;
}

.sew-ph-body {
  font-family: var(--sew-f);
  font-size: 18px;
  font-weight: 400;
  color: var(--sew-navy);
  line-height: 1.55;
  margin: 0;
  padding: 0;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — desktop untouched
   ══════════════════════════════════════════════ */

/* Tablet ≤1024px: filter tabs → horizontal scrollable row */
@media (max-width: 1024px) {
  .sew-ph { gap: 40px; margin-bottom: 32px; }
  .sew-ph-left { width: auto; }
  .sew-ph-heading { font-size: 34px; }
  .sew-ps-inner { flex-direction: column; }
  .sew-ps-filters {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
    padding-bottom: 2px;
  }
  .sew-ps-filters::-webkit-scrollbar { display: none; }
  .sew-ps-tab { flex: 0 0 auto; width: auto; padding: 0 20px; font-size: 15px; }
  /* JS touch handler owns mobile scroll — bypasses body overflow-x:hidden iOS block */
  .sew-ps { overflow-x: visible; }
  .sew-ps-track { touch-action: none; }
  .sew-ps-bar-fill { touch-action: none; }
  /* Extend track to screen edge + fade-to-white on the right */
  .sew-ps-right { margin-right: -30px; position: relative; }
  .sew-ps-right::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 50px; height: 100%;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
    z-index: 2;
  }
}

/* Tablet ≤768px: slightly smaller cards, tighter search row */
@media (max-width: 768px) {
  .sew-ph { flex-direction: column; align-items: flex-start; gap: 20px; }
  .sew-ph-heading { font-size: 28px; }
  .sew-ph-body { font-size: 16px; }
  .sew-ps-search-row { gap: 12px; }
  .sew-ps-browse { width: auto; padding: 0 18px; font-size: 15px; }
  .sew-ps-card { flex: 0 0 280px; width: 280px; height: 390px; }
  .sew-ps-card-name { font-size: 17px; }
}

/* Mobile ≤640px: compact cards */
@media (max-width: 640px) {
  .sew-ps-browse { display: none; }
  .sew-ps-search-row { gap: 0; }
  .sew-ps-search-row .sew-ps-search-wrap { flex: 1 1 100%; }
  .sew-ps-card { flex: 0 0 260px; width: 260px; height: 360px; }
  .sew-ps-card-name { font-size: 16px; }
  .sew-ps-card-stat,
  .sew-ps-card-dosage,
  .sew-ps-card-form { font-size: 14px; }
  .sew-ps-card-info { bottom: 14px; left: 20px; }
  .sew-ps-card-arrow { bottom: 14px; right: 14px; width: 38px; height: 38px; }
  .sew-ps-card-arrow svg { width: 12px; height: 12px; }
  .sew-ps-track { padding-bottom: 12px; }
}

/* Narrow mobile ≤480px: smallest cards */
@media (max-width: 480px) {
  .sew-ph-heading { font-size: 24px; }
  .sew-ps-tab { font-size: 14px; padding: 0 14px; }
  .sew-ps-card { flex: 0 0 230px; width: 230px; height: 320px; }
  .sew-ps-card-name { font-size: 15px; }
  .sew-ps-card-arrow { width: 34px; height: 34px; bottom: 12px; right: 12px; }
  .sew-ps-card-arrow svg { width: 11px; height: 11px; }
}

/* ── Elementor instance overrides ── */
.elementor-11448 .elementor-element.elementor-element-a72b7c8 .sew-ps-card-info { bottom: 20px !important; }

/* Homepage layout overrides */
.elementor-element-bc8aacb.e-con-full { padding-left: 50px !important; padding-right: 50px !important; }
.elementor-element-ec55a05.e-flex .e-con-inner { max-width: 100% !important; }
.elementor-element-ec55a05.e-flex { padding-left: 50px !important; padding-right: 50px !important; }

@media (max-width: 1024px) {
  .elementor-element-bc8aacb.e-con-full { padding-left: 20px !important; padding-right: 20px !important; }
  .elementor-element-ec55a05.e-flex { padding-left: 20px !important; padding-right: 20px !important; }
}
.elementor-element-8641428.e-flex.e-con-boxed { margin-left: 10px; margin-right: 10px; }
.elementor-element-2b75e29.e-flex.e-con-boxed { margin-left: 10px; margin-right: 10px; }
section.elementor-element-b75898d.e-con-full { border-radius: 0; }
.elementor-element-30a6fd7.e-con-full { padding: 0 !important; }
.elementor-element-07f26d1.e-flex.e-con-boxed.e-con { margin-left: 10px; margin-right: 10px; }
section.elementor-element-4596e2c.e-con-full.e-flex.e-con.e-child { padding-top: 0; }
