.universal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.universal-main {
  flex: 1 0 auto;
}

.universal-logo {
  max-height: 4.25rem;
  width: auto;
  height: auto;
}

.universal-hero-media {
  min-height: 22rem;
  background: linear-gradient(135deg, var(--brand-primary-soft), var(--brand-accent-soft));
}

.universal-product-card .ratio,
.universal-category-tile {
  background: var(--brand-section-alt-bg);
}

.universal-product-title {
  min-height: 3rem;
}

.universal-soft-band {
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(255,255,255,.38)),
    var(--brand-section-alt-bg);
}

.universal-nav-actions .btn {
  white-space: nowrap;
}

[data-sw-button-content-mode="icon_text"],
[data-sw-button-content-mode="icon_only"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-sw-button-content-mode="icon_text"] {
  gap: .5rem;
}

[data-sw-button-content-mode="icon_only"] {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-inline: .75rem;
}

.sw-button-icon {
  flex: 0 0 auto;
  line-height: 1;
}

.universal-cart-thumb {
  width: 4.5rem;
  height: 4.5rem;
}

.universal-cart-thumb-lg {
  width: 5.5rem;
  height: 5.5rem;
}

.universal-sticky-summary {
  top: 7rem;
}

.universal-readable {
  max-width: 54rem;
}

.universal-readable-sm {
  max-width: 47.5rem;
}

.universal-line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.universal-line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.universal-card-hidden {
  display: none !important;
}

/* Category cards always use a full-bleed, fixed-ratio media frame. */
.sw-system-categories .sw-category-card {
  --sw-micro-card-padding: 0;
  min-width: 0;
}

.sw-system-categories .sw-category-card__media.ratio {
  position: relative;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden;
}

.sw-system-categories .sw-category-card__media > img,
.sw-system-categories .sw-category-card__image {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: var(--sw-category-card-image-position, 50% 50%);
}

/* Governed card presentation preset. Components opt in through their contract. */
.sw-card-media-overlay {
  position: relative !important;
  isolation: isolate;
  display: flex !important;
  min-height: clamp(22rem, 32vw, 31rem);
  flex-direction: column !important;
  justify-content: flex-end !important;
  overflow: hidden !important;
  background: var(--brand-heading-text, #111827) !important;
  color: #fff !important;
}

.sw-card-media-overlay::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 14, .04) 25%, rgba(5, 8, 14, .84) 100%);
  content: "";
  pointer-events: none;
}

.sw-card-media-overlay > :is(
  .sw-product-card__media,
  .sw-blog-card__media,
  .sw-category-card__media,
  .sw-image-feature-card__media,
  .sw-content-carousel__media
) {
  position: absolute !important;
  z-index: 0;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  border-radius: inherit;
}

.sw-card-media-overlay > :is(
  .sw-product-card__media,
  .sw-blog-card__media,
  .sw-category-card__media,
  .sw-image-feature-card__media,
  .sw-content-carousel__media
) > img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform .28s ease, filter .28s ease;
}

.sw-card-media-overlay > :is(
  .sw-product-card__body,
  .sw-blog-card__body,
  .sw-category-card__body,
  .sw-image-feature-card__body,
  .sw-content-carousel__body
) {
  position: relative !important;
  z-index: 2;
  width: 100%;
  margin-top: auto;
  flex: 0 0 auto !important;
  background: transparent !important;
  color: #fff !important;
}

/* The normal card body grows to fill a column. Overlay bodies must instead
   remain at the bottom, leaving the media badge its own space at the top. */
.sw-card-media-overlay:has(.sw-product-card__badge, .sw-ecommerce-product-carousel__badge, .sw-community-product-carousel__badge) {
  padding-top: 3.5rem !important;
}

.sw-card-media-overlay > :is(
  .sw-product-card__body,
  .sw-blog-card__body,
  .sw-category-card__body,
  .sw-image-feature-card__body,
  .sw-content-carousel__body
) :is(.text-brand-heading, .text-brand-muted, .text-brand-primary, .eyebrow-brand, h2, h3, strong, small, p, a:not(.btn)) {
  color: #fff !important;
}

.sw-card-media-overlay > :is(
  .sw-product-card__body,
  .sw-blog-card__body,
  .sw-category-card__body,
  .sw-image-feature-card__body,
  .sw-content-carousel__body
) :is(button:not(.btn-brand-primary), .sw-card-action:not(.btn-brand-primary)) {
  color: #fff !important;
}

.sw-card-media-overlay > :is(
  .sw-product-card__body,
  .sw-blog-card__body,
  .sw-category-card__body,
  .sw-image-feature-card__body,
  .sw-content-carousel__body
) :is(.text-brand-muted, p, small) {
  color: rgba(255, 255, 255, .82) !important;
}

.sw-card-media-overlay:hover > :is(
  .sw-product-card__media,
  .sw-blog-card__media,
  .sw-category-card__media,
  .sw-image-feature-card__media,
  .sw-content-carousel__media
) > img,
.sw-card-media-overlay:focus-within > :is(
  .sw-product-card__media,
  .sw-blog-card__media,
  .sw-category-card__media,
  .sw-image-feature-card__media,
  .sw-content-carousel__media
) > img {
  transform: scale(1.035);
  filter: saturate(1.04);
}

.sw-card-media-overlay:focus-within {
  outline: 3px solid color-mix(in srgb, var(--brand-primary, #0d6efd) 72%, #fff);
  outline-offset: 3px;
}

/*
 * Website Settings owns the default corner token. Page Update can still
 * override an individual item with Bootstrap rounded-* utility classes or an
 * approved inline style; both have higher precedence than this baseline.
 */
:is(html, body)[data-corner-style] :is(
  [data-sw-style-slot="item"],
  .card-brand,
  .card-brand-soft,
  .card-brand-bordered,
  .sw-micro-panel
) {
  border-radius: var(--brand-card-radius);
}

/* Keep page-owned legacy component CSS from overriding Website Settings. */
:is(html, body)[data-button-style] .btn-brand-primary {
  background-color: var(--brand-button-primary-bg);
  border-color: var(--brand-button-primary-border);
  color: var(--brand-button-primary-text);
}

:is(html, body)[data-button-style] .btn-brand-primary:is(:hover, :focus, :active) {
  background-color: var(--brand-button-primary-hover-bg);
  border-color: var(--brand-button-primary-hover-border);
  color: var(--brand-button-primary-hover-text);
}

:is(html, body)[data-button-style] .btn-brand-secondary {
  background-color: var(--brand-button-secondary-bg);
  border-color: var(--brand-button-secondary-border);
  color: var(--brand-button-secondary-text);
}

:is(html, body)[data-button-style] .btn-brand-secondary:is(:hover, :focus, :active) {
  background-color: var(--brand-button-secondary-hover-bg);
  border-color: var(--brand-button-secondary-hover-border);
  color: var(--brand-button-secondary-hover-text);
}

:is(html, body)[data-button-style] .btn-brand-accent {
  background-color: var(--brand-button-accent-bg);
  border-color: var(--brand-button-accent-border);
  color: var(--brand-button-accent-text);
}

:is(html, body)[data-button-style] .btn-brand-accent:is(:hover, :focus, :active) {
  background-color: var(--brand-button-accent-hover-bg);
  border-color: var(--brand-button-accent-hover-border);
  color: var(--brand-button-accent-hover-text);
}

.universal-list-card .universal-card-inner {
  flex-direction: row !important;
}

.universal-list-card .universal-catalog-media,
.universal-list-card .universal-blog-media {
  width: min(34%, 18rem);
  flex: 0 0 min(34%, 18rem);
}

@media (max-width: 991.98px) {
  .universal-logo {
    max-height: 3.4rem;
  }

  .heading-brand-xl {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
  }
}

@media (max-width: 767.98px) {
  .universal-list-card .universal-card-inner {
    flex-direction: column !important;
  }

  .universal-list-card .universal-catalog-media,
  .universal-list-card .universal-blog-media {
    width: 100%;
    flex-basis: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sw-card-media-overlay > :is(
    .sw-product-card__media,
    .sw-blog-card__media,
    .sw-category-card__media,
    .sw-image-feature-card__media,
    .sw-content-carousel__media
  ) > img {
    transition: none;
  }
}

/* Shared server-owned catalog price block; inherits the page's brand and type. */
.sw-catalog-price{min-width:0;max-width:100%;line-height:1.45}
.sw-catalog-price__amounts>strong,.sw-catalog-price__amounts>del{white-space:nowrap}
.sw-catalog-price__status{margin-top:.25rem;color:inherit;font-weight:600}
.sw-catalog-price__tiers{padding:.85rem;border:1px solid var(--brand-card-border,#dee2e6);border-radius:var(--brand-card-radius,.5rem);background:var(--brand-card-bg,transparent)}
.sw-catalog-price__tiers .table{--bs-table-bg:transparent;--bs-table-color:inherit;--bs-table-border-color:var(--brand-card-border,#dee2e6);font-size:.9em}
.sw-catalog-price__tiers th,.sw-catalog-price__tiers td{padding:.45rem .25rem;text-align:left;vertical-align:middle}
.sw-catalog-price__tiers td:last-child{text-align:right}
.sw-catalog-price__tiers .table-active{--bs-table-bg:color-mix(in srgb,var(--brand-primary,#0d6efd) 12%,transparent);--bs-table-accent-bg:transparent}
.sw-product-price-card__head .sw-catalog-price strong{font-size:inherit;text-align:inherit}
[data-sw-price-detail="1"] .sw-catalog-price__amounts>strong{font-size:clamp(1.5rem,3vw,2rem)}
@media(max-width:575.98px){.sw-catalog-price{width:100%}.sw-catalog-price__tiers{padding:.65rem}[data-sw-price-detail="1"] .sw-catalog-price__amounts>strong{font-size:clamp(1.2rem,5vw,1.5rem)}}

/* Existing signed listing snapshots predate the shared marketplace touch target. */
.sw-system-products--marketplace .sw-refine-text-link{min-height:44px;padding:.5rem .75rem}

/* Shared mobile controls must remain reachable in existing page snapshots. */
@media(max-width:767.98px){.sw-micro-header .navbar-toggler{min-width:44px;min-height:44px}.sw-public-chat__launcher{min-width:44px;min-height:44px}.sw-header-social-topbar__social a{min-width:44px;min-height:44px}.sw-header-social-topbar__link{display:inline-flex;align-items:center;min-height:44px}.sw-metal-currency-control select{height:44px;min-height:44px}}

/* Keep shared component text legible against tenant-tinted light surfaces. */
.sw-header-social-topbar .sw-header-social-topbar__link{color:var(--brand-body-text,#212529)!important}
.sw-system-market-rate-hero .sw-market-hero-rate .sw-system-metal-card__change{color:var(--brand-heading-text,#111827)!important}
html body .sw-micro-accordion .sw-micro-detail[open]>summary,html body .sw-calculator-faq .sw-micro-detail[open]>summary,html body .sw-unit-faq-item[open]>summary{color:var(--brand-heading-text,#111827)!important}

/* Checkout feedback stays in view when the submit button is below the fold. */
.sw-checkout-toast{position:fixed;top:max(1rem,env(safe-area-inset-top));left:50%;transform:translate(-50%,-1rem);z-index:2147483000;width:min(32rem,calc(100vw - 2rem));padding:.9rem 1rem;display:flex;align-items:flex-start;gap:1rem;justify-content:space-between;border-radius:var(--brand-card-radius,.6rem);background:#9f1d20;color:#fff;box-shadow:0 12px 28px rgba(0,0,0,.22);font-size:1rem;line-height:1.4;opacity:0;visibility:hidden;transition:opacity .2s,transform .2s,visibility .2s}
.sw-checkout-toast.is-visible{opacity:1;visibility:visible;transform:translate(-50%,0)}
.sw-checkout-toast.is-success{background:#146c43}
.sw-checkout-toast button{border:0;background:transparent;color:inherit;font-size:1.5rem;line-height:1;min-width:2.75rem;min-height:2.75rem;cursor:pointer}
@media(max-width:575.98px){.sw-checkout-toast{top:max(.5rem,env(safe-area-inset-top));width:calc(100% - 1rem)}}

/* Published checkout pages keep their saved spacing classes until republished. */
@media(max-width:767.98px){.sw-system-checkout.p-5{padding-inline:1rem!important}}
