:root {
  --md-store-blue: #306ed5;
  --md-store-blue-deep: #123f82;
  --md-store-ink: #10233f;
  --md-store-pale: #eef6ff;
  --md-store-line: #cbdcf3;
}

.md-store-directory,
.md-company-branches,
.md-assigned-store {
  color: var(--md-store-ink);
}

.md-store-directory {
  background-color: #fff !important;
}

.md-store-directory__layout {
  align-items: start;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.md-store-directory__main {
  color: #000;
  min-width: 0;
}

.md-store-directory__lead {
  color: #000;
  font-size: 16px;
  line-height: 1.9;
  margin: 24px 0 0;
}

.md-store-directory__groups {
  display: grid;
  gap: 54px;
  margin-top: 48px;
}

.md-store-group__title {
  border-bottom: 1px solid #b9cee8;
  color: #000;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.45;
  margin: 0 0 22px;
  padding: 0 0 13px 18px;
  position: relative;
}

.md-store-group__title::before {
  background: var(--md-store-blue);
  bottom: 13px;
  content: "";
  left: 0;
  position: absolute;
  top: 2px;
  width: 5px;
}

.md-store-group__cards {
  display: grid;
  gap: 22px;
}

.md-store-card {
  background: #fff;
  border: 1px solid #d5e0ec;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}

.md-store-card__media {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #eef2f6;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  max-width: 100%;
  min-height: 100%;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.md-store-card__image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.md-store-card__media--placeholder {
  background:
    linear-gradient(135deg, rgba(48, 110, 213, 0.035) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(315deg, rgba(48, 110, 213, 0.035) 25%, transparent 25%) 0 0 / 24px 24px,
    #eef2f6;
  color: #778698;
}

.md-store-card__media--placeholder span {
  border: 1px solid #c9d3de;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 14px;
}

.md-store-card__body {
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 28px 30px 30px;
}

.md-store-card__kicker {
  color: var(--md-store-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin: 0;
}

.md-store-card__name {
  color: #000;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.45;
  margin: 7px 0 0;
}

.md-store-card__company {
  color: #000;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.65;
  margin: 13px 0 0;
}

.md-store-card__address,
.md-store-card__phone,
.md-store-card__description {
  color: #000;
  font-size: 14px;
  line-height: 1.75;
  margin: 13px 0 0;
  overflow-wrap: anywhere;
}

.md-store-card__address span,
.md-store-card__phone span {
  color: #000;
  display: inline-block;
  font-weight: 900;
  margin-right: 10px;
}

.md-store-card__phone {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.md-store-card__phone a {
  color: var(--md-store-blue-deep);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.md-store-card__phone a:hover,
.md-store-card__phone a:focus-visible {
  color: var(--md-store-blue);
  text-decoration: underline;
}

.md-store-card__phone a:focus-visible {
  outline: 2px solid var(--md-store-blue);
  outline-offset: 3px;
}

.md-store-card__description {
  border-top: 1px solid #e4ebf2;
  margin-top: 18px;
  padding-top: 15px;
}

.md-store-directory__sidebar {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.md-store-directory__sidebar .md-sidebar-extra {
  gap: 22px;
}

.md-assigned-store {
  background: #f7fbff;
  padding: 24px 0 64px;
}

.md-assigned-store__card {
  background: #fff;
  border: 1px solid var(--md-store-line);
  border-left: 6px solid var(--md-store-blue);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(21, 61, 113, 0.1);
  padding: 26px 30px;
}

.md-assigned-store__eyebrow {
  color: var(--md-store-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
}

.md-assigned-store h2 {
  color: var(--md-store-ink);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.4;
  margin: 0;
}

.md-assigned-store__company,
.md-assigned-store__meta {
  color: #3e526b;
  line-height: 1.7;
  margin: 8px 0 0;
}

.md-assigned-store__phone {
  align-items: baseline;
  display: flex;
  gap: 16px;
  margin: 14px 0 0;
}

.md-assigned-store__phone span {
  font-size: 13px;
  font-weight: 800;
}

.md-assigned-store__phone a {
  color: var(--md-store-blue-deep);
  font-size: 22px;
  font-weight: 900;
}

@media (max-width: 1023px) {
  .md-store-directory__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .md-store-directory__sidebar {
    display: none;
  }
}

@media (max-width: 767px) {
  .md-store-directory__lead {
    font-size: 15px;
    line-height: 1.85;
    margin-top: 18px;
  }

  .md-store-directory__groups {
    gap: 42px;
    margin-top: 36px;
  }

  .md-store-group__title {
    font-size: 23px;
    margin-bottom: 18px;
    padding-bottom: 11px;
  }

  .md-store-group__title::before {
    bottom: 11px;
  }

  .md-store-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .md-store-card__media {
    min-height: 0;
  }

  .md-store-card__body {
    padding: 24px 21px 26px;
  }

  .md-store-card__name {
    font-size: 23px;
  }

  .md-store-card__phone {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .md-store-card__phone a {
    font-size: 22px;
  }

  .md-assigned-store__card {
    padding: 22px 20px;
  }

  .md-assigned-store h2 {
    font-size: 24px;
  }

  .md-assigned-store__phone {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}
