/* ==========================================================================
   omega.olsztyn.pl – karta produktu: ilość i przyciski (Journal3)  v1.0.1
   Działa tylko na elementach oznaczonych przez omega-product.js
   (.omega-buy, .omega-pqty, .omega-buy__cart, .omega-buy__sample, .omega-pbar).
   ========================================================================== */
:root {
  --op-accent: #d71920;
  --op-accent-hover: #b3141a;
  --op-text: #222;
  --op-muted: #666;
  --op-border: #dcdcdc;
  --op-border-accent: #f2c4c6;
  --op-radius: 6px;
  --op-h: 52px;                  /* wysokość pola ilości i przycisków */
}

/* ---------- blok: ilość + przyciski ---------- */
#product .omega-buy,
#product .omega-buy .buttons-wrapper {
  display: flex !important;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  position: static !important;   /* wyłącza przyklejony pasek Journal3 – zastępuje go .omega-pbar */
  transform: none !important;
}
#product .omega-buy.omega-buy--moved { margin: 18px 0 22px !important; }
/* wewnętrzny blok Journal3 (ilość + „Do koszyka”) spłaszczony – wszystkie elementy w jednym rzędzie */
#product .omega-buy .stepper-group,
#product .omega-buy .cart-group { display: contents !important; }
#product .omega-buy .buttons-wrapper > :not(.stepper-group):not(.cart-group) { flex: 0 0 auto; display: flex !important; gap: 10px; align-items: stretch; }
#product .omega-buy > *,
#product .omega-buy .buttons-wrapper > * { margin: 0 !important; }

/* ---------- pole ilości: −  liczba  jednostka  + ---------- */
#product .omega-pqty {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 48px minmax(48px, 1fr) auto 48px;
  align-items: center;
  flex: 0 0 196px;
  width: 196px !important;
  height: var(--op-h) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--op-border) !important;
  border-radius: var(--op-radius) !important;
  background: #fff !important;
  overflow: hidden;
}
#product .omega-pqty > label,
#product .omega-pqty .control-label { display: none !important; }
#product .omega-pqty > span { display: contents !important; }
#product .omega-pqty input[name="quantity"] {
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: right !important;
  font-size: 17px !important;
  font-variant-numeric: tabular-nums;
  color: var(--op-text) !important;
}
#product .omega-pqty:not(:has(.omega-pqty__unit)) input[name="quantity"] { text-align: center !important; grid-column: 2 / 4; }
#product .omega-pqty .omega-pqty__unit {
  grid-column: 3;
  grid-row: 1;
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  background: none !important;
  padding: 0 8px 0 4px;
  font-size: 15px;
  color: var(--op-muted);
  white-space: nowrap;
}
/* strzałki Journal3 → przyciski − i + po bokach (to te same elementy, więc działa skok z Fractional) */
#product .omega-pqty .fa-angle-down,
#product .omega-pqty .fa-angle-up,
#product .omega-pqty .fa-minus,
#product .omega-pqty .fa-plus {
  grid-row: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: static !important;
  width: 48px !important;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--op-text) !important;
  font-size: 0 !important;
  cursor: pointer;
  transform: none !important;
  -webkit-tap-highlight-color: transparent;
}
#product .omega-pqty .fa-angle-down,
#product .omega-pqty .fa-minus { grid-column: 1; }
#product .omega-pqty .fa-angle-up,
#product .omega-pqty .fa-plus { grid-column: 4; }
/* znaki − i + rysowane kreskami (niezależne od czcionki ikon i obrotów nadanych przez Journal3) */
#product .omega-pqty .fa-angle-down,
#product .omega-pqty .fa-angle-up,
#product .omega-pqty .fa-minus,
#product .omega-pqty .fa-plus { position: relative !important; rotate: none !important; }
#product .omega-pqty .fa-angle-down::before,
#product .omega-pqty .fa-angle-up::before,
#product .omega-pqty .fa-minus::before,
#product .omega-pqty .fa-plus::before,
#product .omega-pqty .fa-angle-up::after,
#product .omega-pqty .fa-plus::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  width: 14px !important;
  height: 2px !important;
  margin: -1px 0 0 -7px !important;
  border: 0 !important;
  border-radius: 1px;
  background: currentColor !important;
  transform: none !important;
  rotate: none !important;
  font-size: 0 !important;
}
#product .omega-pqty .fa-angle-up::after,
#product .omega-pqty .fa-plus::after {
  width: 2px !important;
  height: 14px !important;
  margin: -7px 0 0 -1px !important;
}
@media (hover: hover) {
  #product .omega-pqty .fa-angle-down:hover,
  #product .omega-pqty .fa-angle-up:hover,
  #product .omega-pqty .fa-minus:hover,
  #product .omega-pqty .fa-plus:hover { background: #f6f6f6 !important; }
}

/* ---------- przyciski ---------- */
#product .omega-buy .omega-buy__cart,
#product .omega-buy .omega-buy__sample {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--op-h) !important;
  min-height: var(--op-h) !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border-radius: var(--op-radius) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
  box-shadow: none !important;
  transition: background-color .15s, border-color .15s, color .15s;
}
#product .omega-buy .omega-buy__cart {
  flex: 1 1 200px;
  border: 1px solid var(--op-accent) !important;
  background: var(--op-accent) !important;
  color: #fff !important;
}
#product .omega-buy .omega-buy__cart:hover { background: var(--op-accent-hover) !important; border-color: var(--op-accent-hover) !important; }
#product .omega-buy .omega-buy__cart *,
#product .omega-buy .omega-buy__cart::before { color: #fff !important; text-transform: none !important; }
#product .omega-buy .omega-buy__sample {
  flex: 0 0 auto;
  border: 1px solid var(--op-border-accent) !important;
  background: #fff !important;
  color: var(--op-accent) !important;
}
#product .omega-buy .omega-buy__sample:hover { border-color: var(--op-accent) !important; }
#product .omega-buy .omega-buy__sample * { text-transform: none !important; }

/* ---------- telefon ---------- */
@media (max-width: 767px) {
  #product .omega-pqty { flex: 1 1 100%; width: 100% !important; grid-template-columns: 56px 1fr 1fr 56px; }
  #product .omega-pqty .fa-angle-down, #product .omega-pqty .fa-angle-up,
  #product .omega-pqty .fa-minus, #product .omega-pqty .fa-plus { width: 56px !important; }
  #product .omega-pqty input[name="quantity"] { font-size: 18px !important; }
  #product .omega-buy .omega-buy__cart { flex: 1 1 0; min-width: 0; padding: 0 12px !important; }
  #product .omega-buy .omega-buy__sample { flex: 0 0 auto; padding: 0 14px !important; font-size: 15px !important; }

  body.omega-has-pbar { padding-bottom: 0; }
  .omega-pbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--op-border-accent);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    transform: translateY(0);
    transition: transform .2s ease;
  }
  .omega-pbar.is-hidden { transform: translateY(110%); }
  .omega-pbar__price { font-size: 19px; font-weight: 700; color: var(--op-text); white-space: nowrap; }
  .omega-pbar__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border: 0;
    border-radius: var(--op-radius);
    background: var(--op-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
  }
}
@media (min-width: 768px) {
  .omega-pbar { display: none !important; }
}
