/* Stari vrh — stran Vozovnice (nakup na eni strani). v1 postavitev, v2 vizualni jezik:
   zaobljene kartice, mehke sence, pill gumbi, temno modri povzetek. */

/* ---------- postavitev ---------- */
.shop-sec {
  padding-top: clamp(40px, 5vw, 64px);
  /* .section ima overflow: hidden, kar onemogoči lepljiv povzetek (position: sticky) */
  overflow: visible;
}

.shop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

@media (max-width: 1000px) {
  .shop {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- zavihki ---------- */
.shop__tabs {
  display: flex;
  gap: .3rem;
  padding: .3rem;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
  width: max-content;
  max-width: 100%;
}

.shop__tabs::-webkit-scrollbar {
  display: none;
}

.shop__tabs [role="tab"] {
  flex: none;
  padding: .75rem 1.15rem;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  font: 600 .92rem/1 var(--body);
  color: var(--ink-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

.shop__tabs [role="tab"]:hover {
  color: var(--navy-800);
}

.shop__tabs [role="tab"][aria-selected="true"] {
  background: var(--navy-800);
  color: #fff;
}

.shop__tabs [role="tab"]:focus-visible,
.seg button:focus-visible,
.qty button:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

/* ---------- starostne skupine ---------- */
.shop__ages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.2rem;
  margin: 1.8rem 0 1.2rem;
}

.shop__label {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.seg button {
  padding: .6rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: #fff;
  font: 600 .88rem/1 var(--body);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}

.seg button:hover {
  border-color: var(--navy-600);
}

.seg button[aria-pressed="true"] {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--navy-950);
}

/* ---------- vozovnice ---------- */
.shop__panel {
  display: grid;
  gap: .75rem;
}

.tcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 136px;
  align-items: center;
  gap: 1.4rem;
  padding: 1.15rem 1.15rem 1.15rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.tcard:hover {
  box-shadow: var(--shadow-md);
}

.tcard.is-in-cart {
  border-color: var(--yellow-600);
  box-shadow: 0 0 0 1px var(--yellow-600), var(--shadow-md);
}

.tcard.is-unavailable .tcard__price {
  color: var(--ink-faint);
}

.tcard h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy-800);
}

.tcard__txt p {
  margin: .3rem 0 0;
  font-size: .92rem;
  color: var(--ink-muted);
}

.tcard__price {
  font: 800 clamp(1.5rem, 2.2vw, 1.9rem)/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--navy-800);
  text-align: right;
  white-space: nowrap;
}

.qty {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  padding: .25rem;
  border-radius: var(--r-pill);
  background: var(--ice-50);
  border: 1px solid var(--line);
}

.qty button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font: 600 1.25rem/1 var(--body);
  color: var(--navy-800);
  cursor: pointer;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}

/* senca samo ob lebdenju */
.qty button:not(:disabled):hover {
  box-shadow: var(--shadow-sm);
}

.qty button[data-d="1"]:not(:disabled) {
  background: var(--yellow);
  color: var(--navy-950);
}

.qty button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.qty output {
  min-width: 2.6rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shop.is-busy .qty button {
  pointer-events: none;
}

@media (max-width: 600px) {
  .tcard {
    grid-template-columns: 1fr auto;
    grid-template-areas: "t t" "p q";
    gap: .9rem;
    padding: 1.1rem;
  }

  .tcard__txt {
    grid-area: t;
  }

  .tcard__price {
    grid-area: p;
    text-align: left;
  }

  .qty {
    grid-area: q;
  }
}

/* ---------- informacije ---------- */
.shop__info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.shop__info > div {
  padding: 1.3rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--ice-100);
  font-size: .92rem;
  color: var(--ink-soft);
}

.shop__info h3 {
  margin-bottom: .5rem;
  font-size: 1rem;
  color: var(--navy-800);
}

.shop__info p {
  margin: 0;
}

.shop__info a {
  color: var(--navy-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .shop__info {
    grid-template-columns: 1fr;
  }
}

/* ---------- povzetek nakupa ---------- */
.shop__sum {
  position: sticky;
  top: 96px;
  overflow: hidden;
  padding: 1.6rem;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--navy-850) 0%, var(--navy-950) 100%);
  box-shadow: var(--shadow-lg);
  color: rgba(226, 238, 247, .85);
}

.shop__sum h2 {
  font-size: 1.65rem;
  color: #fff;
}

.shop__lines {
  margin: 1rem 0 0;
  min-height: 64px;
}

.shop__line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .14);
  font-size: .92rem;
}

.shop__line b {
  color: var(--yellow);
}

.shop__line span:last-child {
  flex: none;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.shop__line--fee span:first-child {
  color: var(--steel-300);
}

/* Skicard — število kartic za nakup */
.shop__sk {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .04);
}

.shop__sk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .92rem;
}

.shop__sk-head b {
  color: #fff;
}

.shop__sk small {
  display: block;
  margin-top: .6rem;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--steel-300);
}

.qty--sk {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
}

.qty--sk button {
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
}

.qty--sk output {
  min-width: 2.2rem;
  color: #fff;
}

.qty--sk button[data-sk="1"]:not(:disabled) {
  background: var(--yellow);
  color: var(--navy-950);
}

.shop__empty {
  margin: 0;
  padding: .9rem 0;
  font-size: .92rem;
  color: var(--steel-300);
}

.shop__msg {
  margin: .8rem 0 0;
  padding: .7rem .9rem;
  border-radius: var(--r-sm);
  background: rgba(212, 70, 47, .18);
  color: #ffd9d2;
  font-size: .88rem;
}

.shop__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: .8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .22);
}

.shop__total span {
  font-size: .85rem;
}

.shop__total b {
  font: 800 2.2rem/1 var(--display);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.shop__cta {
  width: 100%;
  justify-content: center;
  margin-top: 1.3rem;
}

.shop__cta[aria-disabled="true"] {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.shop__fine {
  margin: 1rem 0 0;
  font-size: .8125rem;
  color: var(--steel-300);
}

.shop__fine a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1000px) {
  .shop__sum {
    position: static;
  }
}

.shop__closed {
  margin: 1rem 0 0;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(255, 214, 0, .14);
  color: #fff;
  font-size: .88rem;
}

/* ---------- telefon: spodnja vrstica s skupnim zneskom ---------- */
.shop__bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .6rem .6rem .6rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--navy-950);
  box-shadow: var(--shadow-lg);
  color: rgba(226, 238, 247, .85);
  font-size: .9rem;
}

.shop__bar[hidden] {
  display: none;
}

.shop__bar b {
  color: #fff;
}
