/* V2ASHCHUK v0.19.7 — mobile adjustments from client screenshot.
 * Author: Эмиль. Loaded after earlier fixes; no !important. */

/* A short or a long ACF hero description must never collide with the photo.
   On a phone the copy gets its natural height and the image remains at least 400px tall. */
@media (max-width:767px) {
  .v2-home .v2-hero {
    height: auto;
    min-height: calc(100svh - var(--header-height) - var(--wp-bar, 0px));
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(400px, 1fr) 180px;
    overflow: visible;
  }
  .v2-home .v2-hero-copy {
    min-width: 0;
    min-height: 0;
    padding: 36px 16px 28px;
    gap: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .v2-home .v2-hero-copy h1 { margin: 0; }
  .v2-home .v2-hero-copy p { max-width: 100%; margin: 0; }
  .v2-home .v2-hero-image { position: relative; min-height: 400px; }
  .v2-home .v2-hero-image .v2-cookie-banner {
    position: absolute;
    inset: auto 12px 12px auto;
    width: min(320px, calc(100% - 24px));
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    overflow-y: auto;
    padding: 12px;
    gap: 12px;
    box-shadow: 0 12px 20px rgba(0,0,0,.17);
    z-index: 2;
  }
  .v2-home .v2-hero-image .v2-cookie-banner p { font-size: 12px; line-height: 18px; }
  .v2-home .v2-hero-image .v2-cookie-banner .v2-cookie-accept {
    min-height: 44px;
  }
}
/* The rest of the site retains a fixed cookie notice at the right-hand bottom. */
@media (max-width:767px) {
  body:not(.home) .v2-cookie-banner {
    left: auto;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

/* All catalog prices: sale's OLD price is above CURRENT price, never in the same row.
   No price/currency wrapping inside the current amount. */
@media (max-width:767px) {
  .v2-product-card .v2-product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 3px;
    min-width: 0;
    margin-top: 8px;
    line-height: 1.35;
    font-size: clamp(12px, 3.85vw, 16px);
  }
  .v2-product-card .v2-product-price del,
  .v2-product-card .v2-product-price ins {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  .v2-product-card .v2-product-price del { order: 0; font-size: .86em; }
  .v2-product-card .v2-product-price ins { order: 1; }
  .v2-product-card .v2-product-price .woocommerce-Price-amount,
  .v2-product-card .v2-product-price .woocommerce-Price-amount bdi { white-space: nowrap; }
}
