.msn-product-search,
.msn-product-search-slot,
.msn-cart-link,
.msn-account-link,
.msn-product-whatsapp,
.msn-bridge-products,
.msn-bridge-product-card {
  box-sizing: border-box;
}

.msn-product-search-slot {
  width: 100%;
}

.msn-product-search,
.msn-product-search-slot .woocommerce-product-search {
  display: flex;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.msn-product-search__input,
.msn-product-search-slot input[type="search"],
.msn-product-search-slot .search-field {
  min-height: 44px;
  min-width: 0;
  flex: 1;
  border: 1px solid var(--msn-border, #e2e8f0);
  border-radius: var(--msn-radius, 8px);
  background: var(--msn-surface, #ffffff);
  color: var(--msn-text, #111827);
  padding: 0 14px;
}

.msn-product-search-slot .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.msn-product-search__button,
.msn-product-search-slot button,
.msn-product-search-slot input[type="submit"],
.msn-product-whatsapp {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--msn-primary, #0f3d5e);
  border-radius: var(--msn-radius, 8px);
  background: var(--msn-primary, #0f3d5e);
  color: #ffffff !important;
  padding: 10px 16px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.msn-cart-link,
.msn-account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--msn-primary, #0f3d5e);
  text-decoration: none;
}

.msn-cart-link__count,
.msn-cart-count {
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--msn-primary-soft, #eaf4ff);
  color: var(--msn-primary, #0f3d5e);
  font-size: 12px;
  font-weight: 850;
}

.msn-bridge-products {
  width: 100%;
}

.msn-bridge-products__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.msn-bridge-products__status {
  margin: 0;
  border: 1px solid var(--msn-border, #e2e8f0);
  border-radius: var(--msn-radius, 8px);
  background: var(--msn-surface, #ffffff);
  color: var(--msn-muted, #64748b);
  padding: 18px;
  font-weight: 750;
  text-align: center;
}

.msn-bridge-product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--msn-border, #e2e8f0);
  border-radius: var(--msn-radius, 8px);
  background: var(--msn-surface, #ffffff);
  box-shadow: var(--msn-shadow-card, 0 16px 38px rgba(15, 61, 94, 0.13));
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.msn-bridge-product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 3px;
  background: linear-gradient(90deg, #1e73be 0%, #0ea5e9 58%, #10b981 100%);
  opacity: 0.72;
}

.msn-bridge-product-card:hover {
  border-color: var(--msn-border-strong, #bfdbfe);
  box-shadow: var(--msn-shadow, 0 18px 45px rgba(15, 61, 94, 0.12));
  transform: translateY(-2px);
}

.msn-bridge-product-card__image-link {
  display: block;
  border-bottom: 1px solid var(--msn-border, #e2e8f0);
  background: linear-gradient(180deg, var(--msn-surface-alt, #f8fafc) 0%, var(--msn-bg-soft, #eef6fb) 100%);
}

.msn-bridge-product-card__image,
.msn-bridge-product-card .msn-product-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: clamp(12px, 2vw, 18px);
  transition: transform 180ms ease;
}

.msn-bridge-product-card:hover .msn-bridge-product-card__image,
.msn-bridge-product-card:hover .msn-product-card__image {
  transform: scale(1.025);
}

.msn-bridge-product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.msn-bridge-product-card__sku,
.msn-bridge-product-card__stock,
.msn-bridge-product-card .msn-product-card__sku,
.msn-bridge-product-card .msn-product-card__stock {
  display: inline-flex;
  color: var(--msn-muted, #64748b);
  font-size: 12px;
  font-weight: 750;
}

.msn-bridge-product-card__title,
.msn-bridge-product-card .msn-product-card__title {
  margin: 10px 0 0;
  color: var(--msn-primary, #0f3d5e);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
}

.msn-bridge-product-card__title a,
.msn-bridge-product-card .msn-product-card__title a {
  color: inherit;
  text-decoration: none;
}

.msn-bridge-product-card__price,
.msn-bridge-product-card .msn-product-card__price {
  margin: 12px 0 0;
  border-top: 1px solid var(--msn-border, #e2e8f0);
  color: var(--msn-primary, #082f49);
  padding-top: 12px;
  font-size: 1.12rem;
  font-weight: 900;
}

.msn-bridge-product-card__price ins,
.msn-bridge-product-card .msn-product-card__price ins {
  text-decoration: none;
}

.msn-bridge-product-card__price del,
.msn-bridge-product-card .msn-product-card__price del {
  display: block;
  color: var(--msn-muted, #64748b);
  font-size: 0.88rem;
  opacity: 0.78;
}

.msn-bridge-product-card__stock,
.msn-bridge-product-card .msn-product-card__stock {
  margin-top: 8px;
}

.msn-stock-instock {
  color: var(--msn-success, #10b981);
}

.msn-stock-outofstock {
  color: var(--msn-danger, #ef4444);
}

.msn-stock-onbackorder {
  color: var(--msn-warning, #f97316);
}

.msn-bridge-product-card__button,
.msn-bridge-product-card .msn-product-card__button {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border: 1px solid var(--msn-primary, #0f3d5e);
  border-radius: var(--msn-radius, 8px);
  background: var(--msn-primary, #0f3d5e);
  color: #ffffff !important;
  padding: 11px 14px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

.msn-bridge-product-card__button:hover,
.msn-bridge-product-card .msn-product-card__button:hover {
  background: var(--msn-primary-dark, #082f49);
  border-color: var(--msn-primary-dark, #082f49);
}

.msn-bridge-product-card__button--requires_options,
.msn-bridge-product-card__button--requires-options,
.msn-bridge-product-card .msn-product-card__button--requires_options,
.msn-bridge-product-card .msn-product-card__button--requires-options {
  background: var(--msn-primary-soft, #eaf4ff);
  border-color: var(--msn-border-strong, #bfdbfe);
  color: var(--msn-primary, #0f3d5e) !important;
}

@media (max-width: 1024px) {
  .msn-bridge-products__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .msn-product-search,
  .msn-product-search-slot .woocommerce-product-search {
    flex-direction: column;
  }

  .msn-bridge-products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .msn-bridge-product-card__body {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .msn-bridge-products__grid {
    grid-template-columns: 1fr;
  }
}
