/* Shopify integration page (new design, Figma "Website v. migrated Jan2026" / Shopify).
   Same look as the Shopee integration page (sp-), with its own sf- prefix so the two pages stay independent.
   Everything is scoped under .sf-page so it can't affect the old site styles.
   Blocks use <div> rather than <section>: the old responsive.css forces
   `section { padding: 40px 0 !important }` on mobile. */

.sf-page {
  --sf-orange: #f5a028;
  --sf-green: #56a32b;
  --sf-green-light: #8cc63f;
  --sf-brown: #593636;
  --sf-text: #5c4545;
  --sf-white: #ffffff;
  --sf-grey-bg: #f4f4f4;
  --sf-border: #e6e6e6;
  --sf-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  --sf-font-heading: "Poppins", sans-serif;
  --sf-font-body: "Inter", sans-serif;

  font-family: var(--sf-font-body);
  color: var(--sf-brown);
}

.sf-page *,
.sf-page *::before,
.sf-page *::after {
  box-sizing: border-box;
}

/* undo the old site's heading underline inside the new design */
.sf-page h1::after,
.sf-page h2::after,
.sf-page h3::after {
  content: none;
}

/* 1280px content width + 20px side padding (same as the Shopee page) */
.sf-page .sf-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* !important: the old global.min.css sets `a { text-decoration: none !important }` */
.sf-page a {
  color: var(--sf-orange);
  text-decoration: underline !important;
}

.sf-page a:hover {
  color: var(--sf-green);
}

/* ---------- Hero ---------- */

.sf-page .sf-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    var(--sf-green) 0%,
    var(--sf-green-light) 100%
  );
}

/* the two soft rounded shapes in the design */
.sf-page .sf-hero::before,
.sf-page .sf-hero::after {
  content: "";
  position: absolute;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.sf-page .sf-hero::before {
  top: 0;
  left: 33%;
  width: 72%;
  height: 67%;
  border-radius: 0 0 0 48px;
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%, 0 22%);
}

.sf-page .sf-hero::after {
  bottom: -40px;
  left: -40px;
  width: 36%;
  height: 46%;
}

.sf-page .sf-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 448px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.sf-page .sf-hero__content {
  max-width: 520px;
}

.sf-page .sf-hero__title {
  margin: 0 0 16px;
  color: var(--sf-white);
  font-family: var(--sf-font-heading);
  font-size: 48px;
  font-weight: 600;
  line-height: 56px;
  text-align: left;
}

.sf-page .sf-hero__subtitle {
  max-width: 470px;
  margin: 0;
  color: var(--sf-white);
  font-size: 16px;
  font-weight: 500;
  line-height: 30px;
}

.sf-page .sf-hero__img {
  flex-shrink: 0;
  width: 300px;
  height: auto;
  margin-right: 70px;
}

/* ---------- Text ---------- */

.sf-page .sf-main {
  padding-top: 40px;
  padding-bottom: 72px;
}

/* font-size/line-height set here: the old site CSS sets p to 18px/34px */
.sf-page .sf-text {
  margin: 0 0 12px;
  color: var(--sf-brown);
  font-size: 15px;
  line-height: 22px;
}

.sf-page .sf-text--flush {
  margin-bottom: 4px;
}

.sf-page .sf-text strong {
  font-weight: 700;
}

.sf-page .sf-list {
  padding-left: 22px;
}

.sf-page .sf-list li {
  margin-bottom: 8px;
  font-size: inherit;
  line-height: inherit;
}

.sf-page .sf-list--bullets {
  list-style: disc;
}

/* ---------- Section headings ---------- */

.sf-page .sf-section {
  margin-top: 64px;
}

.sf-page .sf-section--first {
  margin-top: 32px;
}

.sf-page .sf-heading {
  position: relative;
  margin: 0 0 24px;
  padding-bottom: 14px;
  color: var(--sf-brown);
  font-family: var(--sf-font-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  text-align: left;
}

/* short orange bar under each heading */
.sf-page .sf-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--sf-orange);
}

.sf-page .sf-heading--narrow {
  max-width: 250px;
}

.sf-page .sf-heading--wide {
  max-width: 540px;
}

/* ---------- Tabs (desktop: list + grey panel) ---------- */

.sf-page .sf-tabs {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.sf-page .sf-tabs__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sf-page .sf-tabs__tab {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--sf-white);
  box-shadow: var(--sf-shadow);
  color: var(--sf-brown);
  font-family: var(--sf-font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.sf-page .sf-tabs__tab:hover,
.sf-page .sf-tabs__tab.is-active {
  color: var(--sf-orange);
}

.sf-page .sf-tabs__tab.is-active {
  border-color: var(--sf-orange);
}

.sf-page .sf-tabs__tab:focus-visible {
  outline: 2px solid var(--sf-orange);
  outline-offset: 2px;
}

.sf-page .sf-tabs__panels {
  min-height: 100%;
  border-radius: 8px;
  background: var(--sf-grey-bg);
}

/* the JS sets an inline height for the mobile carousel; never let it apply above mobile */
@media (min-width: 768px) {
  .sf-page .sf-tabs__panels {
    height: auto !important;
  }
}

.sf-page .sf-tabs__panel {
  display: none;
  padding: 24px;
}

.sf-page .sf-tabs__panel.is-active {
  display: block;
}

/* panel title repeats the tab label: hidden on desktop (the tab shows it), shown on mobile below */
.sf-page .sf-tabs__title {
  display: none;
}

.sf-page .sf-tabs__body {
  color: var(--sf-brown);
  font-size: 14px;
  line-height: 24px;
}

/* inherit: the old site CSS sets p to 18px/34px */
.sf-page .sf-tabs__body p,
.sf-page .sf-tabs__body li {
  margin: 0 0 8px;
  font-size: inherit;
  line-height: inherit;
}

.sf-page .sf-tabs__body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

/* portal / Shopify screenshots inside the panels */
.sf-page .sf-shot {
  display: block;
  height: auto;
  margin: 16px auto 8px;
  border-radius: 6px;
}

@media (max-width: 991px) {
  .sf-page .sf-shot {
    width: 100%;
    max-width: 640px;
  }
}

/* ---------- Captioned figures (outside the tabs) ---------- */

.sf-page .sf-figure {
  max-width: 840px;
  margin: 24px auto 0;
}

.sf-page .sf-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--sf-shadow);
}

.sf-page .sf-figure figcaption {
  margin-top: 10px;
  color: var(--sf-text);
  font-size: 12px;
  line-height: 16px;
}

/* two screenshots side by side (Fig. 8.1 / 8.2) */
.sf-page .sf-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1000px;
  margin: 24px auto 0;
}

.sf-page .sf-figures .sf-figure {
  margin: 0;
}

/* carousel dots: mobile only */
.sf-page .sf-tabs__dots {
  display: none;
}

/* ---------- FAQ ---------- */

.sf-page .sf-faq {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sf-page .sf-faq__item {
  padding: 10px 18px 12px;
  border: 1px solid var(--sf-border);
  border-radius: 4px;
  background: var(--sf-white);
}

.sf-page .sf-faq__q {
  margin: 0 0 4px;
  color: var(--sf-brown);
  font-family: var(--sf-font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-align: left;
}

.sf-page .sf-faq__a {
  margin: 0;
  color: var(--sf-text);
  font-size: 13px;
  line-height: 20px;
}

/* ================= Tablet ================= */

@media (max-width: 991px) {
  .sf-page .sf-hero__img {
    width: 240px;
    margin-right: 0;
  }

  .sf-page .sf-hero__title {
    font-size: 40px;
    line-height: 48px;
  }

  .sf-page .sf-tabs {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

/* ================= Mobile ================= */

@media (max-width: 767px) {
  /* hero: centred text, icons underneath */
  .sf-page .sf-hero__inner {
    flex-direction: column;
    gap: 28px;
    min-height: 0;
    padding-top: 40px;
    padding-bottom: 0;
    text-align: center;
  }

  .sf-page .sf-hero__content {
    max-width: none;
  }

  .sf-page .sf-hero__title {
    margin-bottom: 14px;
    font-size: 32px;
    line-height: 40px;
    text-align: center;
  }

  .sf-page .sf-hero__subtitle {
    font-size: 15px;
    line-height: 20px;
  }

  .sf-page .sf-hero__img {
    width: 190px;
    margin-bottom: -6px;
  }

  .sf-page .sf-hero::before {
    left: 40%;
    height: 58%;
  }

  .sf-page .sf-hero::after {
    width: 60%;
    height: 30%;
  }

  .sf-page .sf-main {
    padding-top: 24px;
    padding-bottom: 48px;
  }

  .sf-page .sf-text {
    font-size: 14px;
    line-height: 20px;
  }

  .sf-page .sf-section {
    margin-top: 40px;
  }

  .sf-page .sf-section--first {
    margin-top: 16px;
  }

  .sf-page .sf-heading {
    margin-bottom: 16px;
    padding-bottom: 10px;
  }

  .sf-page .sf-heading--narrow {
    max-width: 220px;
  }

  .sf-page .sf-heading--wide {
    max-width: none;
  }

  /* tabs become a swipeable carousel: every panel is a grey card */
  .sf-page .sf-tabs {
    display: block;
  }

  .sf-page .sf-tabs__list {
    display: none;
  }

  .sf-page .sf-tabs__panels {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    background: none;
    transition: height 0.3s ease;
  }

  .sf-page .sf-tabs__panels::-webkit-scrollbar {
    display: none;
  }

  .sf-page .sf-tabs__panel,
  .sf-page .sf-tabs__panel.is-active {
    display: block;
    flex: 0 0 100%;
    padding: 12px 12px 20px;
    border-radius: 8px;
    background: var(--sf-grey-bg);
    scroll-snap-align: start;
  }

  /* no tab list on mobile, so each slide shows its tab label as a title (Figma / SG page) */
  .sf-page .sf-tabs__title {
    display: block;
    margin: 0 0 16px;
    padding: 0 4px;
    color: var(--sf-brown);
    font-family: var(--sf-font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
    text-align: left;
  }

  .sf-page .sf-tabs__body {
    padding: 0 4px;
    font-size: 14px;
    line-height: 20px;
  }

  .sf-page .sf-tabs__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
  }

  .sf-page .sf-tabs__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d3d3d3;
    cursor: pointer;
  }

  .sf-page .sf-tabs__dot.is-active {
    background: var(--sf-orange);
  }

  /* figures stack, full width */
  .sf-page .sf-figure,
  .sf-page .sf-figures {
    margin-top: 16px;
  }

  .sf-page .sf-figures {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .sf-page .sf-faq__item {
    padding: 12px 14px;
  }

  .sf-page .sf-faq__q {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 20px;
  }

  .sf-page .sf-faq__a {
    font-size: 14px;
    line-height: 20px;
  }
}
