/*
 * Food Fruit Service — Front-end polish.
 *
 * Layered on top of theme.json. Targets:
 *   - card hover lift (.ffs-cat-card, .ffs-product-card)
 *   - seamless ingredient marquee animation (.ffs-marquee)
 *   - category card gradient overlay + decorative arrow
 *   - sale/tag pill polish (SureCart sale-badge, custom pills)
 *   - product card image hover zoom
 */

/* ------------------------------------------------------------------
 * Motion tokens
 * ------------------------------------------------------------------ */
:root {
  --ffs-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ffs-t-fast: 200ms;
  --ffs-t-med: 380ms;
  --ffs-t-slow: 700ms;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
}

/* ------------------------------------------------------------------
 * Cards — hover lift + photo overlay gradient
 * ------------------------------------------------------------------ */
.ffs-cat-card,
.ffs-product-card {
  position: relative;
  transition:
    transform var(--ffs-t-med) var(--ffs-ease-out),
    box-shadow var(--ffs-t-med) var(--ffs-ease-out);
  will-change: transform;
}

.ffs-cat-card:hover,
.ffs-product-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 24px 48px -12px rgba(27, 17, 8, 0.22),
    0 8px 16px -8px rgba(27, 17, 8, 0.1);
}

/* Category card — replace flat dim overlay with editorial gradient.
 * Darker at top (so the "— 01" number reads on bright images like
 * white chocolate) and very dark at bottom (so the category title +
 * description stay readable regardless of underlying image brightness). */
.ffs-cat-card .wp-block-cover__background.has-background-dim {
  background-image: linear-gradient(
    180deg,
    rgba(27, 17, 8, 0.65) 0%,
    rgba(27, 17, 8, 0.45) 35%,
    rgba(27, 17, 8, 0.72) 70%,
    rgba(27, 17, 8, 0.94) 100%
  ) !important;
  background-color: transparent !important;
  opacity: 1 !important;
}

/* Belt-and-braces: text-shadow on cat card text so it always reads
 * even if the underlying image has bright highlights right behind it. */
.ffs-cat-card h3,
.ffs-cat-card h3 a,
.ffs-cat-card p {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.ffs-cat-card .wp-block-cover__image-background {
  transition: transform var(--ffs-t-slow) var(--ffs-ease-out);
}
.ffs-cat-card:hover .wp-block-cover__image-background {
  transform: scale(1.04);
}

.ffs-cat-card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
}

/* Decorative arrow chip in the top-right of each cat card */
.ffs-cat-card::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background-color: var(--wp--preset--color--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B1108' stroke-width='1.8' stroke-linecap='round'><path d='M7 17 17 7M10 7h7v7'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px;
  opacity: 0;
  transform: translate(8px, -8px) rotate(-15deg);
  transition:
    opacity var(--ffs-t-med) var(--ffs-ease-out),
    transform var(--ffs-t-med) var(--ffs-ease-out);
  pointer-events: none;
  z-index: 3;
}
.ffs-cat-card:hover::after {
  opacity: 1;
  transform: translate(0, 0) rotate(0);
}

/* ------------------------------------------------------------------
 * Product cards — image zoom on hover, refined media frame
 * ------------------------------------------------------------------ */
.ffs-product-card .wp-block-cover {
  overflow: hidden;
  background-color: var(--wp--preset--color--bg-2);
}

.ffs-product-card .wp-block-cover__image-background {
  transition: transform var(--ffs-t-slow) var(--ffs-ease-out);
}
.ffs-product-card:hover .wp-block-cover__image-background {
  transform: scale(1.06);
}

.ffs-product-card .wp-block-surecart-product-title a {
  color: inherit;
  transition: color var(--ffs-t-fast) var(--ffs-ease-out);
}
.ffs-product-card:hover .wp-block-surecart-product-title a {
  color: var(--wp--preset--color--brand-deep);
}

/* SureCart sale badge — pill shape, brand color */
.wp-block-surecart-product-sale-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--wp--preset--font-family--sans);
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--wp--preset--color--error) !important;
  color: var(--wp--preset--color--bg) !important;
}

/* SureCart product-list grid — keep gutter tidy on tablet/mobile */
.ffs-products-grid .wp-block-surecart-product-template {
  gap: 24px !important;
}
@media (max-width: 900px) {
  .ffs-products-grid .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}
/* Phone: keep 2 columns (was 1 col) — tighter gap + smaller title/price
 * so each card fits comfortably. */
@media (max-width: 540px) {
  .ffs-products-grid .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .ffs-products-grid .ffs-product-card .wp-block-surecart-product-title {
    font-size: 15px !important;
    line-height: 1.2 !important;
  }
  .ffs-products-grid .ffs-product-card .wp-block-surecart-product-list-price {
    font-size: 17px !important;
  }
  .ffs-products-grid
    .ffs-product-card
    .wp-block-surecart-product-collection-tags {
    font-size: 10px !important;
    letter-spacing: 0.12em !important;
  }
}

/* ------------------------------------------------------------------
 * Ingredients marquee — seamless horizontal scroll
 * ------------------------------------------------------------------ */
.ffs-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
}

.ffs-marquee__track {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
  animation: ffs-marquee-scroll 40s linear infinite;
  padding-left: 0;
}

.ffs-marquee__track > * {
  flex: 0 0 auto;
  margin: 0 !important;
}

.ffs-marquee:hover .ffs-marquee__track {
  animation-play-state: paused;
}

@keyframes ffs-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------------
 * Buttons — outline button hover refinement
 * ------------------------------------------------------------------ */
.wp-block-button.is-style-outline .wp-block-button__link {
  transition:
    background-color var(--ffs-t-fast) var(--ffs-ease-out),
    color var(--ffs-t-fast) var(--ffs-ease-out),
    border-color var(--ffs-t-fast) var(--ffs-ease-out);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--ink) !important;
  color: var(--wp--preset--color--bg) !important;
}

/* Primary filled button — subtle scale on hover */
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  transition:
    background-color var(--ffs-t-fast) var(--ffs-ease-out),
    transform var(--ffs-t-fast) var(--ffs-ease-out);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--brand-deep) !important;
}

/* ------------------------------------------------------------------
 * Navigation — subtle underline on hover
 * ------------------------------------------------------------------ */
.wp-block-navigation .wp-block-navigation-item__content {
  position: relative;
  padding-bottom: 4px;
}
.wp-block-navigation .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right var(--ffs-t-med) var(--ffs-ease-out);
}
.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation
  .current-menu-item
  .wp-block-navigation-item__content::after {
  right: 0;
}

/* ------------------------------------------------------------------
 * Section heads — reveal a tiny brand mark before the eyebrow
 * (handled via the brand-deep paragraph in patterns; nothing here)
 * ------------------------------------------------------------------ */

/* ------------------------------------------------------------------
 * Headings — italic emphasis word styling
 * Patterns wrap an <em> inside h1/h2 to highlight a single word
 * (e.g. "Le nostre <em>categorie</em>"). Render as italic in the
 * display serif, tinted with the brand gold.
 * ------------------------------------------------------------------ */
.wp-block-heading em {
  font-family: inherit;
  font-style: italic;
  font-weight: inherit;
  color: var(--wp--preset--color--brand);
}

/* ------------------------------------------------------------------
 * Dark footer (.ffs-footer) — link, site-title, and list overrides
 * so cream text reads correctly on cocoa background.
 * ------------------------------------------------------------------ */
.ffs-footer .wp-block-site-title,
.ffs-footer .wp-block-site-title a {
  color: var(--wp--preset--color--bg);
}

.ffs-footer a {
  color: var(--wp--preset--color--bg);
  transition: color var(--ffs-t-fast) var(--ffs-ease-out);
}

.ffs-footer a:hover {
  color: var(--wp--preset--color--brand);
}

.ffs-footer .wp-block-list li::marker {
  color: var(--wp--preset--color--brand-deep);
}

/* Soft top edge so the cream body transitions smoothly into the cocoa footer
 * — a 1px gold-deep accent rather than a flat cut. */
.ffs-footer {
  border-top: 1px solid var(--wp--preset--color--brand-deep);
}

/* ------------------------------------------------------------------
 * Sticky header — announcement bar + main nav stay pinned on scroll.
 * Targets the <header> element rendered by the template-part block.
 * ------------------------------------------------------------------ */
header.wp-block-template-part {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: none;
  border-bottom: 0;
}

/* Default main nav row: semi-transparent cocoa + backdrop blur — frosted
 * glass effect. Whatever scrolls underneath gets blurred + slightly
 * tinted dark. Removes any visible separator line. */
header.wp-block-template-part .ffs-header-main {
  background-color: rgba(42, 27, 16, 0.78) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 0 !important;
  border-bottom: 0 !important;
  transition: background-color var(--ffs-t-med) var(--ffs-ease-out);
}

/* Browsers without backdrop-filter (older Firefox, etc.): fall back to
 * fully opaque cocoa so the header stays readable. */
@supports not (backdrop-filter: blur(1px)) {
  header.wp-block-template-part .ffs-header-main {
    background-color: var(--wp--preset--color--cocoa) !important;
  }
}

/* ------------------------------------------------------------------
 * Full-bleed hero (.ffs-hero) — image extends UP behind sticky header.
 * Negative margin-top pulls the cover up so the bg image bleeds to
 * y=0. Extra padding-top compensates so the content (eyebrow, headline,
 * CTAs) doesn't sit under the header. The sticky header (z-index: 100)
 * paints on top of the image at scroll=0; main nav is transparent so
 * the image shows through.
 * Sticky header total height ≈ 120px (announcement 40px + nav 80px).
 * ------------------------------------------------------------------ */
.ffs-hero {
  margin-top: -90px !important;
  padding-top: 210px !important;
  position: relative;
}

/* Replace core/cover's flat 40% ink dim with an editorial gradient that's
 * darker at the top (so cream header text reads against highlight areas
 * of the chocolate photo) and softer through the middle (so the hero
 * "dolcezza" headline sits on a less-muddied background). */
.ffs-hero .wp-block-cover__background.has-background-dim {
  background-color: transparent !important;
  background-image: linear-gradient(
    180deg,
    rgba(27, 17, 8, 0.88) 0%,
    rgba(27, 17, 8, 0.75) 22%,
    rgba(27, 17, 8, 0.62) 55%,
    rgba(27, 17, 8, 0.72) 100%
  );
  opacity: 1;
}

/* Belt-and-braces: subtle text-shadow on hero headings so they always
 * read, regardless of which image lands behind them. */
.ffs-hero .wp-block-heading {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.ffs-hero p {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* Mobile/narrow screens — less aggressive pull-up since announcement bar
 * may be smaller or wrap. Keeps the image readable. */
@media (max-width: 768px) {
  .ffs-hero {
    margin-top: -80px !important;
    padding-top: 180px !important;
  }
}

/* ------------------------------------------------------------------
 * Dark header — default link colors (cocoa bg, cream text + links).
 * The markup itself sets textColor on most elements, but theme.json's
 * elements.link API still paints <a> tags ink. Override here so cart
 * link, login/logout, and site-title link all read cream.
 * ------------------------------------------------------------------ */
header.wp-block-template-part .ffs-header-main a,
header.wp-block-template-part .ffs-header-main .wp-block-site-title a,
header.wp-block-template-part .ffs-header-main .wp-block-loginout {
  color: var(--wp--preset--color--bg);
}

header.wp-block-template-part .ffs-header-main a:hover,
header.wp-block-template-part .ffs-header-main .wp-block-site-title a:hover,
header.wp-block-template-part .ffs-header-main .wp-block-loginout:hover {
  color: var(--wp--preset--color--brand);
}

/* ------------------------------------------------------------------
 * Navigation submenu (Prodotti → Cioccolato/Semilavorato/Frutta secca)
 * — dark frosted-glass panel matching the header. Without this, WP's
 * default light bg combined with our cream link override = invisible
 * items.
 * ------------------------------------------------------------------ */
header.wp-block-template-part .wp-block-navigation__submenu-container {
  background-color: rgba(42, 27, 16, 0.96) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--wp--preset--color--brand-deep) !important;
  border-radius: 8px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.45);
  padding: 8px 0;
  min-width: 200px;
}

header.wp-block-template-part
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
  color: var(--wp--preset--color--bg) !important;
  padding: 10px 20px;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition:
    color var(--ffs-t-fast) var(--ffs-ease-out),
    background-color var(--ffs-t-fast) var(--ffs-ease-out);
}

header.wp-block-template-part
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content:hover,
header.wp-block-template-part
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content:focus {
  color: var(--wp--preset--color--brand) !important;
  background-color: rgba(201, 160, 107, 0.08);
}

/* Hide the default submenu arrow indicator border-line if any */
header.wp-block-template-part .wp-block-navigation__submenu-icon {
  fill: currentColor;
}

@supports not (backdrop-filter: blur(1px)) {
  header.wp-block-template-part .wp-block-navigation__submenu-container {
    background-color: var(--wp--preset--color--cocoa) !important;
  }
}

/* Header overlay treatment — applies ONLY when:
 *   1. We're on the home page (body.home, added by WP automatically), AND
 *   2. The page actually has a full-bleed hero (.ffs-hero) rendered, AND
 *   3. We haven't scrolled yet (body.is-scrolled NOT set)
 *
 * The :has() guard means if for any reason the hero pattern isn't
 * loaded (e.g., the front-page template hasn't been reset), every rule
 * below silently does nothing — and the header stays solid paper-white
 * with visible ink text. No broken state. */
@supports selector(:has(*)) {
  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part {
    background: transparent;
  }

  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part
    .ffs-header-main {
    background-color: transparent !important;
    border-bottom-color: transparent !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part
    .wp-block-site-title,
  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part
    .wp-block-site-title
    a,
  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part
    .ffs-header-main
    a {
    color: var(--wp--preset--color--bg);
  }

  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part
    .ffs-header-main
    p {
    color: var(--wp--preset--color--brand-soft) !important;
  }

  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part
    .wp-block-navigation
    .wp-block-navigation-item__content {
    color: var(--wp--preset--color--bg);
  }

  body:has(.ffs-hero, .ffs-page-hero):not(.is-scrolled)
    header.wp-block-template-part
    .wp-block-navigation
    .wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--brand);
  }
}

/* Smooth fade on the text colors via CSS transition on the children. */
header.wp-block-template-part .ffs-header-main a,
header.wp-block-template-part .ffs-header-main p,
header.wp-block-template-part .wp-block-site-title,
header.wp-block-template-part .wp-block-site-title a,
header.wp-block-template-part
  .wp-block-navigation
  .wp-block-navigation-item__content {
  transition: color var(--ffs-t-med) var(--ffs-ease-out);
}

/* Hero CTAs — primary button hover state on light/cream button.
 * Outline button hover swaps to filled cream. */
.ffs-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--brand) !important;
  color: var(--wp--preset--color--ink) !important;
}

.ffs-hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--bg) !important;
  color: var(--wp--preset--color--ink) !important;
}

/* Ensure hero overflow doesn't break sticky header. */
.ffs-hero {
  overflow: visible;
}

/* ==================================================================
 * MOBILE RESPONSIVE — Home page polish.
 *
 * Breakpoints:
 *   ≤ 1024px — tablet adjustments (relaxed)
 *   ≤ 768px  — phone landscape / tablet portrait (main mobile pass)
 *   ≤ 540px  — phone portrait (tightest layout)
 *
 * The existing .ffs-hero { margin-top:-80px; padding-top:180px; } rule
 * earlier in the file already handles the hero pull-up. Below targets
 * everything else: header drawer, hero CTAs, category/story columns,
 * footer columns, marquee.
 * ================================================================== */

/* ---- Header drawer / hamburger overlay (mobile + tablet) ---- */
@media (max-width: 1024px) {
  /* Mobile menu overlay panel — fixed full viewport, dark cocoa, blurred.
   * Force position:fixed + inset:0 so the drawer covers the announcement
   * bar too (the sticky header doesn't naturally hide when open). */
  .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    background: rgba(27, 17, 8, 0.98) !important;
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    padding: 24px;
    overflow-y: auto;
  }

  /* Lock body scroll while drawer is open */
  body:has(.wp-block-navigation__responsive-container.is-menu-open) {
    overflow: hidden !important;
  }

  /* Active/current page item — remove the cream box "focus" highlight,
   * use a clean gold color + underline instead. */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item.current-menu-item
    .wp-block-navigation-item__content,
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content[aria-current="page"] {
    background: transparent !important;
    color: var(--wp--preset--color--brand) !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* Submenu container inside drawer — no border box, just indent */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__submenu-container {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content {
    color: var(--wp--preset--color--bg) !important;
    font-family: var(--wp--preset--font-family--display);
    font-size: 28px !important;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 14px 8px;
    text-transform: none;
  }

  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content:hover,
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content:focus {
    color: var(--wp--preset--color--brand) !important;
    background: transparent !important;
  }

  /* Submenu items inside the open mobile drawer — slightly smaller, indented */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__submenu-container
    .wp-block-navigation-item__content {
    font-size: 20px !important;
    padding: 10px 8px 10px 20px;
  }

  /* Hamburger toggle + close button — larger tap targets, cream stroke */
  .wp-block-navigation__responsive-container-open,
  .wp-block-navigation__responsive-container-close {
    color: inherit !important;
    padding: 10px !important;
  }

  .wp-block-navigation__responsive-container-open svg,
  .wp-block-navigation__responsive-container-close svg {
    width: 28px !important;
    height: 28px !important;
    display: block;
  }

  /* Anchor close button INSIDE the drawer, top-right, fully visible.
   * Without this, WP's default positioning + our padding causes it to
   * overflow past the drawer edge. */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 100 !important;
    color: var(--wp--preset--color--bg) !important;
  }

  /* The dialog wrapper inside the open drawer — keep relative so the
   * close button positions correctly relative to it. */
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-dialog {
    position: relative;
    width: 100%;
    height: 100%;
    padding-top: 64px;
  }

  /* Mobile header layout: hamburger LEFT · logo+brand CENTER · cart/insta RIGHT.
   * The outer flex has three children in DOM order:
   *   1. logo+brand group
   *   2. navigation (contains hamburger button)
   *   3. cart/instagram group
   * Reorder via flex `order` so navigation comes first; with
   * justify-content: space-between, three items distribute as
   * [start | center | end] visually. */
  header.wp-block-template-part .ffs-header-main .wp-block-navigation {
    order: -1;
  }

  /* Make the logo group not stretch — keep it centered as the middle item */
  header.wp-block-template-part
    .ffs-header-main
    .wp-block-group.alignwide
    > .wp-block-group:first-child {
    flex: 0 0 auto;
  }

  /* On very narrow screens, hide brand subtitle to keep header compact */
  header.wp-block-template-part .ffs-header-main .has-brand-soft-color {
    display: none;
  }
}

/* ---- Hero ---- */
@media (max-width: 768px) {
  .ffs-hero {
    margin-top: -85px !important;
    padding-top: 140px !important;
    padding-bottom: 80px !important;
    min-height: clamp(560px, 92vh, 760px) !important;
  }

  /* CTAs stack vertically full-width */
  .ffs-hero .wp-block-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 12px !important;
  }

  .ffs-hero .wp-block-button {
    width: 100% !important;
  }

  .ffs-hero .wp-block-button .wp-block-button__link {
    width: 100%;
    text-align: center;
    display: block;
  }

  /* Meta row tightens — 2018 / 34 / 48h smaller, wraps if needed */
  .ffs-hero h3 {
    font-size: 28px !important;
  }

  /* "Cioccolato fondente 72%" badge centers below the right column */
  .ffs-hero .has-paper-background-color {
    margin-top: 32px !important;
  }
}

/* ---- Header (subtitle tightens) ---- */
@media (max-width: 540px) {
  /* Hide subtitle "POLISTENA · REGGIO CALABRIA · DAL 2018" on tiny phones
   * to free up horizontal space for hamburger + cart icons. */
  header.wp-block-template-part .ffs-header-main .has-brand-soft-color {
    display: none;
  }

  /* Tighten header padding */
  header.wp-block-template-part .ffs-header-main {
    padding: 14px 16px !important;
  }
}

/* ---- Columns: categories, story teaser, products, footer ---- */
@media (max-width: 768px) {
  /* Force core/columns to stack vertically on phones (default) */
  .wp-site-blocks .wp-block-columns {
    flex-direction: column !important;
    gap: 24px !important;
  }

  .wp-site-blocks .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  /* EXCEPTION: categories grid — keep 2-per-row on phone using :has().
   * Targets only columns blocks that contain an .ffs-cat-card. */
  .wp-site-blocks .wp-block-columns:has(.ffs-cat-card) {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  .wp-site-blocks .wp-block-columns:has(.ffs-cat-card) > .wp-block-column {
    flex-basis: calc(50% - 6px) !important;
    width: calc(50% - 6px) !important;
  }
  /* Odd 3rd category spans full width — looks intentional, not orphaned */
  .wp-site-blocks
    .wp-block-columns:has(.ffs-cat-card)
    > .wp-block-column:nth-child(3):last-child {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  /* Categories cards — shorter on phone so 2-per-row fit comfortably */
  .ffs-cat-card {
    min-height: 280px !important;
    padding: 20px !important;
  }

  /* Tighter typography inside the smaller cards */
  .ffs-cat-card h3 {
    font-size: 28px !important;
  }
  .ffs-cat-card p {
    font-size: 11px !important;
  }

  /* Story teaser image and copy stack — image first naturally */
  .wp-block-image img {
    width: 100%;
    height: auto;
  }
}

/* ---- Footer (4 col → 2 col tablet → 1 col phone) ---- */
@media (max-width: 1024px) and (min-width: 769px) {
  footer.ffs-footer .wp-block-columns {
    flex-wrap: wrap !important;
  }

  footer.ffs-footer .wp-block-column {
    flex-basis: 50% !important;
    margin-bottom: 32px;
  }
}

@media (max-width: 768px) {
  footer.ffs-footer {
    padding-top: 56px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  footer.ffs-footer .wp-block-column {
    margin-bottom: 24px;
  }
}

/* ---- Ingredients marquee — smaller on phone ---- */
@media (max-width: 540px) {
  .ffs-marquee .ffs-marquee__track {
    font-size: 18px !important;
    gap: 28px !important;
  }
}

/* ---- Section spacing — tighter vertical rhythm on phone ---- */
@media (max-width: 768px) {
  .wp-site-blocks main > .wp-block-group:not(.ffs-hero) {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Big section headings scale down */
  .wp-block-heading[style*="clamp(40px"],
  .wp-block-heading[style*="clamp(36px"] {
    font-size: 36px !important;
  }
}

/* ==================================================================
 * Single page hero (.ffs-page-hero) — small editorial banner used on
 * page.html / single.html templates. Same overlay-header treatment as
 * the home hero but smaller (380px min-height vs 880px).
 *
 * Triggers the transparent-header behavior because we updated all
 * :has(.ffs-hero) selectors to :has(.ffs-hero, .ffs-page-hero).
 * ================================================================== */
.ffs-page-hero {
  margin-top: -90px !important;
  position: relative;
}

.ffs-page-hero .wp-block-cover__background.has-background-dim {
  background-image: linear-gradient(
    180deg,
    rgba(27, 17, 8, 0.88) 0%,
    rgba(27, 17, 8, 0.72) 45%,
    rgba(27, 17, 8, 0.6) 100%
  ) !important;
  background-color: transparent !important;
  opacity: 1 !important;
}

/* Text-shadow on page hero title for safety */
.ffs-page-hero .wp-block-post-title,
.ffs-page-hero .wp-block-heading,
.ffs-page-hero p {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .ffs-page-hero {
    margin-top: -85px !important;
    padding-top: 130px !important;
    padding-bottom: 40px !important;
    min-height: 280px !important;
  }
}

/* ==================================================================
 * Force hamburger menu at <=1024px (default WP breakpoint is 600px,
 * but our nav has many items and starts wrapping awkwardly around
 * 1100px). Override WP's media query so the overlay kicks in earlier.
 * ================================================================== */
@media (max-width: 1024px) {
  /* Show the hamburger button */
  header.wp-block-template-part
    .wp-block-navigation:not(.has-modal-open):not(.is-collapsed)
    .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }

  /* Hide the inline nav list at this width — only show inside the
   * open overlay panel. */
  header.wp-block-template-part
    .wp-block-navigation
    > .wp-block-navigation__responsive-container:not(.is-menu-open)
    > .wp-block-navigation__responsive-container-content
    > .wp-block-navigation__container {
    display: none !important;
  }

  /* The non-open container itself shouldn't take layout space */
  header.wp-block-template-part
    .wp-block-navigation__responsive-container:not(.is-menu-open) {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
  }

  /* Re-show + position the container when it's open (overrides the
   * visibility:hidden above) — the existing .is-menu-open rule above
   * already handles position:fixed; just make sure visibility wins. */
  header.wp-block-template-part
    .wp-block-navigation__responsive-container.is-menu-open {
    visibility: visible !important;
    width: 100% !important;
    height: 100vh !important;
    pointer-events: auto !important;
  }
}

/* ==================================================================
 * Shop / Collection page (.ffs-shop-grid, .ffs-shop-toolbar)
 * — toolbar with sort + search, filter tags, product cards, pagination.
 * ================================================================== */

/* Toolbar: sort + search row */
.ffs-shop-toolbar .wp-block-surecart-product-list-sort {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--wp--preset--color--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.ffs-shop-toolbar .wp-block-surecart-product-list-search {
  position: relative;
}

.ffs-shop-toolbar .wp-block-surecart-product-list-search input[type="search"],
.ffs-shop-toolbar .wp-block-surecart-product-list-search input {
  background: var(--wp--preset--color--bg-2);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 9999px;
  padding: 12px 20px;
  font-family: var(--wp--preset--font-family--sans);
  font-size: 14px;
  color: var(--wp--preset--color--ink);
  letter-spacing: 0.02em;
  width: 100%;
  transition:
    border-color var(--ffs-t-fast) var(--ffs-ease-out),
    background var(--ffs-t-fast) var(--ffs-ease-out);
}

.ffs-shop-toolbar
  .wp-block-surecart-product-list-search
  input[type="search"]:focus,
.ffs-shop-toolbar .wp-block-surecart-product-list-search input:focus {
  outline: none;
  border-color: var(--wp--preset--color--brand);
  background: var(--wp--preset--color--paper);
}

/* Filter tags */
.ffs-filter-tags .wp-block-surecart-product-list-filter-tag {
  background: var(--wp--preset--color--bg-2);
  color: var(--wp--preset--color--ink-2);
  border: 1px solid var(--wp--preset--color--line-2);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-family: var(--wp--preset--font-family--sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--ffs-t-fast) var(--ffs-ease-out);
}

.ffs-filter-tags .wp-block-surecart-product-list-filter-tag:hover {
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--bg);
  border-color: var(--wp--preset--color--ink);
}

/* Pagination — pill-style links */
.ffs-pagination,
.wp-block-surecart-product-pagination {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 14px;
}

.ffs-pagination a,
.ffs-pagination .wp-block-surecart-product-pagination-numbers .page-numbers,
.wp-block-surecart-product-pagination a {
  padding: 10px 14px;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 500;
  transition:
    background var(--ffs-t-fast) var(--ffs-ease-out),
    color var(--ffs-t-fast) var(--ffs-ease-out);
}

.ffs-pagination a:hover,
.wp-block-surecart-product-pagination a:hover {
  background: var(--wp--preset--color--bg-2);
}

.ffs-pagination .current,
.wp-block-surecart-product-pagination .current {
  background: var(--wp--preset--color--ink) !important;
  color: var(--wp--preset--color--bg) !important;
}

/* ---- Mobile shop adjustments ---- */
@media (max-width: 768px) {
  /* Toolbar stacks: sort row on top, search row on bottom, full width */
  .ffs-shop-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }

  .ffs-shop-toolbar .wp-block-surecart-product-list-search,
  .ffs-shop-toolbar .wp-block-surecart-product-list-search input {
    width: 100% !important;
  }

  /* Product grid: 2 cols on tablet, 1 col on phone (already handled
   * by existing .ffs-products-grid rule, but reinforce for shop grid) */
  .ffs-shop-grid .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

@media (max-width: 540px) {
  .ffs-shop-grid .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: 1fr !important;
  }

  .ffs-shop-grid .ffs-product-card .wp-block-surecart-product-title {
    font-size: 22px !important;
  }
}

/* Collection hero — term-description gets a max-width so it's readable */
.ffs-collection-hero .wp-block-term-description {
  max-width: 640px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.ffs-collection-hero .wp-block-term-description p {
  color: var(--wp--preset--color--line-2) !important;
}

/* ==================================================================
 * Product detail page (PDP) — single-sc_product.html
 *   .ffs-pdp-breadcrumb  cocoa-cream strip below header (replaces hero)
 *   .ffs-pdp-main        two-column layout: media | info
 *   .ffs-pdp-media       left column — product image gallery
 *   .ffs-pdp-info        right column — title, price, buy
 *   .ffs-pdp-features    feature icons row below buy buttons
 *   .ffs-pdp-content     post-content section (cream bg-2)
 *   .ffs-pdp-related     related products grid
 * ================================================================== */

/* Product media (image gallery) — rounded corners, subtle bg for letterboxing */
.ffs-pdp-media .wp-block-surecart-product-media,
.ffs-pdp-media .wp-block-surecart-product-media img {
  border-radius: 16px;
  overflow: hidden;
}

.ffs-pdp-media .wp-block-surecart-product-media {
  background: var(--wp--preset--color--bg-2);
}

/* Product title — match site title display family */
.ffs-pdp-info .wp-block-surecart-product-title {
  font-family: var(--wp--preset--font-family--display);
  color: var(--wp--preset--color--ink);
}

/* Buy buttons — match home CTA style (pill, ink/cream) */
.wp-block-surecart-product-buy-buttons {
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100%;
}

.wp-block-surecart-product-buy-buttons .wp-block-surecart-product-buy-button {
  width: 100%;
}

.wp-block-surecart-product-buy-buttons
  .wp-block-surecart-product-buy-button
  .wp-block-button__link {
  width: 100%;
  text-align: center;
  background-color: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--bg);
  border-radius: 9999px;
  padding: 18px 36px;
  font-family: var(--wp--preset--font-family--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition:
    background-color var(--ffs-t-fast) var(--ffs-ease-out),
    color var(--ffs-t-fast) var(--ffs-ease-out);
}

.wp-block-surecart-product-buy-buttons
  .wp-block-surecart-product-buy-button
  .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--brand-deep) !important;
  color: var(--wp--preset--color--bg) !important;
}

/* Outline variant — second buy button */
.wp-block-surecart-product-buy-buttons
  .is-style-outline
  .wp-block-button__link {
  background-color: transparent;
  color: var(--wp--preset--color--ink);
  border: 1px solid var(--wp--preset--color--ink);
}

.wp-block-surecart-product-buy-buttons
  .is-style-outline
  .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--ink) !important;
  color: var(--wp--preset--color--bg) !important;
}

/* Quantity input — refined */
.wp-block-surecart-product-quantity input,
.wp-block-surecart-product-quantity .sc-quantity-input {
  border: 1px solid var(--wp--preset--color--line-2);
  border-radius: 9999px;
  padding: 8px 16px;
  font-family: var(--wp--preset--font-family--sans);
  background: var(--wp--preset--color--paper);
}

/* Variant pills — match collection filter pills */
.wp-block-surecart-product-variant-pill {
  background: var(--wp--preset--color--bg-2);
  border: 1px solid var(--wp--preset--color--line-2);
  border-radius: 9999px;
  padding: 8px 16px;
  font-family: var(--wp--preset--font-family--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--wp--preset--color--ink-2);
  cursor: pointer;
  transition: all var(--ffs-t-fast) var(--ffs-ease-out);
}

.wp-block-surecart-product-variant-pill:hover,
.wp-block-surecart-product-variant-pill.is-selected,
.wp-block-surecart-product-variant-pill[aria-pressed="true"] {
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--bg);
  border-color: var(--wp--preset--color--ink);
}

/* Features row icons + text */
.ffs-pdp-features p {
  display: flex;
  align-items: center;
  font-family: var(--wp--preset--font-family--sans);
}

/* Post-content section (description, ingredients, etc.) — hidden when the
 * product has no post_content (no children inside .wp-block-post-content).
 * Falls back gracefully to displaying it in older browsers without :has(). */
@supports selector(:has(*)) {
  .ffs-pdp-content:not(:has(.wp-block-post-content > *)) {
    display: none;
  }
}

.ffs-pdp-content .wp-block-post-content {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--wp--preset--color--ink-3);
}

.ffs-pdp-content .wp-block-post-content h2,
.ffs-pdp-content .wp-block-post-content h3 {
  font-family: var(--wp--preset--font-family--display);
  color: var(--wp--preset--color--ink);
  margin-top: 48px;
  margin-bottom: 16px;
}

.ffs-pdp-content .wp-block-post-content h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-style: italic;
  font-weight: 500;
}

.ffs-pdp-content .wp-block-post-content h3 {
  font-size: 22px;
  font-weight: 500;
}

/* Review rating stars color */
.wp-block-surecart-product-review-average-rating-stars {
  color: var(--wp--preset--color--brand);
}

/* ---- PDP Mobile ---- */
@media (max-width: 768px) {
  .ffs-pdp-breadcrumb {
    padding-top: 100px !important;
    padding-bottom: 16px !important;
  }

  .ffs-pdp-main {
    padding-top: 32px !important;
  }

  /* Columns stack — media first, info below */
  .ffs-pdp-main .wp-block-columns {
    flex-direction: column !important;
    gap: 32px !important;
  }

  .ffs-pdp-main .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  /* Smaller title on mobile */
  .ffs-pdp-info .wp-block-surecart-product-title {
    font-size: 28px !important;
    line-height: 1.15 !important;
  }

  /* Price row — tighter */
  .ffs-pdp-info .wp-block-surecart-product-selected-price-amount {
    font-size: 26px !important;
  }

  /* Buy button slightly more compact */
  .wp-block-surecart-product-buy-buttons
    .wp-block-surecart-product-buy-button
    .wp-block-button__link {
    padding: 16px 28px;
    font-size: 14px;
  }

  /* Related products — 2 cols, then 1 col */
  .ffs-pdp-related .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (max-width: 540px) {
  /* Keep 2-col on phone for PDP related products too */
  .ffs-pdp-related .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .ffs-pdp-info .ffs-pdp-features p {
    font-size: 12px !important;
  }
}

/* ==================================================================
 * Universal fallback — ANY SureCart product grid (e.g. /shop/ page
 * that doesn't have one of our .ffs-* wrappers) goes 2-col on phone.
 * Less specific than .ffs-* rules, so they still override when present.
 * ================================================================== */
@media (max-width: 540px) {
  .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 900px) and (min-width: 541px) {
  .wp-block-surecart-product-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

/* ==================================================================
 * Breadcrumbs (foodfruitservice/breadcrumbs block — dynamic).
 * Rendered as <nav class="ffs-breadcrumbs">.
 * ================================================================== */
.ffs-breadcrumbs {
  font-family: var(--wp--preset--font-family--sans);
  font-feature-settings: "kern", "liga";
}

.ffs-breadcrumbs a {
  color: inherit;
  text-decoration: none;
  transition:
    color var(--ffs-t-fast) var(--ffs-ease-out),
    opacity var(--ffs-t-fast) var(--ffs-ease-out);
}

.ffs-breadcrumbs a:hover {
  color: var(--wp--preset--color--brand);
}

.ffs-breadcrumbs__sep {
  margin: 0 4px;
  opacity: 0.55;
}

.ffs-breadcrumbs [aria-current="page"] {
  opacity: 0.85;
}

.ffs-breadcrumbs.has-text-align-center {
  text-align: center;
}
.ffs-breadcrumbs.has-text-align-right {
  text-align: right;
}
.ffs-breadcrumbs.has-text-align-left {
  text-align: left;
}

/* ==================================================================
 * Tabs block (foodfruitservice/tabs + foodfruitservice/tab).
 * Editorial product-page tabs — Descrizione / Ingredienti / Modalità d'uso.
 * ================================================================== */
.ffs-tabs {
  margin: 64px 0;
  font-family: var(--wp--preset--font-family--sans);
}

/* Tab buttons row */
.ffs-tabs__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  border-bottom: 1px solid var(--wp--preset--color--line);
  margin-bottom: 40px;
}

.ffs-tabs__btn {
  position: relative;
  background: transparent;
  border: 0;
  padding: 18px 0;
  font-family: var(--wp--preset--font-family--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  cursor: pointer;
  transition: color var(--ffs-t-fast) var(--ffs-ease-out);
}

.ffs-tabs__btn:hover {
  color: var(--wp--preset--color--ink-2);
}

.ffs-tabs__btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--wp--preset--color--ink);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--ffs-t-med) var(--ffs-ease-out);
}

.ffs-tabs__btn.is-active {
  color: var(--wp--preset--color--ink);
}

.ffs-tabs__btn.is-active::after {
  transform: scaleX(1);
}

.ffs-tabs__btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--brand);
  outline-offset: 4px;
}

/* Panels */
.ffs-tabs__panel {
  display: none;
  animation: ffs-tab-fade var(--ffs-t-med) var(--ffs-ease-out);
}
.ffs-tabs__panel.is-active {
  display: block;
}
.ffs-tabs__panel[hidden] {
  display: none !important;
}

@keyframes ffs-tab-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Editor preview (all tabs visible stacked) */
.ffs-tabs--editor .ffs-tab--editor {
  border: 1px dashed var(--wp--preset--color--line-2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.ffs-tab__title-edit {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--ink);
  margin: 0 0 12px;
}

/* Mobile — horizontal scrollable tab buttons row */
@media (max-width: 768px) {
  .ffs-tabs {
    margin: 40px 0;
  }
  .ffs-tabs__buttons {
    gap: 24px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    margin-bottom: 28px;
  }
  .ffs-tabs__buttons::-webkit-scrollbar {
    display: none;
  }
  .ffs-tabs__btn {
    font-size: 12px;
    letter-spacing: 0.12em;
    white-space: nowrap;
    padding: 14px 0;
  }
}

/* Editor-only: hide non-active tabs, force tab buttons to display
 * horizontally inside the block editor (Gutenberg's wrapper sometimes
 * resets the flex layout we set on .ffs-tabs__buttons). */
.ffs-tab--editor.is-hidden,
.editor-styles-wrapper .ffs-tab--editor.is-hidden {
  display: none !important;
}

.editor-styles-wrapper .ffs-tabs--editor .ffs-tabs__buttons {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 32px;
  border-bottom: 1px solid var(--wp--preset--color--line);
  margin-bottom: 24px;
}

.editor-styles-wrapper .ffs-tabs--editor .ffs-tabs__btn {
  background: transparent;
  border: 0;
  padding: 14px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  cursor: pointer;
}

.editor-styles-wrapper .ffs-tabs--editor .ffs-tabs__btn.is-active {
  color: var(--wp--preset--color--ink);
  border-bottom: 2px solid var(--wp--preset--color--ink);
  margin-bottom: -1px;
}

/* ==================================================================
 * Catalog-only mode (companion plugin adds body.ffs-catalog-mode).
 * Hide pricing and any SureCart purchase UI that slips past render_block.
 * ================================================================== */
body.ffs-catalog-mode .wp-block-surecart-product-list-price,
body.ffs-catalog-mode .wp-block-surecart-product-scratch-price,
body.ffs-catalog-mode .wp-block-surecart-product-selected-price-amount,
body.ffs-catalog-mode .wp-block-surecart-product-selected-price-scratch-amount,
body.ffs-catalog-mode .wp-block-surecart-product-selected-price-interval,
body.ffs-catalog-mode .wp-block-surecart-product-sale-badge,
body.ffs-catalog-mode .wp-block-surecart-product-buy-buttons,
body.ffs-catalog-mode .wp-block-surecart-product-buy-button,
body.ffs-catalog-mode .wp-block-surecart-product-quick-view-button,
body.ffs-catalog-mode
  .wp-block-cover__inner-container
  .wp-block-buttons:has(.wp-block-surecart-product-quick-view-button),
body.ffs-catalog-mode .wp-block-surecart-product-quantity,
body.ffs-catalog-mode .wp-block-surecart-cart-menu-icon-button,
body.ffs-catalog-mode .wp-block-surecart-checkout-form,
body.ffs-catalog-mode .wp-block-surecart-sticky-purchase,
body.ffs-catalog-mode sc-product-buy-button,
body.ffs-catalog-mode surecart-checkout-form {
  display: none !important;
}

body.ffs-catalog-mode
  .ffs-product-card
  .wp-block-group:has(.wp-block-surecart-product-list-price),
body.ffs-catalog-mode
  .ffs-pdp-info
  .wp-block-group:has(.wp-block-surecart-product-selected-price-amount) {
  display: none;
}
