/* Mobilni sticky bar — dodavanje u korpu */

.product-sticky-cart {
  display: none;
}

@media screen and (max-width: 768px) {
  .product-sticky-cart {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .product-sticky-cart.is-visible {
    transform: translateY(0);
    pointer-events: auto;
  }

  .product-sticky-cart-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: var(--max-content-width, 1600px);
    margin: 0 auto;
  }

  .product-sticky-cart-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: var(--font-medium-weight, 600);
    line-height: 1.3;
    color: var(--text-color, #000);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-sticky-cart-controls {
    width: 100%;
  }

  .product-sticky-cart .product-sticky-input-group {
    width: 100%;
    height: 48px;
  }

  .product-sticky-cart .added-quantity {
    width: 56px;
    font-size: 16px;
  }

  .product-sticky-cart .dodaj-u-korpu {
    width: 72px;
    min-width: 72px;
    flex-shrink: 0;
  }

  /* Mobilni — puna širina sekcije dodavanja u korpu */
  .desc-row .final-product-buttons,
  .filter-container-row .final-product-buttons {
    width: 100%;
    margin-top: var(--padding-10);
  }

  .js-product-cart-action,
  .product-cart-row {
    width: 100%;
    align-items: stretch;
  }

  .product-cart-row form {
    flex: 1 1 auto;
    width: 100%;
    grid-column: unset;
    grid-row: unset;
  }

  .final-product-buttons .input-group,
  .product-cart-row .input-group {
    width: 100% !important;
    max-width: 100%;
    height: 48px;
  }

  .final-product-buttons .add-to-cart-container {
    width: 100%;
    padding: 0;
  }

  .final-product-buttons .added-quantity {
    width: 56px;
  }

  .final-product-buttons .dodaj-u-korpu {
    width: 72px;
    min-width: 72px;
  }

  /* Scroll-to-top iznad sticky bara */
  .return-btn {
    transition:
      bottom 0.32s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  body:has(.product-sticky-cart.is-visible) .return-btn {
    bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    z-index: 1001;
  }
}

@media screen and (max-width: 550px) {
  .final-product-buttons .added-quantity,
  .product-sticky-cart .added-quantity {
    width: 56px;
  }
}
