/* Rank Fast Service Stack Card — frontend styles
 * Plugin credit: Rank Fast by Rahim Badsa
 * Customizable colors are driven by CSS variables set inline per card:
 *   --rf-bg-left, --rf-bg-right, --rf-card-bg, --strip-color
 */

.rf-shopify-stack,
.rf-shopify-stack *,
.rf-shopify-stack *::before,
.rf-shopify-stack *::after {
   box-sizing: border-box;
}

.rf-shopify-stack {
   --strip-h: 22px;
   font-family:
      'DM Sans',
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      'Segoe UI',
      sans-serif;
   position: relative;
   width: 100%;
   overflow: visible;
   background: #050509;
   isolation: isolate;
}

/* Main card */
.rf-shop-card {
   --rf-inner-o: 1;
   --rf-inner-y: 0px;
   --rf-inner-scale: 1;
   --rf-strip-o: 0;
   --rf-strip-y: -110%;

   position: sticky;
   top: 0;
   min-height: 710px;
   overflow: hidden;
   transform: translate3d(0, 0, 0);
   backface-visibility: hidden;
   -webkit-font-smoothing: antialiased;
   background: var(--rf-card-bg, #050509);
}

/* z-index is set inline per card via --rf-z so any number of cards can stack. */
.rf-shop-card {
   z-index: var(--rf-z, 10);
}

.rf-shop-inner {
   min-height: 710px;
   display: grid;
   grid-template-columns: 60% 40%;
   background: linear-gradient(
      90deg,
      var(--rf-bg-left, #442af5) 0%,
      var(--rf-bg-left, #442af5) 60%,
      var(--rf-bg-right, #050509) 60%,
      var(--rf-bg-right, #050509) 100%
   );
   opacity: var(--rf-inner-o);
   transform: translate3d(0, var(--rf-inner-y), 0) scale(var(--rf-inner-scale));
   transform-origin: top center;
   will-change: opacity, transform;
}

.rf-shop-card.is-stacked .rf-shop-inner {
   pointer-events: none;
}

.rf-collapse-strip {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: var(--strip-h);
   background: var(--strip-color, #442af5);
   opacity: var(--rf-strip-o);
   transform: translate3d(0, var(--rf-strip-y), 0);
   z-index: 30;
   will-change: opacity, transform;
}

/* Left content */
.rf-copy {
   padding: 42px 42px 70px;
   display: flex;
   flex-direction: column;
   justify-content: flex-start;
}

.rf-copy h2 {
   margin: 0 0 52px;
   max-width: 820px;
   font-size: clamp(42px, 4.1vw, 56px);
   line-height: 0.98;
   letter-spacing: -0.055em;
   font-weight: 800;
}

.rf-copy p {
   margin: 0;
   max-width: 860px;
   font-size: 17px;
   line-height: 1.45;
   letter-spacing: -0.015em;
}

/* Per-card text colors */
.rf-card-dev .rf-copy,
.rf-card-features .rf-copy,
.rf-card-support .rf-copy {
   color: #fff;
}

.rf-card-dev .rf-copy p,
.rf-card-features .rf-copy p,
.rf-card-support .rf-copy p {
   color: #fff;
}

.rf-card-customize .rf-copy,
.rf-card-performance .rf-copy {
   color: #000;
}

.rf-card-customize .rf-copy p,
.rf-card-performance .rf-copy p {
   color: #000;
}

/* Per-card top spacing */
.rf-card-dev .rf-copy {
   padding-top: 42px;
   display: flex;
   justify-content: center;
}

.rf-card-customize .rf-copy {
   padding-top: 42px;
}

.rf-card-performance .rf-copy {
   padding-top: 93px;
}

.rf-card-features .rf-copy {
   padding-top: 109px;
}

.rf-card-support .rf-copy {
   padding-top: 140px;
}

.rf-card-support .rf-copy h2 {
   text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.75);
}

.rf-card-support .rf-copy p {
   font-weight: 600;
}

/* Tags */
.rf-tags {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   max-width: 860px;
   margin-top: 18px;
}

.rf-tags span {
   display: inline-flex;
   align-items: center;
   min-height: 29px;
   padding: 6px 15px;
   border-radius: 999px;
   font-size: 12px;
   font-weight: 600;
   line-height: 1;
   white-space: nowrap;
}

.rf-card-dev .rf-tags span {
   color: #fff;
   border: 1px solid rgba(255, 255, 255, 0.2);
   background: rgba(255, 255, 255, 0.055);
   box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.rf-card-customize .rf-tags span {
   color: #000;
   border: 1px solid #82cfc0;
   background: #daf4ee;
}

.rf-card-performance .rf-tags span {
   color: #000;
   border: 1px solid rgba(255, 255, 255, 0.88);
   background: rgba(255, 255, 255, 0.08);
}

.rf-card-features .rf-tags span {
   color: #fff;
   border: 1px solid rgba(255, 255, 255, 0.72);
   background: rgba(255, 255, 255, 0.08);
}

.rf-card-support .rf-tags span {
   color: #8bc8ff;
   border: 1px solid rgba(72, 163, 232, 0.75);
   background: rgba(44, 136, 204, 0.13);
}

/* Right SVG image */
.rf-visual {
   position: relative;
   min-height: 710px;
   overflow: hidden;
   display: flex;
   align-items: flex-start;
   justify-content: center;
   padding: 0 34px;
}

.rf-side-img {
   display: block;
   width: min(100%, 660px);
   height: auto;
   max-width: none;
   object-fit: contain;
   pointer-events: none;
   user-select: none;
   -webkit-user-drag: none;
}

/* Exact right-side size/position tuning */
.rf-img-dev {
   width: min(100%, 665px);
   margin-top: 4px;
}

.rf-img-customize {
   width: min(100%, 660px);
   margin-top: 84px;
}

.rf-img-performance {
   width: min(100%, 658px);
   margin-top: 46px;
}

.rf-img-features {
   width: min(100%, 660px);
   margin-top: 64px;
}

.rf-img-support {
   width: min(100%, 660px);
   margin-top: 96px;
}

/* Tablet */
@media (max-width: 1100px) {
   .rf-shopify-stack {
      --strip-h: 18px;
   }

   .rf-shop-card,
   .rf-shop-inner {
      min-height: auto;
   }

   .rf-shop-inner {
      grid-template-columns: 1fr;
      background: var(--rf-bg-left, #442af5);
   }

   .rf-copy {
      padding: 54px 22px 34px;
   }

   .rf-card-dev .rf-copy,
   .rf-card-customize .rf-copy,
   .rf-card-performance .rf-copy,
   .rf-card-features .rf-copy,
   .rf-card-support .rf-copy {
      padding-top: 54px;
   }

   .rf-copy h2 {
      font-size: 42px;
      margin-bottom: 28px;
   }

   .rf-copy p {
      max-width: 780px;
   }

   .rf-visual {
      min-height: 540px;
      padding: 20px;
      align-items: flex-start;
   }

   .rf-side-img,
   .rf-img-dev,
   .rf-img-customize,
   .rf-img-performance,
   .rf-img-features,
   .rf-img-support {
      width: min(100%, 500px);
      margin-top: 0;
   }
}

/* Mobile */
@media (max-width: 680px) {
   .rf-shopify-stack {
      --strip-h: 16px;
   }

   .rf-copy {
      padding: 44px 16px 26px;
   }

   .rf-card-dev .rf-copy,
   .rf-card-customize .rf-copy,
   .rf-card-performance .rf-copy,
   .rf-card-features .rf-copy,
   .rf-card-support .rf-copy {
      padding-top: 44px;
   }

   .rf-copy h2 {
      font-size: 36px;
      line-height: 1;
      margin-bottom: 24px;
      letter-spacing: -0.045em;
   }

   .rf-copy p {
      font-size: 15px;
      line-height: 1.45;
   }

   .rf-tags {
      gap: 8px;
   }

   .rf-tags span {
      white-space: normal;
      font-size: 11.5px;
      min-height: 28px;
      padding: 7px 12px;
   }

   .rf-visual {
      min-height: 430px;
      padding: 12px 14px 28px;
   }

   .rf-side-img,
   .rf-img-dev,
   .rf-img-customize,
   .rf-img-performance,
   .rf-img-features,
   .rf-img-support {
      width: min(100%, 390px);
   }
}

@media (max-width: 420px) {
   .rf-copy h2 {
      font-size: 32px;
   }

   .rf-visual {
      min-height: 390px;
   }

   .rf-side-img,
   .rf-img-dev,
   .rf-img-customize,
   .rf-img-performance,
   .rf-img-features,
   .rf-img-support {
      width: min(100%, 350px);
   }
}

@media (prefers-reduced-motion: reduce) {
   .rf-shopify-stack *,
   .rf-shopify-stack *::before,
   .rf-shopify-stack *::after {
      animation: none !important;
      transition-duration: 0s !important;
   }
}
