.fw-store-section,
.fw-product-shell {
  margin: 1.5rem 0;
}

.fw-store-head {
  margin-bottom: 1rem;
}

.fw-store-head h2,
.fw-product-copy h2 {
  margin: 0;
}

.fw-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.fw-card,
.fw-product-shell {
  border: 1px solid rgba(20, 32, 44, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(10, 19, 31, 0.08);
}

.fw-card {
  display: grid;
}

.fw-card-media {
  display: block;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eef3f8, #dde8f5);
}

.fw-card-media img,
.fw-product-stage img,
.fw-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fw-card-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1rem;
  text-align: center;
  font-weight: 700;
  color: #243548;
}

.fw-card-copy {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.fw-card-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #66788d;
  font-weight: 800;
}

.fw-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.fw-card h3 a,
.fw-card h3 a:hover,
.fw-product-copy h2 a,
.fw-product-copy h2 a:hover {
  color: inherit;
  text-decoration: none;
}

.fw-card-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.fw-card-price {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #103b7a, #1f6dcb);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.fw-card-compare {
  color: #7a8796;
  text-decoration: line-through;
  font-size: 0.92rem;
}

.fw-card-description {
  margin: 0;
  color: #445568;
  line-height: 1.55;
}

.fw-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fw-variant-label {
  display: grid;
  gap: 6px;
}

.fw-variant-label span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #516173;
}

.fw-variant-select {
  width: 100%;
}

.fw-product-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.fw-product-media {
  padding: 18px;
  border-right: 1px solid rgba(20, 32, 44, 0.08);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 246, 252, 0.98));
}

.fw-product-gallery {
  display: grid;
  gap: 12px;
}

.fw-product-stage {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef3f8, #dde8f5);
}

.fw-product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 10px;
}

.fw-product-thumb {
  padding: 0;
  aspect-ratio: 1 / 1;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.fw-product-thumb.is-active {
  border-color: #1f6dcb;
  box-shadow: 0 0 0 3px rgba(31, 109, 203, 0.12);
}

.fw-product-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.fw-product-description p {
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .fw-product-shell {
    grid-template-columns: 1fr;
  }

  .fw-product-media {
    border-right: 0;
    border-bottom: 1px solid rgba(20, 32, 44, 0.08);
  }
}

/* Product cards should retain their layout inside rich-text content. */
.fw-store-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); align-items: stretch; }
.fw-card, .fw-product-shell { border-radius: 8px; background: var(--card, #fff); color: var(--text, #243548); }
.fw-card { display: flex; flex-direction: column; min-width: 0; }
.fw-card-media { position: relative; flex: none; width: 100%; overflow: hidden; background: #f8fafc; --body-link-highlight: #f8fafc; }
.fw-product-stage { position: relative; border-radius: 8px; background: #f8fafc; }
.fw-card .fw-card-media > img,
.fw-product-gallery .fw-product-stage > img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-height: none;
  object-fit: contain; object-position: center; padding: 12px; box-sizing: border-box; margin: 0; border-radius: 0;
}
.fw-product-gallery .fw-product-thumb > img { object-fit: contain; margin: 0; border-radius: 0; }
.fw-card-copy { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 18px; min-width: 0; }
.fw-card .fw-card-title {
  font-family: var(--font-headings); font-size: 1.22rem; line-height: 1.25; font-weight: 750; letter-spacing: -.015em;
  color: var(--heading, #243548); overflow-wrap: anywhere;
  --body-link-weight: 750; --body-link: var(--heading, #243548); --body-link-decoration: none; --body-link-highlight: transparent;
}
.fw-card-title .fw-product-title-link { font-family: inherit; font-size: inherit; line-height: inherit; font-weight: inherit; }
.fw-card-title .fw-product-title-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.fw-card .fw-card-description { font-size: .95rem; line-height: 1.5; color: var(--muted, #516173); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.fw-card-actions { margin-top: auto; padding-top: 4px; }
.fw-card .fw-options-note, .fw-product-copy .fw-options-note { margin: 0; font-size: .82rem; line-height: 1.4; color: var(--muted, #516173); }
.fw-card-fallback { min-height: 100%; }
.fw-image-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #516173; font-size: .9rem; }
.fw-card-media > img[hidden], .fw-product-stage > img[hidden], .fw-image-fallback[hidden] { display: none; }
.fw-product-thumb:disabled { opacity: .6; cursor: default; font-size: .7rem; }

.fw-variant-select { font-family: var(--font-body); font-size: .9rem; font-weight: 400; min-width: 0; }
.fw-card-price-row[hidden], .fw-card-compare[hidden], .fw-variant-checkout[hidden] { display: none; }
.fw-variant-checkout { align-self: flex-start; }
