/* === Sticky bar – produkt detail === */

/* Desktop: nahoře */
.sticky-bar {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 99999;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  display: none;
  font-family: 'Nunito Sans', sans-serif;
  -webkit-transform: translateZ(0);
}

.sticky-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sticky-bar__product {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  margin-right: 20px;
}

.sticky-bar__img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 52px;
  margin-right: 16px;
  border-radius: 4px;
}

.sticky-bar__info {
  min-width: 0;
}

.sticky-bar__name {
  font-size: 16px;
  font-weight: 700;
  color: #24242E;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.sticky-bar__price {
  font-size: 20px;
  font-weight: 700;
  color: #24242E;
  line-height: 1.3;
  margin-top: 2px;
}

.sticky-bar__action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.sticky-bar__btn {
  display: inline-block;
  height: 48px;
  line-height: 48px;
  padding: 0 28px;
  background-color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
  border-radius: 0;
  color: #fff;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.sticky-bar__btn:hover {
  background-color: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
}

.sticky-bar__btn--disabled {
  background-color: #ccc;
  border-color: #ccc;
  color: #888;
  cursor: default;
}

.sticky-bar__btn--disabled:hover {
  background-color: #ccc;
  border-color: #ccc;
}

/* === Variant swatches === */

.sticky-bar__variants {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-right: 20px;
}

.sticky-bar__swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ddd;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  flex: 0 0 auto;
}

.sticky-bar__swatch:hover {
  border-color: #999;
}

.sticky-bar__swatch--active {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* Text variant chips */
.sticky-bar__swatch--text {
  width: auto;
  height: auto;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #24242E;
  background: #f5f5f5;
  white-space: nowrap;
  line-height: 1.3;
}

.sticky-bar__swatch--text:hover {
  background: #e8e8e8;
  border-color: #999;
}

.sticky-bar__swatch--text.sticky-bar__swatch--active {
  background: #e8f5e9;
  color: var(--color-primary);
}

/* === Tablet (480–1199) === */

@media screen and (max-width: 1199px) {
  .sticky-bar__name {
    max-width: 260px;
    font-size: 14px;
  }

  .sticky-bar__price {
    font-size: 18px;
  }

  .sticky-bar__btn {
    height: 44px;
    line-height: 44px;
    padding: 0 20px;
    font-size: 15px;
  }

  .sticky-bar__variants {
    margin-right: 14px;
  }

  .sticky-bar__swatch {
    width: 22px;
    height: 22px;
  }

  .sticky-bar__swatch--text {
    font-size: 12px;
    padding: 3px 8px;
  }
}

/* === Mobil (pod 767px) === */

@media screen and (max-width: 767px) {
  .sticky-bar__inner {
    padding: 10px 14px;
  }

  .sticky-bar__img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    margin-right: 10px;
  }

  .sticky-bar__name {
    font-size: 14px;
    max-width: 140px;
  }

  .sticky-bar__price {
    font-size: 18px;
  }

  .sticky-bar__product {
    margin-right: 12px;
  }

  .sticky-bar__btn {
    height: 44px;
    line-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }

  .sticky-bar__variants {
    margin-right: 10px;
    gap: 6px;
  }

  .sticky-bar__swatch {
    width: 26px;
    height: 26px;
  }

  .sticky-bar__swatch--text {
    font-size: 12px;
    padding: 4px 8px;
  }
}

/* === Velmi malé mobily (pod 380px) === */

@media screen and (max-width: 379px) {
  .sticky-bar__img {
    display: none;
  }

  .sticky-bar__name {
    max-width: 120px;
    font-size: 13px;
  }

  .sticky-bar__price {
    font-size: 16px;
  }

  .sticky-bar__btn {
    padding: 0 14px;
    font-size: 13px;
  }

  .sticky-bar__swatch {
    width: 24px;
    height: 24px;
  }

  .sticky-bar__swatch--text {
    font-size: 11px;
    padding: 3px 6px;
  }
}
