/* Barevna Founarna - finalni mobilni produktove karty a razeni, v: 20260713mf3 */

/* Karta si vzdy zachova zaoblene rohy i pri hoveru. */
body:not(.type-product) #content .products-block .p,
body:not(.type-product) #content .products .p,
body:not(.type-product) #content .products-top .p {
  border-style: solid !important;
  border-radius: 22px !important;
  background-clip: padding-box !important;
  overflow: hidden !important;
}

body:not(.type-product) #content .products-block .p::before,
body:not(.type-product) #content .products-block .p::after,
body:not(.type-product) #content .products .p::before,
body:not(.type-product) #content .products .p::after,
body:not(.type-product) #content .products-top .p::before,
body:not(.type-product) #content .products-top .p::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 767px) {
  /* Shoptet i starsi override pod 640 px vracely jeden siroky sloupec.
     Dva stejne siroke sloupce drzi vypis kompaktni, bez horizontalniho scrollu. */
  html body:not(.type-product) #content .products-block,
  html body:not(.type-product) #content .products-block.founarna-products-colorful,
  html body:not(.type-product) #content .products,
  html body:not(.type-product) #content .products-top {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body:not(.type-product) #content .products-block > .product,
  html body:not(.type-product) #content .products > .product,
  html body:not(.type-product) #content .products-top > .product {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
  }

  html body:not(.type-product) #content .products-block .p,
  html body:not(.type-product) #content .products .p,
  html body:not(.type-product) #content .products-top .p {
    width: 100% !important;
    min-width: 0 !important;
    padding: 11px !important;
    box-sizing: border-box !important;
  }

  html body:not(.type-product) #content .products-block .p > a.image,
  html body:not(.type-product) #content .products .p > a.image,
  html body:not(.type-product) #content .products-top .p > a.image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: clamp(132px, 39vw, 172px) !important;
    min-height: 0 !important;
    margin: 0 0 10px !important;
    padding: 5px !important;
    box-sizing: border-box !important;
  }

  html body:not(.type-product) #content .products-block .p > a.image img,
  html body:not(.type-product) #content .products .p > a.image img,
  html body:not(.type-product) #content .products-top .p > a.image img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  /* Kompaktni razeni. Rozbaleny seznam lezi nad produkty a neposouva je. */
  body:not(.type-product) #content .category-header,
  body:not(.type-product) #content #category-header {
    position: relative !important;
    overflow: visible !important;
  }

  body:not(.type-product) #content .listSorting {
    position: relative !important;
    z-index: 24 !important;
    width: auto !important;
    max-width: min(214px, calc(100vw - 34px)) !important;
    margin-right: 0 !important;
    margin-left: auto !important;
  }

  body:not(.type-product) #content .sortingToggle {
    display: grid !important;
    grid-template-columns: 21px auto minmax(0, 1fr) 16px !important;
    gap: 5px !important;
    align-items: center !important;
    width: auto !important;
    max-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    border: 1px solid rgba(88, 102, 132, .18) !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(246, 252, 255, .98), rgba(248, 243, 255, .98)) !important;
    box-shadow: 0 8px 22px rgba(38, 48, 77, .07) !important;
    white-space: nowrap !important;
  }

  body:not(.type-product) #content .sortingToggle .icon-sort,
  body:not(.type-product) #content .sortingToggle .icon-chevron-down {
    position: static !important;
    margin: 0 !important;
    transform: none !important;
  }

  body:not(.type-product) #content .sortingToggle__label {
    margin: 0 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
  }

  body:not(.type-product) #content .sortingToggle__value {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
  }

  body:not(.type-product) #content .listSorting__controls--dropdown {
    position: absolute !important;
    top: calc(100% + 7px) !important;
    right: 0 !important;
    left: auto !important;
    z-index: 80 !important;
    width: min(224px, calc(100vw - 30px)) !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* Cela karta je jeden sloupec; nakupni cast se opre o jeji spodni hranu. */
  body:not(.type-product) #content .products-block .p,
  body:not(.type-product) #content .products .p,
  body:not(.type-product) #content .products-top .p {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-width: 0 !important;
  }

  body:not(.type-product) #content .products-block > .product,
  body:not(.type-product) #content .products > .product,
  body:not(.type-product) #content .products-top > .product {
    display: flex !important;
    min-width: 0 !important;
    height: 100% !important;
  }

  body:not(.type-product) #content .products-block .p .p-in,
  body:not(.type-product) #content .products .p .p-in,
  body:not(.type-product) #content .products-top .p .p-in {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    height: auto !important;
  }

  body:not(.type-product) #content .products-block .p .p-in-in,
  body:not(.type-product) #content .products .p .p-in-in,
  body:not(.type-product) #content .products-top .p .p-in-in {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 10px !important;
  }

  body:not(.type-product) #content .products-block .p .name,
  body:not(.type-product) #content .products .p .name,
  body:not(.type-product) #content .products-top .p .name {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
  }

  body:not(.type-product) #content .p.founarna-card-buybox-ready .p-bottom.founarna-buybox-bottom,
  body:not(.type-product) #content .product.founarna-card-buybox-ready .p-bottom.founarna-buybox-bottom {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: auto 0 0 !important;
    padding-top: 0 !important;
    overflow: visible !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-areas: "stock price" !important;
    gap: 7px !important;
    align-items: end !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 28px !important;
    margin: 0 !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-stock {
    grid-area: stock !important;
    min-width: 0 !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-price {
    grid-area: price !important;
    min-width: 0 !important;
    text-align: right !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-stock .availability,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-stock .availability span,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-stock .founarna-card-availability-row {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
    font-size: 11.5px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-price .price,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-price .price strong {
    margin: 0 !important;
    font-size: 16.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* Dlouhy stav nedostupnosti zustane citelny a nikdy nevleze do ceny. */
  html body.founarna-category-colorful:not(.type-product) #content
  .founarna-card-buybox.is-unavailable .founarna-card-buybox-stock .availability,
  html body.founarna-category-colorful:not(.type-product) #content
  .founarna-card-buybox.is-unavailable .founarna-card-buybox-stock .availability span {
    font-size: 10px !important;
    line-height: 1.12 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  /* Mnozstvi je kratky samostatny radek, tlacitko kosiku ma cely vlastni radek. */
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .p-tools {
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .p-tools form,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .p-tools form.pr-action,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .p-tools form.founarna-featured-cart-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 42px 44px !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 93px !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .quantity {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: 32px 34px 32px !important;
    justify-self: start !important;
    width: 98px !important;
    min-width: 98px !important;
    max-width: 98px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .quantity label,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .quantity .amount {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 42px !important;
    text-align: center !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .quantity .decrease,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .quantity .increase {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .quantity .decrease {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .quantity .increase {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .btn-cart,
  html body.founarna-category-colorful:not(.type-product) #content .founarna-card-buybox-actions .add-to-cart-button {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    overflow: visible !important;
    border-radius: 14px !important;
    font-size: 13.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
}

@media (prefers-color-scheme: dark) and (max-width: 767px) {
  body:not(.type-product) #content .sortingToggle {
    border-color: rgba(93, 109, 132, .85) !important;
    background: linear-gradient(135deg, rgba(28, 35, 43, .98), rgba(38, 31, 52, .98)) !important;
    color: #f5f7fb !important;
  }
}
