/* Inner pages */
.page-hero {
  padding: 32px 0 0;
}

.page-hero--compact {
  padding-bottom: 8px;
}

.page-hero__title {
  margin-bottom: 12px;
}

.page-hero__lead {
  max-width: 720px;
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
}

.page-content {
  padding: 40px 0 64px;
}

.page-content__body {
  max-width: 820px;
}

.page-content__body h2,
.page-content__body h3 {
  margin: 28px 0 12px;
}

.page-content__body p,
.page-content__body ul,
.page-content__body ol {
  margin: 0 0 16px;
  color: var(--color-text-secondary);
}

.page-content__body ul,
.page-content__body ol {
  padding-left: 20px;
}

.page-content__body li + li {
  margin-top: 8px;
}

.page-content__body a {
  color: var(--color-wood);
  text-decoration: underline;
}

.page-content__body--legal h2:first-child {
  margin-top: 0;
}

.legal-document em {
  color: var(--color-text-secondary);
}

/* Info cards grid */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.info-card {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.info-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-soft);
  color: var(--color-wood);
}

.info-card__title {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.info-card__text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

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

.step-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
}

.step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--color-cta);
  color: #fff;
  font-size: var(--font-size-small);
  font-weight: 700;
}

.step-card__title {
  margin-bottom: 6px;
  font-weight: 600;
}

.step-card__text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

/* Contacts */
.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.contact-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-soft);
  color: var(--color-wood);
  flex-shrink: 0;
}

.contact-item__label {
  margin-bottom: 4px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.contact-item__value {
  font-weight: 600;
}

.contact-item__value a:hover {
  color: var(--color-wood);
}

.contact-item--social .contact-item__social {
  margin-top: 2px;
}

.contact-item--social .social-links__item:hover {
  color: var(--color-wood);
  border-color: var(--color-wood);
}

.contacts-map {
  min-height: 360px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(145deg, #eceae6, #d8d2c8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  overflow: hidden;
}

.contacts-map-section {
  margin-top: 40px;
}

.contacts-map-section .contacts-map {
  min-height: 420px;
}

.contacts-map--embed {
  display: block;
  padding: 16px;
  background: var(--color-bg-gray);
}

.contacts-map--embed iframe,
.contacts-map--embed > div[id^='dg-widget'] {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-height: 420px;
  border: 0;
}

.contacts-map--embed .dg-widget-link {
  margin: 0 0 8px;
  font-size: var(--font-size-small);
}

.contacts-map--embed .dg-widget-link a {
  color: var(--color-wood);
  text-decoration: underline;
}

.contacts-map--embed .dg-widget-link a:hover {
  color: var(--color-text);
}

.contact-form {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.contact-form__title {
  margin-bottom: 8px;
}

.contact-form__text {
  margin-bottom: 20px;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form__grid .field--full {
  grid-column: 1 / -1;
}

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

.stat-card {
  padding: 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
}

.stat-card__value {
  margin-bottom: 6px;
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--color-cta);
}

.stat-card__label {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.about-feature {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.about-feature__title {
  margin-bottom: 8px;
}

.about-feature__text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

/* Promotions */
.promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
}

.promo-banner__text {
  color: var(--color-text-secondary);
  max-width: 560px;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.promo-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.promo-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

.promo-card__body {
  padding: 20px;
}

.promo-card__badge {
  margin-bottom: 10px;
}

.promo-card__title {
  margin-bottom: 8px;
}

.promo-card__text {
  margin-bottom: 14px;
  font-size: var(--font-size-body);
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.promo-card__text p,
.promo-card__text ul,
.promo-card__text ol {
  margin: 0 0 10px;
}

.promo-card__text p:last-child,
.promo-card__text ul:last-child,
.promo-card__text ol:last-child {
  margin-bottom: 0;
}

.promo-card__text ul,
.promo-card__text ol {
  padding-left: 18px;
  list-style-position: outside;
}

.promo-card__text ul {
  list-style-type: disc;
}

.promo-card__text ol {
  list-style-type: decimal;
}

.promo-card__text li {
  display: list-item;
}

.promo-card__text li + li {
  margin-top: 4px;
}

.promo-card__text strong {
  color: var(--color-text);
  font-weight: 600;
}

.promo-card__text a {
  color: var(--color-wood);
  text-decoration: underline;
}

/* Policy blocks */
.policy-block {
  padding: 24px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
}

.policy-block__title {
  margin-bottom: 8px;
}

.policy-block__text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Door installation */
.page-content__body--wide {
  max-width: none;
  margin-bottom: 32px;
}

.service-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.service-highlight {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.service-highlight__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-soft);
  color: var(--color-wood);
}

.service-highlight__title {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.service-highlight__text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.price-section {
  margin: 40px 0;
}

.price-section__title {
  margin-bottom: 16px;
}

.price-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}

.price-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--font-size-small);
}

.price-table th,
.price-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.price-table th {
  background: var(--color-bg-soft);
  font-weight: 600;
}

.price-table tbody tr:last-child td {
  border-bottom: 0;
}

.price-table td:first-child {
  width: 56px;
  white-space: nowrap;
  color: var(--color-text-muted);
}

.price-table td:last-child {
  width: 140px;
  white-space: nowrap;
  font-weight: 600;
}

.price-section__note,
.price-section__footnote {
  margin-top: 12px;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

.price-section__footnote {
  color: var(--color-text-muted);
}

.content-section {
  margin-bottom: 28px;
}

.content-section__title {
  margin-bottom: 10px;
}

.content-section__text {
  margin-bottom: 12px;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.content-section__list {
  margin: 0;
  padding-left: 20px;
  color: var(--color-text-secondary);
}

.content-section__list li + li {
  margin-top: 8px;
}

.service-cta {
  margin-top: 40px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  overflow: hidden;
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: var(--color-wood);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item__answer {
  padding: 0 20px 18px;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.faq-item__answer p {
  margin: 0 0 12px;
}

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

/* Favorites */
.favorites-empty {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.favorites-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  color: var(--color-wood);
}

.favorites-empty p {
  margin-bottom: 20px;
  color: var(--color-text-secondary);
}

.favorites-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.favorites-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.favorites-toast__text {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
}

.favorites-toast__link {
  margin-left: auto;
  color: var(--color-wood);
  font-size: var(--font-size-small);
  font-weight: 600;
  white-space: nowrap;
}

.favorites-toast__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  line-height: 1;
}

.favorites-toast__close:hover {
  background: var(--color-bg-soft);
}

.woocommerce-account .woocommerce-MyAccount-content .favorites-page {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .info-cards,
  .promo-grid,
  .service-highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps,
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .contacts-layout,
  .about-features,
  .contact-form__grid {
    grid-template-columns: 1fr;
  }

  .info-cards,
  .promo-grid,
  .service-highlights,
  .steps,
  .about-stats {
    grid-template-columns: 1fr;
  }

  .price-table {
    min-width: 0;
  }

  .price-table thead {
    display: none;
  }

  .price-table tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .price-table tr:last-child {
    border-bottom: 0;
  }

  .price-table td {
    display: block;
    width: auto;
    padding: 4px 16px;
    border: 0;
  }

  .price-table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--color-text-muted);
  }

  .price-table td:first-child::before {
    content: "";
  }

  .promo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Search results */
.page-search .search-results__header {
  margin-bottom: 8px;
}

.page-search .search-results__query {
  color: var(--color-wood);
}

.page-search .search-results {
  margin-top: 8px;
}

.page-search .search-results-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-top: 24px;
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}

.page-search .search-results-empty__text {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.page-search .pagination,
.page-search .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.page-search .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  text-decoration: none;
}

.page-search .page-numbers.current {
  border-color: var(--color-text);
  background: var(--color-text);
  color: #fff;
}

.page-search .page-numbers:hover {
  border-color: var(--color-wood);
  color: var(--color-wood);
}
