@media (max-width: 699px) {
  html[data-molisan-owner-home] #main.editorial-home > .editorial-collections {
    padding-top: 20px;
  }
}

@layer molisan-preview-product {
  @media (max-width: 800px) {
    html[data-molisan-owner-skin][data-molisan-v2] #main .preview-v2-product > .mol-product-caption,
    html[data-molisan-owner-skin][data-molisan-v2] #main .preview-v2-product:not(:has(> .mol-product-caption)) > .owner-product-copy {
      padding-top: 12px !important;
    }
    html[data-molisan-owner-skin][data-molisan-v2] #main .preview-v2-product :is(.mol-product-caption, .owner-product-copy) > h1 {
      margin-top: 0 !important;
    }
  }
}

@layer molisan-preview-chrome {
  @media (max-width: 767px) {
    html:lang(ru) body footer.site-footer.footer-refresh--light {
      --footer-mobile-margin: clamp(16px, 6vw, 24px);
      --footer-mobile-ink: #1e4538;
      --footer-mobile-muted: #5a6853;
      --footer-mobile-line: #d6ddce;
      --footer-mobile-accent: #a84225;
      box-sizing: border-box;
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: start;
      column-gap: 12px !important;
      padding: 27px max(var(--footer-mobile-margin), env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(var(--footer-mobile-margin), env(safe-area-inset-left)) !important;
      background: #f0f1e9 !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light > .footer-refresh-inner,
    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-utility {
      display: contents !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-content {
      grid-column: 1 / -1;
      grid-row: 1;
      display: grid !important;
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "brand" "links" "contact";
      align-items: stretch !important;
      gap: 20px !important;
      padding: 0 !important;
      margin: 0 0 21px !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-brand {
      grid-area: brand;
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center !important;
      gap: 15px 12px !important;
      margin: 0 !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light a.footer-refresh-logo {
      width: min(100%, 126px) !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-logo img {
      display: block;
      width: 100% !important;
      height: auto !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-languages {
      display: inline-grid !important;
      grid-template-columns: repeat(3, minmax(40px, 1fr));
      gap: 0 !important;
      padding: 3px !important;
      border: 0 !important;
      border-radius: 12px;
      background: #e1e7d9 !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-languages a[href] {
      box-sizing: border-box;
      display: grid !important;
      place-items: center;
      min-height: 42px !important;
      min-width: 0 !important;
      padding: 0 6px !important;
      border-radius: 9px !important;
      color: var(--footer-mobile-muted) !important;
      font: 700 12px/1.2 system-ui, sans-serif !important;
      text-decoration: none !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-languages a[aria-current="page"] {
      color: var(--footer-mobile-ink) !important;
      background: #fff !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light :is(.preview-exact-footer-tagline, .footer-refresh-tagline) {
      grid-column: 1 / -1;
      width: min(100%, 28ch);
      margin: 0 !important;
      color: var(--footer-mobile-muted) !important;
      font: 400 14px/1.5 system-ui, sans-serif !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-nav {
      grid-area: links;
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: start !important;
      gap: 0 18px !important;
      margin: 0 !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-nav ul {
      display: flex !important;
      flex-direction: column;
      flex-wrap: nowrap;
      align-items: stretch !important;
      gap: 0 !important;
      padding: 0 !important;
      margin: 0 !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-nav li:has(> a[href="/ru/about/"]) {
      order: -1;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-nav a[href] {
      display: flex !important;
      align-items: center !important;
      gap: 7px;
      min-height: 42px !important;
      padding: 0 !important;
      overflow-wrap: anywhere;
      color: var(--footer-mobile-ink) !important;
      font: 500 15px/1.35 system-ui, sans-serif !important;
      text-decoration: none !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-nav a[href="/ru/offers/"] {
      color: var(--footer-mobile-accent) !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-nav a[href="/ru/offers/"]::after {
      content: "↗" / "";
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light a.footer-refresh-action {
      grid-area: contact;
      box-sizing: border-box;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-start !important;
      gap: 11px !important;
      width: 100% !important;
      min-height: 51px !important;
      padding: 9px 14px !important;
      border: 1px solid var(--footer-mobile-line) !important;
      border-radius: 12px;
      color: var(--footer-mobile-ink) !important;
      background: #f7f9f3 !important;
      font: 700 15px/1.3 system-ui, sans-serif !important;
      text-decoration: none !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light a.footer-refresh-action::before {
      content: "";
      flex: 0 0 18px;
      height: 18px;
      background: currentColor;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 11a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v8l3-3z'/%3E%3Cpath d='M9 14v1a2 2 0 0 0 2 2h6l4 3v-9a2 2 0 0 0-2-2'/%3E%3C/svg%3E") center / contain no-repeat;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 11a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v8l3-3z'/%3E%3Cpath d='M9 14v1a2 2 0 0 0 2 2h6l4 3v-9a2 2 0 0 0-2-2'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light a.footer-refresh-action > span[aria-hidden="true"] {
      margin-inline-start: auto;
      color: var(--footer-mobile-muted);
      font-size: 19px;
      line-height: 1;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light::after {
      content: "";
      display: block;
      grid-column: 1 / -1;
      grid-row: 2;
      align-self: start;
      border-top: 1px solid var(--footer-mobile-line);
      pointer-events: none;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-utility > nav,
    html:lang(ru) body footer.site-footer.footer-refresh--light > button.privacy-settings-trigger {
      grid-row: 2;
      align-self: end;
      min-width: 0 !important;
      min-height: 44px !important;
      margin: 9px 0 0 !important;
      padding: 0 !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-utility > nav {
      grid-column: 1;
      display: flex;
      align-items: center;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light > button.privacy-settings-trigger {
      grid-column: 2;
      position: static !important;
      width: auto !important;
      justify-self: end;
      border: 0 !important;
      background: transparent !important;
      text-align: end;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-utility a[href],
    html:lang(ru) body footer.site-footer.footer-refresh--light > button.privacy-settings-trigger {
      color: var(--footer-mobile-muted) !important;
      font: 400 12px/1.45 system-ui, sans-serif !important;
      text-decoration: none !important;
      overflow-wrap: anywhere;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light .footer-refresh-utility > p {
      grid-column: 1 / -1;
      grid-row: 3;
      margin: 5px 0 0 !important;
      color: var(--footer-mobile-muted) !important;
      font: 400 11px/1.4 system-ui, sans-serif !important;
    }

    html:lang(ru) body footer.site-footer.footer-refresh--light :is(.footer-refresh-nav a, .footer-refresh-utility a, button.privacy-settings-trigger):is(:hover, :focus-visible) {
      text-decoration: underline !important;
      text-underline-offset: 3px;
    }
  }
}

@layer molisan-compact-shop {
  @media (max-width: 767px) {
    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] {
      grid-template-columns: minmax(0, 1fr) auto !important;
      grid-template-rows: auto minmax(46px, auto) auto !important;
      column-gap: 14px !important;
      row-gap: 7px !important;
      align-items: center;
      margin-block-start: 12px !important;
      padding-block-start: 14px;
      border-block-start: 1px solid #e0e5d9;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] > .catalog-purchase-caption {
      display: block !important;
      grid-area: 1 / 1;
      color: #616f60;
      font-size: 13px;
      line-height: 1.25;
      text-align: start;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] > :is(.catalog-purchase-pack, [data-compact-pack-select]) {
      grid-area: 2 / 1 !important;
      box-sizing: border-box;
      align-self: stretch;
      width: 100%;
      max-width: 200px;
      min-width: 0;
      min-height: 46px;
      height: 100%;
      margin: 0 !important;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] > .catalog-purchase-pack {
      display: flex !important;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 12px;
      border: 1px solid #b9c8af;
      border-radius: 11px;
      background: #f3f5ed;
      color: var(--owner-strong, #203a32);
      font-size: 16px;
      font-weight: 700;
      line-height: 1.2;
      text-align: start;
      overflow-wrap: anywhere;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase="select"] > .catalog-purchase-pack::after {
      width: 8px;
      height: 8px;
      flex: 0 0 auto;
      margin: -4px 4px 0 0;
      border: solid currentColor;
      border-width: 0 1.6px 1.6px 0;
      transform: rotate(45deg);
      content: "";
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] > select[data-compact-pack-select] {
      position: relative;
      z-index: 1;
      opacity: 0;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase]:has(> select:focus-visible) > .catalog-purchase-pack {
      outline: 2px solid #4d6946;
      outline-offset: 2px;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] > :is([data-compact-pack-value]) {
      display: none !important;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] > .catalog-purchase-price {
      display: flex !important;
      grid-area: 1 / 2 / 3;
      flex-wrap: wrap;
      align-items: baseline;
      align-self: center;
      justify-content: flex-end;
      gap: 5px;
      text-align: end;
    }

    .catalog-purchase-price__amount {
      color: var(--owner-strong, #203a32);
      font: 400 clamp(28px, 8vw, 39px)/1 Georgia, serif;
      white-space: nowrap;
    }

    .catalog-purchase-price__currency,
    .catalog-purchase-price__unit {
      color: #616f60;
      font-size: 11px;
      line-height: 1.2;
    }

    .catalog-purchase-price__unit { flex-basis: 100%; }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] :is(.mol-card-controls, .mol-pack-unavailable) {
      grid-area: 3 / 1 / 4 / -1 !important;
      width: 100% !important;
      margin-block-start: 7px !important;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] .mol-card-controls > :is(.mol-card-cart-add, .preorder-whatsapp) {
      min-height: 49px !important;
      border-radius: 11px !important;
      font-size: 16px !important;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] .mol-card-cart-add > .mol-card-add-label {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] .mol-card-add-label::before {
      display: none;
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] .mol-card-cart-add > .mol-card-add-label::before {
      display: inline-block;
      width: 19px;
      height: 19px;
      flex: 0 0 auto;
      background: currentColor;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l2.5 12h11L21 6H6m7 2v5m-2.5-2.5h5'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E") center / contain no-repeat;
      content: "";
    }

    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] > .mol-pack-minimum { grid-row: 4 !important; }
    #main .mol-pack-choice[data-compact-packs][data-catalog-split-purchase] .mol-card-add-error { grid-row: 5 !important; }
  }
}
