/* Content pages */
.page {
  padding-bottom: 48px;
}

.page__title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.page__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 800px;
}

.page__text p {
  margin-bottom: 16px;
  line-height: 1.65;
}

.page__text p:last-child {
  margin-bottom: 0;
}

.page__text h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 16px;
}

.page__text ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.page__text li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.page__text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.page__text a:hover {
  text-decoration: none;
}

/* Hero image */
.page-hero {
  margin: 0 0 32px;
  padding: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #f0f2f5 0%, #e8eaed 100%);
  text-align: center;
}

.page-hero img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

.page-hero--contain img {
  object-fit: contain;
}

.page-grid__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: linear-gradient(135deg, #f0f2f5 0%, #e8eaed 100%);
  padding: 16px;
  text-align: center;
}

.page-grid__image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

.page-grid__image--brands {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 24px;
  background: var(--color-bg-muted);
}

.page-grid__image--brands img {
  height: auto;
  max-height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Two-column layout */
.page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.page-grid--reverse .page-grid__image {
  order: 2;
}

/* Feature cards */
.page-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}

.page-feature {
  padding: 24px 20px;
  background: var(--color-bg-muted);
  border-radius: var(--radius);
  text-align: center;
}

.page-feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--color-white);
  border-radius: 50%;
  color: var(--color-primary);
}

.page-feature__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-feature__text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Services list */
.page-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.page-service-card {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.page-service-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

.page-service-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-service-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Stats */
.page-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}

.page-stat {
  padding: 24px;
  background: var(--color-footer);
  color: var(--color-white);
  border-radius: var(--radius);
  text-align: center;
}

.page-stat__value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.page-stat__label {
  font-size: 13px;
  opacity: 0.85;
}

/* Brands */
.page-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.page-brand {
  padding: 10px 18px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 48px;
}

.brands-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.brands-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--color-primary);
  text-decoration: none;
  color: inherit;
}

.brands-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
}

.brands-card__image img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brands-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-bg-muted);
  color: var(--color-primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.brands-card__name {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

.brand-page__hero {
  margin-bottom: 24px;
}

.brand-page__hero img {
  max-height: 120px;
}

.brand-page__products {
  margin: 0 0 40px;
  padding-bottom: 8px;
}

.brand-page__description {
  margin: 0 0 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.brand-page__back {
  margin-bottom: 48px;
}

.brand-page__back a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.brand-page__back a:hover {
  text-decoration: underline;
}

@media (max-width: 1023px) {
  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .brands-card {
    padding: 20px 12px;
    gap: 12px;
  }

  .brands-card__name {
    font-size: 13px;
  }
}

/* Delivery blocks */
.page-delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.page-delivery-block {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.page-delivery-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-delivery-block h2 svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.page-delivery-block ul {
  list-style: none;
  padding: 0;
}

.page-delivery-block li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.page-delivery-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Contacts */
.page-contacts-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  margin-top: 8px;
}

.page-contacts-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-contact-card {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.page-contact-card h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.page-contact-person {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.page-contact-person:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.page-contact-person__name {
  font-weight: 600;
  margin-bottom: 6px;
}

.page-contact-person p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.page-contact-person a {
  color: var(--color-text);
}

.page-contact-person a:hover {
  color: var(--color-primary);
}

.page-contacts-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-contacts-address {
  padding: 24px;
  background: var(--color-bg-muted);
  border-radius: var(--radius);
}

.page-contacts-address h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-contacts-address p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.page-contacts-address a {
  color: var(--color-primary);
  font-weight: 600;
}

.page-contacts-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  line-height: 0;
}

.page-contacts-map iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

.page-contacts-schedule {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.page-contacts-schedule h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-contacts-schedule p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* CTA block on page */
.page-cta {
  margin-top: 40px;
  padding: 32px;
  background: var(--color-bg-muted);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-cta__text {
  flex: 1;
  min-width: 200px;
}

.page-cta__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-cta__desc {
  font-size: 14px;
  color: var(--color-text-muted);
}

@media (max-width: 1023px) {
  .page-features,
  .page-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-services {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-contacts-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .page__title {
    font-size: 26px;
  }

  .page-grid,
  .page-delivery-grid {
    grid-template-columns: 1fr;
  }

  .page-grid--reverse .page-grid__image {
    order: 0;
  }

  .page-features,
  .page-stats,
  .page-services {
    grid-template-columns: 1fr;
  }

  .page-hero {
    margin: 0 0 24px;
  }

  .page-hero img {
    max-height: 200px;
  }

  .page-grid__image img {
    max-height: 200px;
  }

  .page-cta {
    flex-direction: column;
    text-align: center;
  }

  .page-cta .btn {
    width: 100%;
  }
}

/* 404 page */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0 64px;
  min-height: 360px;
}

.error-page__code {
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.error-page__title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-page__text {
  font-size: 16px;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 767px) {
  .error-page {
    padding: 32px 0 48px;
    min-height: 280px;
  }

  .error-page__code {
    font-size: 80px;
  }

  .error-page__title {
    font-size: 22px;
  }

  .error-page__actions {
    flex-direction: column;
    width: 100%;
  }

  .error-page__actions .btn {
    width: 100%;
  }
}
