/* Append to the Vesta global library after style.css.
 * Matches the Drupal field wrapper, then the CKEditor content div containing
 * h2, p, div(h3, div, ...), div(p, p).
 * No content classes, HTML rewrite, JavaScript or external assets are required.
 */
#block-vesta-theme-populyarnyematerialyiceny,
#block-vesta-theme-populyarnyematerialyiceny * {
  box-sizing: border-box;
}

#block-vesta-theme-populyarnyematerialyiceny {
  margin: 48px 0;
  padding: 44px 24px;
  background: #f7f4ef;
  color: #2f1b0d;
}

#block-vesta-theme-populyarnyematerialyiceny > div {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > h2 {
  margin: 0 0 12px;
  color: #2f1b0d;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > p {
  max-width: 720px;
  margin: 0 auto 28px;
  color: #645346;
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
}

/* Column flow places each existing h3/price-div pair in one visual card. */
#block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto;
  grid-auto-flow: column;
  gap: 0 16px;
  margin: 0;
  padding: 0;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type > h3,
#block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type > div {
  min-width: 0;
  margin: 0;
  border: 1px solid #e5d8c5;
  background: #fff;
  overflow-wrap: anywhere;
  text-align: left;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type > h3 {
  padding: 24px 20px 16px;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  color: #2f1b0d;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type > div {
  padding: 0 20px 24px;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  color: #925b00;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type strong {
  color: inherit;
  font: inherit;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > div:last-of-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 28px;
}

#block-vesta-theme-populyarnyematerialyiceny > div > div > div:last-of-type > p {
  min-width: 0;
  margin: 0;
  color: #645346;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

#block-vesta-theme-populyarnyematerialyiceny a[href="/prices"] {
  display: inline-flex;
  max-width: 100%;
  min-height: 48px;
  padding: 12px 26px;
  border: 2px solid transparent;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  background: #f5a800;
  color: #2f1b0d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

#block-vesta-theme-populyarnyematerialyiceny a[href="/prices"]:hover {
  background: #ffba24;
  color: #2f1b0d;
  text-decoration: none;
}

#block-vesta-theme-populyarnyematerialyiceny a[href="/prices"]:focus {
  outline: 3px solid #2f1b0d;
  outline-offset: 3px;
}

#block-vesta-theme-populyarnyematerialyiceny a[href="/prices"] strong {
  color: inherit;
  font: inherit;
}

@media (max-width: 767px) {
  #block-vesta-theme-populyarnyematerialyiceny {
    margin: 32px 0;
    padding: 32px 16px;
  }

  #block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  #block-vesta-theme-populyarnyematerialyiceny > div > div > div:first-of-type > h3:not(:first-child) {
    margin-top: 16px;
  }

  #block-vesta-theme-populyarnyematerialyiceny > div > div > div:last-of-type > p {
    width: 100%;
  }

  #block-vesta-theme-populyarnyematerialyiceny a[href="/prices"] {
    width: 100%;
  }
}

/* Home delivery geography: larger copy requested by the client. */
#block-vesta-theme-geografiyadostavkinaglavnoy .field--name-body > h2 {
  font-size: clamp(34px, 3vw, 40px);
  line-height: 1.2;
}

#block-vesta-theme-geografiyadostavkinaglavnoy .field--name-body > p {
  font-size: 19px;
  line-height: 1.6;
}

#block-vesta-theme-geografiyadostavkinaglavnoy .field--name-body > p > a {
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 767px) {
  #block-vesta-theme-geografiyadostavkinaglavnoy .field--name-body > h2 {
    font-size: 30px;
  }

  #block-vesta-theme-geografiyadostavkinaglavnoy .field--name-body > p {
    font-size: 18px;
    line-height: 1.55;
  }
}

/* Prices page (node 822): append after the home block repair.
 * Styles only the existing article body; table values and markup stay intact.
 */
article[data-history-node-id="822"] > .node__content > .field--name-body,
article[data-history-node-id="822"] > .node__content > .field--name-body * {
  box-sizing: border-box;
}

article[data-history-node-id="822"] > .node__content > .field--name-body {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 0 36px;
  color: #2f1b0d;
  font-size: 17px;
  line-height: 1.55;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > h2 {
  margin: 36px 0 16px;
  color: #2f1b0d;
  font-size: clamp(24px, 2.5vw, 30px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > h2:first-child {
  margin-top: 0;
  font-size: clamp(28px, 3.5vw, 38px);
}

article[data-history-node-id="822"] > .node__content > .field--name-body > blockquote {
  margin: 24px 0 32px;
  padding: 18px 22px;
  border: 0;
  border-left: 4px solid #f5a800;
  border-radius: 0 10px 10px 0;
  background: #f7f4ef;
  color: #645346;
  font-size: 16px;
  font-style: normal;
  line-height: 1.55;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > blockquote p {
  margin: 0;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table {
  display: table;
  width: 100%;
  max-width: 100%;
  margin: 0 0 32px;
  border: 1px solid #e5d8c5;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  background: #fff;
  color: #2f1b0d;
  table-layout: auto;
  font-size: 16px;
  line-height: 1.45;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table th,
article[data-history-node-id="822"] > .node__content > .field--name-body > table td {
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid #eadfce;
  vertical-align: middle;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table thead th {
  background: #eee5d8;
  color: #2f1b0d;
  font-weight: 700;
  text-align: left;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table thead th:first-child {
  border-top-left-radius: 9px;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table thead th:last-child {
  border-top-right-radius: 9px;
  text-align: right;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table tbody tr:nth-child(even) {
  background: #fcfaf7;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table tbody tr:last-child td {
  border-bottom: 0;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table th:first-child,
article[data-history-node-id="822"] > .node__content > .field--name-body > table td:first-child {
  white-space: normal;
  overflow-wrap: anywhere;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table th:last-child,
article[data-history-node-id="822"] > .node__content > .field--name-body > table td:last-child {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table td:last-child {
  color: #754800;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > table p {
  margin: 0;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > hr {
  height: 0;
  margin: 40px 0 28px;
  border: 0;
  border-top: 1px solid #e5d8c5;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > p {
  margin: 0 0 18px;
  color: #645346;
}

/* The existing separator dot has no role once the links become buttons. */
article[data-history-node-id="822"] > .node__content > .field--name-body > p:last-child {
  display: block;
  margin: 24px 0 0;
  font-size: 0;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/form/callback"],
article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/catalog"] {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  margin: 0 12px 12px 0;
  padding: 12px 22px;
  border: 2px solid #f5a800;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  background: #f5a800;
  color: #2f1b0d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/catalog"] {
  border-color: #cbbba4;
  background: #fff;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/form/callback"]:hover {
  border-color: #ffba24;
  background: #ffba24;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/catalog"]:hover {
  background: #f7f4ef;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/form/callback"]:focus,
article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/catalog"]:focus {
  outline: 3px solid #2f1b0d;
  outline-offset: 3px;
}

article[data-history-node-id="822"] > .node__content > .field--name-body > p > a strong {
  color: inherit;
  font: inherit;
}

@media (max-width: 767px) {
  article[data-history-node-id="822"] > .node__content > .field--name-body {
    font-size: 16px;
  }

  article[data-history-node-id="822"] > .node__content > .field--name-body > blockquote {
    padding: 16px;
  }

  article[data-history-node-id="822"] > .node__content > .field--name-body > table th,
  article[data-history-node-id="822"] > .node__content > .field--name-body > table td {
    padding: 12px 10px;
  }

  article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/form/callback"],
  article[data-history-node-id="822"] > .node__content > .field--name-body > p > a[href="/catalog"] {
    width: 100%;
    margin-right: 0;
  }
}
