/* Approved v9 purchase controls. Business logic and amounts remain in Woo/VKPE. */
body.single-product .vk-product-purchase { margin: 26px 0 32px; }
html body.single-product .product_infos .vk-product-purchase form.cart {
  width: 100%; margin: 0 !important; padding: 0 !important; border: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
body.single-product .vk-product-purchase form.cart:not(.variations_form):not(.grouped_form),
body.single-product .vk-product-purchase .woocommerce-variation-add-to-cart {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px;
}
body.single-product .vk-product-purchase form.cart::before,
body.single-product .vk-product-purchase form.cart::after { display: none !important; }
body.single-product .vk-product-purchase .vka-context,
body.single-product .product_infos > .vka-context { display: none !important; }
body.single-product .vk-product-purchase form.cart > .quantity,
body.single-product .vk-product-purchase .woocommerce-variation-add-to-cart > .quantity {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 0 0 160px; width: 160px; height: 64px; margin: 0 !important;
  padding: 0 !important; border: 1px solid var(--vk-line, #dde3ec);
  border-radius: 6px; background: var(--vk-soft, #f7f8fb); overflow: hidden;
}
body.single-product .vk-product-purchase .quantity .qty-adjust { display: contents; }
body.single-product .vk-product-purchase .quantity :is(.qty-plus, .qty-minus) i { display: none !important; }
body.single-product .vk-product-purchase .quantity :is(.qty-plus, .qty-minus)::before {
  content: ''; width: 18px; height: 18px; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.single-product .vk-product-purchase .quantity .qty-plus::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16M12 4v16' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E");
}
body.single-product .vk-product-purchase .quantity:has(input[type="hidden"]) { display: none !important; }
body.single-product .vk-product-purchase .quantity input.qty {
  grid-column: 2; grid-row: 1; width: 100% !important; min-width: 0;
  height: 62px !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important;
  color: var(--vk-ink, #151515) !important; font-size: 16px; text-align: center;
  appearance: textfield; -moz-appearance: textfield;
}
body.single-product .vk-product-purchase input.qty::-webkit-inner-spin-button,
body.single-product .vk-product-purchase input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body.single-product .vk-product-purchase .quantity :is(.qty-plus, .qty-minus) {
  position: static !important; display: flex; align-items: center; justify-content: center;
  grid-row: 1; width: 100% !important; height: 62px !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important;
  color: var(--vk-ink, #151515) !important; text-decoration: none; font-size: 20px;
}
body.single-product .vk-product-purchase .quantity .qty-minus { grid-column: 1; }
body.single-product .vk-product-purchase .quantity .qty-plus { grid-column: 3; }
body.single-product .vk-product-purchase .quantity :is(.qty-plus, .qty-minus):hover { background: var(--vk-line, #dde3ec) !important; }
body.single-product .vk-product-purchase .quantity :is(.qty-plus, .qty-minus):focus-visible { outline: 2px solid #8160c2; outline-offset: -3px; }
html body.single-product .product_infos .vk-product-purchase form.cart .single_add_to_cart_button,
body.single-product .vk-purchase-bar__button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  flex: 1 1 180px; min-height: 64px; margin: 0 !important; padding: 15px 20px !important;
  border: 1px solid transparent !important; border-radius: 6px !important;
  background: linear-gradient(110deg, #4f63f6, #8160c2 52%, #c23a8e) !important;
  color: #fff !important; font-family: inherit; font-size: 16px; font-weight: 500;
  line-height: 1.3; letter-spacing: 0; text-transform: none; text-align: center;
  cursor: pointer; box-shadow: none !important; transition: filter 150ms ease;
}
html body.single-product .product_infos .vk-product-purchase .single_add_to_cart_button::before,
body.single-product .vk-purchase-bar__button::before {
  content: ''; display: block; flex: 0 0 21px; width: 21px; height: 23px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Cpath d='M3 8h18v16H3zM8 9V6a4 4 0 018 0v3' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.single-product .vk-product-purchase .single_add_to_cart_button:hover,
body.single-product .vk-purchase-bar__button:hover { filter: brightness(1.09); }
body.single-product .vk-product-purchase .single_add_to_cart_button:focus-visible,
body.single-product .vk-purchase-bar__button:focus-visible,
body.single-product .vk-purchase-action:focus-visible { outline: 2px solid #8160c2; outline-offset: 3px; }
body.single-product .vk-purchase-bar__button:disabled { opacity: .65; cursor: wait; }
body.single-product .vk-product-purchase .variations { margin-bottom: 16px; }
body.single-product .vk-product-purchase .woocommerce-variation-add-to-cart-disabled { opacity: .7; }
body.single-product .vk-purchase-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
body.single-product .vk-purchase-actions:not(:has(.vk-purchase-service)) { display: none; }
body.single-product .vk-purchase-actions:not(:has(.vk-purchase-service--leasing)),
body.single-product .vk-purchase-actions:not(:has(.vk-purchase-service--watch)) { grid-template-columns: minmax(0, 1fr); }
body.single-product .vk-purchase-service { min-width: 0; margin: 0; padding: 0; border: 0; }
body.single-product .vk-purchase-action {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 100%; min-height: 44px; margin: 0; padding: 9px 10px;
  border: 1px solid var(--vk-line, #dde3ec); border-radius: 6px;
  background: transparent; color: var(--vk-ink, #303640); box-shadow: none;
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.35;
  text-transform: none; letter-spacing: 0; text-align: center; cursor: pointer;
}
body.single-product .vk-purchase-action svg { flex: 0 0 17px; width: 17px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
body.single-product .vk-purchase-action:hover { border-color: var(--vk-muted, #626b78); background: var(--vk-soft, #f7f8fb); }
html[data-vk-theme="dark"] body.single-product .vk-purchase-action { color: #c7cbd3; border-color: #414954; }
html[data-vk-theme="dark"] body.single-product .vk-purchase-action:hover { color: #fff; background: #1a1e26; border-color: #697282; }
body.single-product .vk-product-excerpt { margin-top: 0; }
body.single-product .product_infos > .price { font-size: 36px; font-weight: 600; line-height: 1.25; }
body.single-product .product_infos > .price > .woocommerce-Price-amount { font-weight: 600; }
body.single-product .product_infos > .price > .woocommerce-price-suffix { display: block; margin-top: 8px; font-size: 18px; font-weight: 300; }

/* A proxy for the original form, never a second checkout/cart implementation. */
body.single-product .vk-purchase-bar[hidden] { display: none !important; }
body.single-product .vk-purchase-bar {
  position: fixed; inset: var(--vk-purchase-top, 0px) 0 auto; z-index: 98990;
  border-bottom: 1px solid var(--vk-line, #dde3ec); background: var(--vk-surface, #fff);
  color: var(--vk-ink, #151515); box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
html[data-vk-theme="dark"] body.single-product .vk-purchase-bar { background: #14181f; color: #f4f5f8; border-color: #303640; }
body.single-product .vk-purchase-bar__inner { display: flex; align-items: center; gap: 20px; max-width: 1530px; min-height: 84px; padding: 12px 28px; margin: 0 auto; }
body.single-product .vk-purchase-bar__identity { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; min-width: 0; }
body.single-product .vk-purchase-bar__identity img { width: 52px; height: 52px; border-radius: 4px; object-fit: contain; background: #f4f4f4; }
body.single-product .vk-purchase-bar__name { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
body.single-product .vk-purchase-bar__price { flex: 0 1 auto; font-size: 21px; font-weight: 600; line-height: 1.25; }
body.single-product .vk-purchase-bar__price :is(.woocommerce-price-suffix, .vkpe-sale-price__suffix) { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--vk-muted, #626b78); }
body.single-product .vk-purchase-bar__price .vkpe-sale-price__current { font-size: inherit; }
body.single-product .vk-purchase-bar__quantity { width: 64px; min-width: 64px; height: 48px; margin: 0; padding: 5px 6px; border: 1px solid var(--vk-line, #dde3ec); border-radius: 6px; background: var(--vk-soft, #f7f8fb); color: inherit; font: inherit; text-align: center; }
body.single-product .vk-purchase-bar__button { flex: 0 0 auto; min-height: 48px; font-size: 14px; padding: 12px 22px !important; }
body.single-product .vk-purchase-bar__button::before { flex-basis: 18px; width: 18px; height: 20px; }
@media (max-width: 767px) {
  body.single-product .vk-product-purchase form.cart > .quantity,
  body.single-product .vk-product-purchase .woocommerce-variation-add-to-cart > .quantity { flex-basis: 112px; width: 112px; }
  body.single-product .vk-product-purchase form.cart .single_add_to_cart_button { flex-basis: 150px; padding: 12px !important; font-size: 15px; }
  body.single-product .vk-purchase-actions { gap: 8px; }
  body.single-product .vk-purchase-action { padding: 8px; gap: 6px; font-size: 12px; }
  body.single-product .vk-purchase-bar__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; min-height: 96px; padding: 10px 16px; }
  body.single-product .vk-purchase-bar__identity { grid-column: 1 / -1; gap: 8px; }
  body.single-product .vk-purchase-bar__identity img { width: 28px; height: 28px; }
  body.single-product .vk-purchase-bar__name { font-size: 12px; line-height: 1.3; }
  body.single-product .vk-purchase-bar__quantity { display: none; }
  body.single-product .vk-purchase-bar__price { font-size: 17px; }
  body.single-product .vk-purchase-bar__button { min-height: 44px; padding: 10px 14px !important; font-size: 12px; }
  body.single-product .vk-purchase-bar__price :is(.woocommerce-price-suffix, .vkpe-sale-price__suffix) { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  body.single-product .vk-product-purchase button,
  body.single-product .vk-purchase-bar button { transition: none; }
}
