/* Mashfa layout fixes — loaded after mashfa-app.css */

#mashfa-storefront.mashfa-theme .mashfa-partner-chip img,
#mashfa-storefront.mashfa-theme .mashfa-partner-chip-logo {
  display: inline-block !important;
  width: auto !important;
  max-width: 120px !important;
  max-height: 32px !important;
  object-fit: contain;
}

#mashfa-storefront.mashfa-theme .mashfa-partners-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  overflow-x: auto;
  background: #fff;
  border-radius: var(--mashfa-radius, 22px);
  padding: 1.1rem 1.35rem;
  box-shadow: var(--mashfa-shadow, 0 14px 40px rgba(15, 23, 42, 0.08));
}

#mashfa-storefront.mashfa-theme .mashfa-partners-bar .mashfa-partner-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

#mashfa-storefront.mashfa-theme .mashfa-partner-chips {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.85rem;
  overflow-x: auto;
}

@media (min-width: 1024px) {
  #mashfa-storefront.mashfa-theme .mashfa-offers-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  #mashfa-storefront.mashfa-theme .mashfa-spec-scroll {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.1rem;
    overflow: visible;
    scroll-snap-type: none;
  }

  #mashfa-storefront.mashfa-theme .mashfa-spec-scroll .mashfa-spec-card {
    flex: unset;
    width: 100%;
  }
}

@media (min-width: 900px) {
  #mashfa-storefront.mashfa-theme .mashfa-promo-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    background: #fff;
    border-radius: var(--mashfa-radius, 22px);
    box-shadow: var(--mashfa-shadow, 0 14px 40px rgba(15, 23, 42, 0.08));
    overflow: hidden;
  }

  #mashfa-storefront.mashfa-theme .mashfa-promo-media img {
    min-height: 100%;
    height: 100%;
    max-height: 320px;
  }
}

#mashfa-storefront.mashfa-theme .mashfa-doctor-name {
  color: var(--mashfa-dark, #1e293b);
}

#mashfa-storefront.mashfa-theme .mashfa-doctor-card .mashfa-btn {
  margin-top: 0.35rem;
}

#mashfa-storefront.mashfa-theme button.mashfa-btn {
  appearance: none;
  background: var(--mashfa-primary, #6d2e70);
  color: #fff;
}

#mashfa-storefront.mashfa-theme .mashfa-doctors-grid,
#mashfa-storefront.mashfa-theme .mashfa-doctors-scroll {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  overflow: visible;
  width: 100%;
  max-width: none !important;
  margin-inline: 0 !important;
}

@media (min-width: 640px) {
  #mashfa-storefront.mashfa-theme .mashfa-doctors-grid,
  #mashfa-storefront.mashfa-theme .mashfa-doctors-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #mashfa-storefront.mashfa-theme .mashfa-doctors-grid,
  #mashfa-storefront.mashfa-theme .mashfa-doctors-scroll {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

#mashfa-storefront.mashfa-theme .mashfa-doctor-card {
  min-width: 0;
  flex: unset;
}

#mashfa-storefront.mashfa-theme .mashfa-doctor-card-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-bottom: 0.75rem;
}

#mashfa-storefront.mashfa-theme .mashfa-doctor-card--has-vcard {
  cursor: pointer;
}

#mashfa-storefront.mashfa-theme .mashfa-partner-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

#mashfa-storefront.mashfa-theme .mashfa-partner-logo {
  width: 9rem;
  height: 9rem;
  object-fit: contain;
  opacity: 0.8;
  filter: grayscale(1);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

#mashfa-storefront.mashfa-theme .mashfa-partner-logos a:hover .mashfa-partner-logo,
#mashfa-storefront.mashfa-theme .mashfa-partner-logo:hover {
  opacity: 1;
  filter: grayscale(0);
}

#mashfa-storefront.mashfa-theme .mashfa-partner-logo-label {
  font-weight: 700;
  color: var(--mashfa-dark, #1e293b);
}

@media (max-width: 640px) {
  #mashfa-storefront.mashfa-theme .mashfa-partner-logo {
    width: 7rem;
    height: 7rem;
  }
}
