/*
 * Responsive behavior for the canonical storefront renderer. Values come from
 * the canonical renderer's responsiveConfig and template industry metadata.
 */
.merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-desktop="1"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-desktop="2"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-desktop="3"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-desktop="4"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-tablet="1"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-tablet="2"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-tablet="3"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-tablet="4"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-mobile="1"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-mobile="2"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-mobile="3"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .merchant-themed-store.sf-responsive-runtime[data-sf-product-columns-mobile="4"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .merchant-themed-store.sf-responsive-runtime .sf-section-mobile-hidden {
    display: none !important;
  }

  .merchant-themed-store.sf-responsive-runtime[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-editorial-image,.merchant-category-beauty-soft,.merchant-category-grocery-quick,.merchant-category-technical-card,.merchant-category-wholesale-card,.merchant-category-retail-lifestyle) .merchant-category-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    grid-template-columns: none;
    padding: 2px 2px 9px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .merchant-themed-store.sf-responsive-runtime[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-editorial-image,.merchant-category-beauty-soft,.merchant-category-grocery-quick,.merchant-category-technical-card,.merchant-category-wholesale-card,.merchant-category-retail-lifestyle) .merchant-category-grid::-webkit-scrollbar {
    display: none;
  }

  .merchant-themed-store.sf-responsive-runtime[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-editorial-image,.merchant-category-beauty-soft,.merchant-category-grocery-quick,.merchant-category-technical-card,.merchant-category-wholesale-card,.merchant-category-retail-lifestyle) .merchant-category-card.merchant-category-card {
    flex: 0 0 min(72vw, 282px);
    min-width: 0;
    scroll-snap-align: start;
  }

  .merchant-themed-store.sf-responsive-runtime[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-beauty-soft,.merchant-category-grocery-quick) .merchant-category-card.merchant-category-card {
    flex-basis: min(43vw, 162px);
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-commerce-cover {
    aspect-ratio: 1 / 1;
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-product-content {
    gap: 6px;
    padding: 11px;
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-product-content h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    line-height: 1.3;
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-commerce-card-meta,
  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-commerce-card-meta span {
    font-size: 9px !important;
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-course-card-footer strong {
    font-size: 14px;
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-course-card-footer small,
  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-product-actions .merchant-commerce-buy {
    display: none;
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-product-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .merchant-themed-store.sf-responsive-runtime .merchant-commerce-card .merchant-product-actions button {
    min-height: 38px;
    padding: 0 6px;
    font-size: 9px;
  }
}

/* The editor canvas is a viewport simulation. Reuse the public breakpoint
   behavior below its fixed canvas width instead of rendering another template. */
.merchant-themed-store.sf-preview-tablet .merchant-theme-header {
  grid-template-columns: 1fr auto;
}

.merchant-themed-store.sf-preview-tablet .merchant-theme-header nav {
  display: none;
}

.merchant-themed-store.sf-preview-tablet .merchant-theme-hero,
.merchant-themed-store.sf-preview-tablet .merchant-theme-village,
.merchant-themed-store.sf-preview-tablet .merchant-theme-affiliate {
  grid-template-columns: 1fr;
}

.merchant-themed-store.sf-preview-tablet .merchant-product-grid:not(.merchant-event-catalogue),
.merchant-themed-store.sf-preview-tablet .merchant-theme-categories,
.merchant-themed-store.sf-preview-tablet .merchant-theme-units {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.merchant-themed-store.sf-preview-tablet[data-sf-product-columns-tablet="1"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.merchant-themed-store.sf-preview-tablet[data-sf-product-columns-tablet="2"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.merchant-themed-store.sf-preview-tablet[data-sf-product-columns-tablet="3"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.merchant-themed-store.sf-preview-tablet[data-sf-product-columns-tablet="4"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.merchant-themed-store.sf-preview-tablet .merchant-theme-benefits {
  grid-template-columns: repeat(2, 1fr);
}

.merchant-themed-store.sf-preview-tablet .merchant-theme-testimonials,
.merchant-themed-store.sf-preview-tablet .merchant-theme-footer {
  grid-template-columns: 1fr;
}

.merchant-themed-store.sf-preview-tablet .merchant-theme-hero-image {
  min-height: 340px;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-header {
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 11px 14px;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-header nav {
  display: none;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-brand small,
.merchant-themed-store.sf-preview-mobile .merchant-cart-button span {
  display: none;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-hero {
  grid-template-columns: 1fr;
  padding: 38px 18px;
  text-align: center;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-hero h1 {
  font-size: 39px;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-hero > div > div {
  justify-content: center;
  width: 100%;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-hero p {
  margin-right: auto;
  margin-left: auto;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-hero-image {
  min-height: 250px;
  width: 100%;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-section {
  padding: 38px 18px;
}

.merchant-themed-store.sf-preview-mobile[data-sf-product-columns-mobile="1"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.merchant-themed-store.sf-preview-mobile[data-sf-product-columns-mobile="2"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.merchant-themed-store.sf-preview-mobile[data-sf-product-columns-mobile="3"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.merchant-themed-store.sf-preview-mobile[data-sf-product-columns-mobile="4"] .merchant-product-grid:not(.merchant-event-catalogue) { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.merchant-themed-store.sf-preview-mobile .merchant-theme-categories,
.merchant-themed-store.sf-preview-mobile .merchant-theme-units,
.merchant-themed-store.sf-preview-mobile .merchant-theme-benefits,
.merchant-themed-store.sf-preview-mobile .merchant-theme-social,
.merchant-themed-store.sf-preview-mobile .merchant-theme-village,
.merchant-themed-store.sf-preview-mobile .merchant-theme-affiliate {
  grid-template-columns: 1fr;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-village,
.merchant-themed-store.sf-preview-mobile .merchant-theme-affiliate,
.merchant-themed-store.sf-preview-mobile .merchant-theme-promo {
  margin: 20px 14px;
  padding: 27px;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-footer {
  grid-template-columns: 1fr;
  padding: 30px 20px;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-footer > div:nth-child(2) {
  flex-wrap: wrap;
}

.merchant-themed-store.sf-preview-mobile .merchant-theme-heading {
  align-items: flex-start;
  flex-direction: column;
}

.merchant-themed-store.sf-preview-mobile .sf-section-mobile-hidden {
  display: none !important;
}

.merchant-themed-store.sf-preview-mobile[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-editorial-image,.merchant-category-beauty-soft,.merchant-category-grocery-quick,.merchant-category-technical-card,.merchant-category-wholesale-card,.merchant-category-retail-lifestyle) .merchant-category-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  grid-template-columns: none;
  padding: 2px 2px 9px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.merchant-themed-store.sf-preview-mobile[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-editorial-image,.merchant-category-beauty-soft,.merchant-category-grocery-quick,.merchant-category-technical-card,.merchant-category-wholesale-card,.merchant-category-retail-lifestyle) .merchant-category-grid::-webkit-scrollbar {
  display: none;
}

.merchant-themed-store.sf-preview-mobile[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-editorial-image,.merchant-category-beauty-soft,.merchant-category-grocery-quick,.merchant-category-technical-card,.merchant-category-wholesale-card,.merchant-category-retail-lifestyle) .merchant-category-card.merchant-category-card {
  flex: 0 0 244px;
  min-width: 0;
  scroll-snap-align: start;
}

.merchant-themed-store.sf-preview-mobile[data-sf-horizontal-category-overflow="true"] .merchant-category-experience:is(.merchant-category-marketplace-icon,.merchant-category-beauty-soft,.merchant-category-grocery-quick) .merchant-category-card.merchant-category-card {
  flex-basis: 146px;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-commerce-cover {
  aspect-ratio: 1 / 1;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-product-content {
  gap: 6px;
  padding: 11px;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-product-content h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.3;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-commerce-card-meta,
.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-commerce-card-meta span {
  font-size: 9px !important;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-course-card-footer strong {
  font-size: 14px;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-course-card-footer small,
.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-product-actions .merchant-commerce-buy {
  display: none;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-product-actions {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.merchant-themed-store.sf-preview-mobile .merchant-commerce-card .merchant-product-actions button {
  min-height: 38px;
  padding: 0 6px;
  font-size: 9px;
}

.merchant-themed-store.sf-preview-mobile[data-sf-horizontal-category-overflow="true"] .merchant-theme-categories {
  display: flex;
  overflow-x: auto;
  grid-template-columns: none;
  padding-bottom: 5px;
  scroll-snap-type: x proximity;
}

.merchant-themed-store.sf-preview-mobile[data-sf-horizontal-category-overflow="true"] .merchant-theme-categories a {
  flex: 0 0 190px;
  scroll-snap-align: start;
}

.merchant-themed-store.sf-preview-mobile .merchant-app-bottom-nav {
  display: grid;
}

/* Public Core intake actions are rendered outside the Storefront canvas so a
 * published theme, its preview, and demo renderer stay visually identical. */
.storefront-core-action-dialog { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 20px; }
.storefront-core-action-backdrop { position: absolute; inset: 0; background: rgba(19, 12, 35, .48); backdrop-filter: blur(5px); }
.storefront-core-action-panel { position: relative; width: min(100%, 520px); max-height: min(86vh, 760px); overflow: auto; padding: 34px; border-radius: 24px; background: #fff; box-shadow: 0 28px 76px rgba(29, 16, 64, .28); color: #211a31; }
.storefront-core-action-panel h2 { margin: 0 34px 8px 0; font-size: clamp(24px, 4vw, 32px); line-height: 1.15; }
.storefront-core-action-panel > p { margin: 0 0 22px; color: #655d72; line-height: 1.55; }
.storefront-core-action-panel form { display: grid; gap: 14px; }
.storefront-core-action-panel label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: #342c45; }
.storefront-core-action-panel label span { font-weight: 500; color: #80788d; }
.storefront-core-action-panel input, .storefront-core-action-panel select, .storefront-core-action-panel textarea { width: 100%; min-height: 46px; box-sizing: border-box; border: 1px solid #ded8e9; border-radius: 12px; padding: 11px 12px; background: #fff; color: #211a31; font: inherit; }
.storefront-core-action-panel textarea { min-height: 84px; resize: vertical; }
.storefront-core-action-panel fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.storefront-core-action-panel fieldset legend { margin-bottom: 5px; font-size: 13px; font-weight: 700; color: #342c45; }
.storefront-core-action-panel fieldset label, .storefront-core-action-panel .storefront-core-action-check { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.storefront-core-action-panel fieldset input, .storefront-core-action-panel .storefront-core-action-check input { width: 18px; min-height: 18px; margin: 0; padding: 0; }
.storefront-core-action-panel button[type="submit"], .storefront-core-action-panel > button:not(.storefront-core-action-close) { min-height: 48px; border: 0; border-radius: 999px; padding: 0 20px; background: #6d38ef; color: #fff; font: 700 15px/1 inherit; cursor: pointer; }
.storefront-core-action-panel button:disabled { cursor: wait; opacity: .6; }
.storefront-core-action-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f2eff8; color: #332b44; font-size: 25px; line-height: 1; cursor: pointer; }
@media (max-width: 620px) { .storefront-core-action-dialog { align-items: end; padding: 10px; } .storefront-core-action-panel { width: 100%; max-height: 88vh; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); border-radius: 22px 22px 16px 16px; } }
