/* =========================================================
   API YAMU — MOBILE PRODUCT LIST V5
   Jeden jediný akční kruh na produkt.
   ========================================================= */

@media (max-width: 991px) {

  /* SLEVY ORANŽOVĚ */
  body:not(.type-detail) .flag.flag-discount,
  body:not(.type-detail) .flags-extra .flag-discount,
  body:not(.type-detail) .price-save,
  body:not(.type-detail) .product .flag-discount,
  body:not(.type-detail) .product .flags-extra .flag-discount {
    background-color: #ef8800 !important;
    border-color: #ef8800 !important;
    color: #fff !important;
  }

  /* Akční wrapper bez vlastního vzhledu */
  body:not(.type-detail) .products-block .product .p-tools {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Nejdřív schovat úplně VŠECHNY přímé akce */
  body:not(.type-detail) .products-block .product .p-tools > * {
    display: none !important;
  }

  /* Pokud je v p-tools skutečný button, ukaž jen PRVNÍ button */
  body:not(.type-detail) .products-block .product .p-tools:has(button) > button:first-of-type,

  /* Pokud button není, ukaž jen PRVNÍ odkaz (produkt s variantami / detail) */
  body:not(.type-detail) .products-block .product .p-tools:not(:has(button)) > a:first-of-type {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;

    background-color: #006600 !important;
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='19' cy='20' r='1'/%3E%3Cpath d='M3 4h2l2.7 11.4a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.6L21 8H6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 22px 22px !important;

    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
  }

  /* Žádné pseudo-elementy = žádné druhé kolečko */
  body:not(.type-detail) .products-block .product .p-tools:has(button) > button:first-of-type::before,
  body:not(.type-detail) .products-block .product .p-tools:has(button) > button:first-of-type::after,
  body:not(.type-detail) .products-block .product .p-tools:not(:has(button)) > a:first-of-type::before,
  body:not(.type-detail) .products-block .product .p-tools:not(:has(button)) > a:first-of-type::after {
    content: none !important;
    display: none !important;
  }

  /* Vnitřní ikonky/text Shoptetu pryč — používáme vlastní SVG košík */
  body:not(.type-detail) .products-block .product .p-tools:has(button) > button:first-of-type > *,
  body:not(.type-detail) .products-block .product .p-tools:not(:has(button)) > a:first-of-type > * {
    display: none !important;
  }
}
