/* ============================================================
   GATO mobile-only: Winkelen per categorie
   - Horizontal pill category selector
   - Fan product cards (less curve + clearer prev/next)
   Scoped to max-width 991px — desktop untouched
   ============================================================ */
@media (max-width: 991px) {
  /* ---- Category selector (horizontal pills) ---- */
  .tvcmstabcategory-product-slider .tvtabcategory-all-tab {
    margin-bottom: 0.75rem !important;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-product-sub-title-block {
    margin: 0 0 0.5rem;
    padding: 0;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-product-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 0.55rem;
    margin: 0 !important;
    padding: 0.15rem 0.85rem 0.35rem !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-product-inner::-webkit-scrollbar {
    display: none;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-product-li,
  .tvcmstabcategory-product-slider .tvtabcategory-show,
  .tvcmstabcategory-product-slider .tvtabcategory-hide {
    width: auto !important;
    flex: 0 0 auto;
    display: block !important;
    margin: 0 !important;
    float: none !important;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-show,
  .tvcmstabcategory-product-slider .tvtabcategory-hide {
    display: none !important;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-product-li-inner-block {
    margin: 0 !important;
    padding: 0.7rem 1.15rem !important;
    min-width: 7.5rem;
    background: #fff !important;
    border: 1px solid #e6e6e6 !important;
    border-bottom: 1px solid #e6e6e6 !important;
    border-radius: 0.85rem !important;
    box-shadow: none !important;
    white-space: nowrap;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-product-li.active .tvtabcategory-product-li-inner-block,
  .tvcmstabcategory-product-slider .tvtabcategory-product-li:hover .tvtabcategory-product-li-inner-block {
    border-color: #cfcfcf !important;
    border-bottom-color: #cfcfcf !important;
    background: #fff !important;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-tab-sub-title {
    display: block;
    color: #555 !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
  }

  .tvcmstabcategory-product-slider .tvtabcategory-product-li.active .tvtabcategory-tab-sub-title {
    color: #222 !important;
  }

  /* ---- Fan layout overflow ---- */
  .tv-main-div:has(.gs-fan-active),
  .tv-full-layout:has(.gs-fan-active),
  .tvcmstabcategory-product-slider.gs-fan-active,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-tab-product,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-wrapper,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-content-box,
  .tvcmstabcategory-product-slider.gs-fan-active .ajaxData {
    overflow: visible !important;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-product-pagination,
  .tvcmstabcategory-product-slider.gs-fan-active .owl-nav,
  .tvcmstabcategory-product-slider.gs-fan-active .owl-dots {
    display: none !important;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-content-box {
    overflow: visible;
    padding: 0;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider.owl-carousel,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider .owl-stage-outer,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider .owl-stage,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider .owl-item {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-layout {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 19.5rem;
    margin: 0.35rem auto 0;
    padding-bottom: 4rem;
    perspective: 900px;
    overflow: visible;
  }

  /* Less rounded product fan cards */
  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9.5rem;
    height: 14.5rem;
    margin-left: -4.75rem;
    margin-top: -7.25rem;
    border-radius: 0.28rem;
    overflow: hidden;
    background: #111;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    will-change: transform, opacity;
    backface-visibility: hidden;
    text-decoration: none;
    color: inherit;
    opacity: 0;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.6rem 0.55rem 0.55rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
  }

  /* Prev/next clearly below cards — clear of fan overhang */
  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.75rem 0 1rem;
    padding: 0.35rem 0.5rem 0.45rem;
    position: relative;
    z-index: 80;
    isolation: isolate;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-arrow {
    position: relative;
    width: 2.85rem;
    height: 2.85rem;
    min-width: 2.85rem;
    min-height: 2.85rem;
    border-radius: 999px;
    border: 1.5px solid rgba(0, 0, 0, 0.14);
    background: #fff;
    color: rgba(0, 0, 0, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-arrow svg {
    width: 1.1rem;
    height: 1.1rem;
    pointer-events: none;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 4.5rem;
    padding: 0 0.25rem;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, background 0.25s ease;
  }

  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-dot.is-active {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.3);
  }

  /* Hide original product mini chrome while fan is active */
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider > .product-miniature,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider .product-miniature,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider .owl-item,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider .owl-stage,
  .tvcmstabcategory-product-slider.gs-fan-active .tvtabcategory-all-product-slider .owl-stage-outer {
    display: none !important;
  }
}

@media (max-width: 479px) {
  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-layout {
    min-height: 16.5rem;
    padding-bottom: 3.75rem;
  }
  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-card {
    width: 7.75rem;
    height: 12rem;
    margin-left: -3.875rem;
    margin-top: -6rem;
    border-radius: 0.22rem;
  }
  .tvcmstabcategory-product-slider.gs-fan-active .gs-fan-controls {
    margin-top: 2.25rem;
    gap: 1.25rem;
    padding-top: 0.25rem;
  }
}
