/* GamePC mobile conversion V4 — intentionally does not override
   the existing benefit carousel or the category-card layout. */
.gpc-mobile-trust {
  display: none;
}

@media (min-width: 768px) {
  /* Čtyři karty v záběru, další produkty dostupné vodorovným posuvníkem. */
  .gpc-homepage-products .gpc-product-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 16px !important;
    width: 100% !important;
    padding: 0 0 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .gpc-homepage-products .gpc-product-grid::-webkit-scrollbar {
    display: none;
  }

  .gpc-homepage-products .gpc-product-grid > .product,
  .gpc-homepage-products .gpc-product-grid > .product:nth-child(n+5) {
    display: block !important;
    flex: 0 0 calc(25% - 12px) !important;
    width: calc(25% - 12px) !important;
    min-width: calc(25% - 12px) !important;
    scroll-snap-align: start;
  }

  .gpc-product-controls {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    margin: 10px 4px 3px;
  }

  .gpc-product-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 36px;
    padding: 0;
    border: 1px solid #d7c7ed;
    border-radius: 10px;
    color: #4e08b8;
    background: #fff;
    box-shadow: 0 3px 10px rgba(55, 8, 120, .08);
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
  }

  .gpc-product-arrow span {
    margin-top: -3px;
    font-size: 34px;
    line-height: 1;
  }

  .gpc-product-arrow:hover:not(:disabled) {
    border-color: #5c14d8;
    color: #fff;
    background: #5c14d8;
  }

  .gpc-product-arrow:disabled {
    opacity: .32;
    cursor: default;
  }

  .gpc-product-scrollbar {
    position: relative;
    display: block;
    height: 4px;
    margin: 0;
    overflow: hidden;
    border-radius: 999px;
    background: #e5ddef;
  }

  .gpc-product-scrollbar__thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: inherit;
    background: #5c14d8;
    transform: translateX(0);
    will-change: transform;
  }
}

@media (max-width: 767px) {
  .position--benefitHomepage[data-compact-benefits="1"] {
    flex-wrap: nowrap !important;
  }

  .gpc-homepage-products {
    margin-top: 14px !important;
  }

  /* Dvě karty v záběru, všechny další dostupné tažením do strany. */
  .gpc-homepage-products .gpc-product-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 0 0 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .gpc-homepage-products .gpc-product-grid::-webkit-scrollbar {
    display: none;
  }

  .gpc-homepage-products .gpc-product-grid > .product,
  .gpc-homepage-products .gpc-product-grid > .product:nth-child(n+3),
  .gpc-homepage-products .gpc-product-grid > .product:nth-child(n+5) {
    display: block !important;
    flex: 0 0 calc(50% - 4px) !important;
    width: calc(50% - 4px) !important;
    min-width: calc(50% - 4px) !important;
    scroll-snap-align: start;
  }

  .gpc-product-controls {
    display: block;
  }

  .gpc-product-arrow {
    display: none !important;
  }

  .gpc-product-scrollbar {
    position: relative;
    display: block;
    height: 4px;
    margin: 7px 14px 2px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5ddef;
  }

  .gpc-product-scrollbar__thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: inherit;
    background: #5c14d8;
    transform: translateX(0);
    will-change: transform;
  }

  /* Malý štítek s procentem místo velké rozety přes fotografii. */
  .gpc-product-grid .flags-extra {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    top: 6px !important;
    right: auto !important;
    left: 6px !important;
  }

  .gpc-product-grid .flag-freeshipping {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: 72px !important;
    margin: 0 !important;
    padding: 4px 7px !important;
    border-radius: 999px !important;
    line-height: 1 !important;
  }

  .gpc-product-grid .flag-freeshipping .flag-text::after {
    content: "Doprava 0 Kč" !important;
    font-size: 8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .gpc-product-grid .flag-discount {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-width: 42px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: #ed1733 !important;
    line-height: 1 !important;
  }

  .gpc-product-grid .flag-discount::before {
    display: none !important;
    content: none !important;
    background: none !important;
  }

  .gpc-product-grid .flag-discount .price-standard {
    display: none !important;
  }

  .gpc-product-grid .flag-discount .price-save {
    display: block !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .gpc-mobile-trust {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 9px 0 11px;
    padding: 8px 7px;
    overflow: hidden;
    border: 1px solid #e4dcef;
    border-radius: 10px;
    color: #2b154f;
    background: #faf8fd;
    text-decoration: none;
    white-space: nowrap;
  }

  .gpc-mobile-trust__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-right: 5px;
    border-right: 1px solid #ddd3ea;
    font-size: 9px;
  }

  .gpc-mobile-trust__stars {
    color: #f2b400;
    font-size: 10px;
    letter-spacing: -2px;
  }

  .gpc-mobile-trust__rating strong {
    font-size: 12px;
  }

  .gpc-mobile-trust__benefit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 800;
  }

  .gpc-mobile-trust__benefit::before {
    content: "✓";
    color: #4a0ca8;
    font-weight: 900;
  }

  #heurekaTabright {
    display: none !important;
  }
}
