/* VETAP — цена, количество и кнопка покупки */

#product .p-price-action {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    column-gap: 16px !important;
    row-gap: 16px !important;
    align-items: center !important;
    width: 100% !important;
}

#product .p-price-action__info {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
}

#product .p-price-action__controls {
    display: contents !important;
}

#product .quantity-adder {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 164px !important;
    min-width: 164px !important;
    max-width: 164px !important;
    margin: 0 !important;
}

#product .quantity-adder .quantity-number {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 50px !important;
    box-sizing: border-box !important;
}

#product .quantity-adder .add-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 50px !important;
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer;
}

#product .quantity-adder input.quantity-product {
    flex: 1 1 auto !important;
    width: 64px !important;
    min-width: 0 !important;
    height: 50px !important;
    padding: 0 3px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Кнопка Купить — отдельной строкой */

#product .p-price-action__controls > .cart {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

#product .p-price-action__controls > .cart button,
#product .p-price-action__controls > .cart .btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Мобильная версия */

@media (max-width: 767px) {
    #product .p-price-action {
        column-gap: 10px !important;
        row-gap: 14px !important;
    }

    #product .quantity-adder {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }

    #product .quantity-adder .quantity-number {
        height: 44px !important;
    }

    #product .quantity-adder .add-action {
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
    }

    #product .quantity-adder input.quantity-product {
        height: 44px !important;
        width: 52px !important;
    }

    #product .p-price-action__controls > .cart button {
        min-height: 50px !important;
    }
}

/* VETAP: product cards like NewTester */

/* Price and button vertically */
.product-thumb .price-actions-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: 100% !important;
}

/* Price above the button */
.product-thumb .price-actions-box .price {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Old price */
.product-thumb .price-actions-box .price-old {
    display: block !important;
    margin-bottom: 5px !important;
}

/* New price */
.product-thumb .price-actions-box .price-new {
    display: block !important;
}

/* Buy button container */
.product-thumb .price-actions-box .cart {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Full width buy button */
.product-thumb .price-actions-box .cart button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    height: 44px !important;
    border-radius: 999px !important;
    background: #000 !important;
    color: #fff !important;
}

/* Keep text visible */
.product-thumb .price-actions-box .cart button .text-cart-add {
    display: inline-block !important;
    color: #fff !important;
}

/* Mobile */
@media (max-width: 767px) {
    .product-thumb .price-actions-box .cart button {
        height: 42px !important;
        font-size: 14px !important;
    }
}


/* VETAP — зелёная кнопка покупки при наведении */
.product-thumb .price-actions-box .cart button:hover,
.product-thumb .price-actions-box .cart button:focus-visible {
    background: #2D8461 !important;
    color: #FFFFFF !important;
    border-color: #2D8461 !important;
    opacity: 1 !important;
}

.product-thumb .price-actions-box .cart button {
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

.product-thumb .price-actions-box .cart button:hover .text-cart-add,
.product-thumb .price-actions-box .cart button:hover i,
.product-thumb .price-actions-box .cart button:focus-visible .text-cart-add,
.product-thumb .price-actions-box .cart button:focus-visible i {
    color: #FFFFFF !important;
}


/* VETAP MOBILE FOOTER — transferred from NewTester */
/* Vetap: mobile footer layout. Add ONLY after restoring the working theme CSS.
   Put in catalog/view/theme/prime/stylesheet/vetap-custom.css */
@media (max-width: 767px) {
  footer .footer-center { padding-top: 22px; }
  footer .f-menu {
    display: grid !important;
    grid-template-columns: minmax(0, 68%) minmax(0, 32%) !important;
    grid-template-areas: "information socials" "newsletter newsletter" !important;
    gap: 14px 0 !important;
    align-items: start !important;
  }
  footer .f-menu__right-side,
  footer .f-menu__right-top { display: contents !important; }
  footer .f-menu__col--catalog,
  footer .f-menu__col--service,
  footer .f-menu__col--contacts { display: none !important; }
  footer .f-menu__col--information {
    grid-area: information !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 3px 0 10px !important;
    position: static !important;
    text-align: left !important;
  }
  footer .f-menu__col--information .f-menu__list {
    margin: 0 !important; padding: 0 !important; list-style: none !important;
  }
  footer .f-menu__col--information li { margin: 0 0 9px !important; list-style: none !important; }
  footer .f-menu__col--information a,
  footer .f-menu__col--information a:visited { color: #fff !important; font-size: 14px !important; line-height: 1.4 !important; }
  footer .f-menu__socials {
    grid-area: socials !important;
    position: static !important;
    width: auto !important; max-width: none !important;
    margin: 0 !important; padding: 0 5px !important;
    min-width: 0 !important;
  }
  footer .f-menu__list--socials {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 40px)) !important;
    gap: 8px 4px !important;
    justify-content: end !important;
    margin: 0 !important; padding: 0 !important; list-style: none !important;
  }
  footer .f-menu__list--socials li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
  footer .f-menu__link--social {
    display: flex !important; align-items: center !important; justify-content: center !important;
    width: 40px !important; height: 40px !important;
    padding: 0 !important; overflow: visible !important; color: #fff !important;
  }
  footer .f-menu__link--social i { font-size: 27px !important; }
  footer .f-menu__link--social span { display: none !important; }
  footer .f-menu__newsletter, footer .f-newsletter {
    grid-area: newsletter !important;
    width: 100% !important; max-width: 100% !important;
    min-width: 0 !important; margin: 0 !important; padding: 0 10px !important;
  }
  footer .f-newsletter__form { display: flex !important; width: 100% !important; }
  footer .f-newsletter__input { flex: 1 1 auto !important; min-width: 0 !important; }
  footer .f-newsletter__btn { flex: 0 0 auto !important; }
  footer .f-newsletter__btn-text { display: none !important; }
}



/* VETAP: mobile footer finishing */
@media (max-width: 767px) {
    footer,
    footer .footer-center,
    footer .footer-bottom {
        background: #2D8461 !important;
    }

    footer .f-menu__col--information {
        position: relative !important;
        top: -8px !important;
    }

    footer .f-menu__socials {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        padding-right: 15px !important;
    }

    footer .f-menu__socials::before {
        content: "Ми в соцмережах:";
        display: block;
        width: 100px;
        margin-bottom: 6px;
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        line-height: 16px;
        text-align: center;
        white-space: normal;
    }

    footer .f-menu__list--socials {
        grid-template-columns: repeat(2, 40px) !important;
        gap: 4px !important;
        width: 84px !important;
        transform: translateX(-8px);
    }

    footer .f-menu__link--social i,
    footer .f-menu__link--social .fa {
        font-size: 36px !important;
        line-height: 1 !important;
    }

    #back-top {
        left: calc(50% - 27px) !important;
        right: auto !important;
        bottom: 80px !important;
        transform: none !important;
        z-index: 100 !important;
    }
}


/* VETAP HEADER GREEN FINAL */
html.light-theme header.up-header,
html.dark-theme header.up-header,
header.up-header {
    background: #2D8461 !important;
    background-color: #2D8461 !important;
}

@media (min-width: 768px) {
    header.up-header {
        background: #2D8461 !important;
        background-color: #2D8461 !important;
    }
}
