/* =================================================================
   SHOP FRONT LAYOUT - Trust bar, banner, sidebar, promo, cards
   Loaded only on /saelg/ shop front page
   ================================================================= */

/* ── Trust Bar ── */
.msf-trust-bar {
  background: var(--msf-bg, #fff);
  border-bottom: 1px solid var(--msf-border, #e5e7eb);
  padding: 10px 0;
  margin-bottom: 20px;
}
.msf-trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.msf-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--msf-text, #111827);
  white-space: nowrap;
}
.msf-trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--msf-primary, #2563eb);
  flex-shrink: 0;
}
.msf-trust-area {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.msf-trust-area .ms-trust-widget {
  display: inline-block;
}

/* ── Banner Area ── */
.msf-banner-area {
  margin-bottom: 24px;
}
.msf-banner-area .ms-banner-widget {
  margin-bottom: 12px;
}
.msf-banner-area .ms-banner-widget:last-child {
  margin-bottom: 0;
}
.msf-banner-area img {
  width: 100%;
  height: auto;
  border-radius: var(--msf-radius, 8px);
  display: block;
}
.msf-banner-area a {
  display: block;
  line-height: 0;
}
.msf-banner-area .ms-banner-widget img {
  aspect-ratio: 16/7;
  object-fit: cover;
}

/* ── Content Row (main + sidebar) ── */
.msf-content-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.msf-content-main {
  flex: 1;
  min-width: 0;
}

/* Widen wrapper when sidebar area is present */
.msf-content-row:has(.msf-sidebar-area) ~ .msf-content-main,
.msf-content-row:has(.msf-sidebar-area) {
  max-width: 100%;
}
.product-filter-wrapper:has(.msf-sidebar-area) {
  max-width: 1600px !important;
}

/* When sidebar has widgets, reduce grid columns */
.msf-content-row:has(.msf-sidebar-area .ms-sidebar-widget) .msf-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
@media (min-width: 1024px) {
  .msf-content-row:has(.msf-sidebar-area .ms-sidebar-widget) .msf-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ── Right Sidebar ── */
.msf-sidebar-area {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.msf-sidebar-area .ms-sidebar-widget {
  background: var(--msf-bg, #fff);
  border: 1px solid var(--msf-border, #e5e7eb);
  border-radius: var(--msf-radius, 8px);
  padding: 16px;
  text-align: center;
}
.msf-sidebar-area .ms-sidebar-widget img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin-bottom: 8px;
}
.msf-sidebar-area .ms-sidebar-widget a {
  display: block;
  line-height: 0;
}
.msf-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--msf-text, #111827);
}
.msf-sidebar-area .ms-sidebar-widget iframe,
.msf-sidebar-area .ms-sidebar-widget script {
  max-width: 100%;
}

/* ── Promotional Area ── */
.msf-promo-area {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--msf-border, #e5e7eb);
}
.msf-promo-area .ms-promo-widget {
  background: var(--msf-bg, #fff);
  border: 1px solid var(--msf-border, #e5e7eb);
  border-radius: var(--msf-radius-lg, 12px);
  padding: 24px;
  margin-bottom: 16px;
}
.msf-promo-area .ms-promo-widget img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.msf-promo-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--msf-text, #111827);
  text-align: center;
}

/* ── Enhanced Product Cards ── */
.msf-product-grid .msf-card {
  border: 1px solid var(--msf-border, #e5e7eb);
  border-radius: var(--msf-radius-lg, 12px);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  background: var(--msf-bg, #fff);
}
.msf-product-grid .msf-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.msf-product-grid .msf-card a {
  text-decoration: none;
  color: inherit;
}
.msf-card .msf-card-thumb {
  position: relative;
  background: #f9fafb;
}
.msf-card .msf-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.msf-card .msf-card-badge--instock {
  background: #dcfce7;
  color: #166534;
}
.msf-card .msf-card-badge--outofstock {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
  .msf-sidebar-area {
    width: 260px;
  }
}
@media (max-width: 1023px) {
  .msf-sidebar-area {
    display: none;
  }
  .msf-content-row {
    flex-direction: column;
  }
}
@media (max-width: 767px) {
  .msf-trust-items {
    gap: 16px;
    padding: 0 12px;
  }
  .msf-trust-item {
    font-size: 12px;
    gap: 6px;
  }
  .msf-trust-item svg {
    width: 16px;
    height: 16px;
  }
  .msf-banner-area .ms-banner-widget {
    margin-bottom: 8px;
  }
  .msf-promo-area .ms-promo-widget {
    padding: 16px;
  }
}
