/* =====================
   KOŠARICA IN BLAGAJNA
   ===================== */
body.kos-zaklenjeno { overflow: hidden; }

/* cena pod izdelkom v galeriji */
.art-card-cena {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.01em;
  margin-top: 0.1rem;
  padding: 0 0.4rem;
}

/* gumb pod izdelkom v galeriji */
.v-kosarico {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.35rem auto 0.4rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(45, 38, 32, 0.22);
  border-radius: 999px;
  padding: 0.38rem 0.95rem 0.42rem;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.v-kosarico span { color: var(--ink-muted); font-style: italic; font-size: 0.82rem; }
.v-kosarico:hover, .v-kosarico:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
  outline: none;
}
.v-kosarico:hover span, .v-kosarico:focus-visible span { color: var(--rose-pale); }
.gallery-loose .v-kosarico { margin-top: 0.15rem; }

/* plavajoči gumb košarice */
.kos-gumb {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(45, 38, 32, 0.22);
  transition: transform 0.25s ease, background 0.25s ease, opacity 0.3s ease;
}
.kos-gumb:hover { background: var(--rose); transform: translateY(-2px); }
.kos-gumb.prazna { opacity: 0; pointer-events: none; transform: translateY(12px); }
.kos-znacka {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--rose);
  color: white;
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 22px;
  text-align: center;
  border: 2px solid var(--paper);
}

/* predal */
.kos-predal { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.kos-ozadje {
  position: absolute; inset: 0;
  background: rgba(45, 38, 32, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.kos-plosca {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: var(--paper);
  box-shadow: -12px 0 40px rgba(45, 38, 32, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}
.kos-predal.odprt { pointer-events: auto; }
.kos-predal.odprt .kos-ozadje { opacity: 1; }
.kos-predal.odprt .kos-plosca { transform: translateX(0); }

.kos-glava {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(45, 38, 32, 0.08);
}
.kos-glava h2 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "opsz" 30;
  font-weight: 400;
  font-size: 1.45rem;
}
.kos-zapri {
  background: none; border: none; cursor: pointer;
  font-size: 1.9rem; line-height: 1; color: var(--ink-muted);
  width: 40px; height: 40px; border-radius: 50%;
}
.kos-zapri:hover { color: var(--ink); background: var(--paper-deep); }

.kos-vsebina {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.1rem 1.4rem 2rem;
  -webkit-overflow-scrolling: touch;
}

.kos-seznam { list-style: none; }
.kos-postavka {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(45, 38, 32, 0.07);
  align-items: start;
}
.kos-postavka img {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(45, 38, 32, 0.15);
  background: white;
}
.kos-opis { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.kos-ime { font-size: 1.02rem; line-height: 1.3; }
.kos-ime em { font-style: italic; color: var(--ink-muted); }
.kos-detajl { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.35; }
.kos-detajl.unikat { color: var(--rose); letter-spacing: 0.04em; }
.kos-desno { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; }
.kos-cena { font-weight: 500; white-space: nowrap; }
.kos-odstrani {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.8rem; color: var(--ink-muted);
  text-decoration: underline; text-underline-offset: 2px; padding: 0.2rem 0;
}
.kos-odstrani:hover { color: var(--rose); }

.kol {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sage-pale);
  border-radius: 999px;
  background: white;
  margin-top: 0.35rem;
  align-self: flex-start;
}
.kol button {
  width: 34px; height: 32px;
  border: none; background: none; cursor: pointer;
  font-size: 1.1rem; color: var(--ink);
  border-radius: 999px;
}
.kol button:hover { background: var(--paper-deep); }
.kol span, .kol input {
  min-width: 28px; text-align: center; font-family: var(--font-body); font-size: 0.98rem;
}
.kol input {
  width: 44px; border: none; background: transparent; color: var(--ink);
  -moz-appearance: textfield; appearance: textfield;
}
.kol input::-webkit-outer-spin-button, .kol input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.kos-zneski { margin: 1.1rem 0 0.6rem; }
.kos-vrstica {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.3rem 0; font-size: 0.95rem; color: var(--ink-soft);
}
.kos-vrstica span:last-child { white-space: nowrap; }
.kos-vrstica.popust { color: var(--rose); font-size: 0.9rem; }
.kos-vrstica.skupaj {
  border-top: 1px solid rgba(45, 38, 32, 0.12);
  margin-top: 0.4rem; padding-top: 0.65rem;
  font-size: 1.1rem; color: var(--ink); font-weight: 500;
}
.kos-zneski.kratko { background: white; padding: 0.6rem 0.9rem; border-radius: 3px; }

.kos-drobno { font-size: 0.86rem; color: var(--ink-muted); line-height: 1.55; margin: 0.6rem 0; }
.kos-drobno a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.kos-opozorilo { color: var(--ink-soft); background: var(--rose-pale); padding: 0.6rem 0.8rem; border-radius: 3px; }

.kos-glavni {
  display: block;
  width: 100%;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 80, "opsz" 14;
  font-size: 1.02rem;
  font-weight: 500;
  color: white;
  background: var(--ink);
  border: none;
  border-radius: 3px;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  transition: background 0.25s ease;
}
.kos-glavni:hover { background: var(--rose); }
.kos-glavni:disabled { opacity: 0.6; cursor: wait; }
.kos-povezava {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.92rem; color: var(--ink-muted);
  text-decoration: underline; text-underline-offset: 3px; padding: 0.4rem 0;
}
.kos-povezava:hover { color: var(--ink); }
.kos-sredina { display: block; margin: 0.6rem auto 0; }

.kos-prazna { text-align: center; padding: 2.5rem 0.5rem; }
.kos-prazna > p:first-child { font-family: var(--font-hand); font-size: 1.6rem; color: var(--ink-soft); }

/* obrazec */
.kos-obrazec { display: flex; flex-direction: column; gap: 0.85rem; }
.kos-polje { display: flex; flex-direction: column; gap: 0.3rem; }
.kos-polje label, .kos-placilo legend {
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 500;
}
.kos-polje input, .kos-polje textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: white; border: 1px solid var(--sage-pale); border-radius: 3px;
  padding: 0.65rem 0.8rem; width: 100%;
  -webkit-appearance: none; appearance: none;
}
.kos-polje input:focus, .kos-polje textarea:focus { outline: none; border-color: var(--rose); }
.kos-polje input.samodejno { background: #f4f7f1; }
.kos-dva { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.75rem; align-items: end; }
.kos-dva .kos-polje label { white-space: nowrap; }
.kos-namig { font-size: 0.84rem; color: var(--rose); margin-top: -0.4rem; min-height: 0; }
.kos-namig:empty { display: none; }

.kos-placilo { border: none; display: flex; flex-direction: column; gap: 0.5rem; }
.kos-placilo legend { margin-bottom: 0.4rem; }
.kos-placilo label {
  display: flex; gap: 0.7rem; align-items: flex-start;
  background: white; border: 1px solid var(--sage-pale); border-radius: 3px;
  padding: 0.7rem 0.85rem; cursor: pointer;
  transition: border-color 0.2s ease;
}
.kos-placilo label:has(input:checked) { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose) inset; }
.kos-placilo input { margin-top: 0.3rem; accent-color: var(--rose); }
.kos-placilo strong { display: block; font-weight: 500; }
.kos-placilo small { display: block; font-size: 0.84rem; color: var(--ink-muted); line-height: 1.45; }

.kos-soglasje { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.45; cursor: pointer; }
.kos-soglasje input { margin-top: 0.25rem; accent-color: var(--rose); width: 18px; height: 18px; flex: none; }
.kos-soglasje a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.kos-napaka { background: #f7e3e5; color: #8a3c46; padding: 0.6rem 0.8rem; border-radius: 3px; font-size: 0.9rem; }

/* potrditev */
.kos-hvala { margin-bottom: 0.6rem; }
.kos-roka { font-family: var(--font-hand); font-size: 1.9rem; color: var(--rose); line-height: 1.2; margin-bottom: 0.4rem; }
.kos-placaj {
  background: white; border-radius: 3px;
  padding: 1rem 1.1rem; margin: 1rem 0;
  box-shadow: 0 2px 12px rgba(45, 38, 32, 0.05);
}
.kos-placaj h3 {
  font-family: var(--font-display); font-weight: 400; font-size: 1.15rem;
  font-variation-settings: "SOFT" 80; margin-bottom: 0.6rem;
}
.kos-placaj dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.9rem; font-size: 0.92rem; }
.kos-placaj dt { color: var(--ink-muted); }
.kos-placaj dd { overflow-wrap: anywhere; }
.kos-placaj dd.poudarek { font-weight: 500; letter-spacing: 0.01em; }
.kos-qr-vrsta { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.kos-qr { width: 255px; height: 255px; max-width: 100%; image-rendering: pixelated; border: 1px solid rgba(45, 38, 32, 0.08); }
.kos-qr-vrsta dl { width: 100%; }
@media (max-width: 360px) { .kos-qr { width: 170px; height: 170px; } }

/* izbira možnosti */
.kos-modal {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(45, 38, 32, 0.4);
  display: grid; place-items: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.kos-modal.odprt { opacity: 1; pointer-events: auto; }
.izb-okno {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--paper);
  border-radius: 4px;
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: var(--shadow-paper-lift);
}
.izb-okno .kos-zapri { position: absolute; top: 0.6rem; right: 0.6rem; }
.izb-glava { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 1rem; padding-right: 2rem; }
.izb-glava img { width: 72px; height: 72px; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 4px rgba(45, 38, 32, 0.15); }
.izb-predpona { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rose); }
.izb-glava h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; font-variation-settings: "SOFT" 100; line-height: 1.2; }
.izb-opcije { border: none; display: flex; flex-direction: column; gap: 0.45rem; }
.izb-opcije legend { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.45rem; }
.izb-opcija {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.65rem; align-items: center;
  background: white; border: 1px solid var(--sage-pale); border-radius: 3px;
  padding: 0.65rem 0.8rem; cursor: pointer;
}
.izb-opcija:has(input:checked) { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose) inset; }
.izb-opcija input { accent-color: var(--rose); }
.izb-oznaka { display: flex; flex-direction: column; font-size: 0.96rem; line-height: 1.3; }
.izb-oznaka small { font-size: 0.8rem; color: var(--ink-muted); }
.izb-cena { font-weight: 500; white-space: nowrap; }
.izb-kolicina { display: flex; justify-content: space-between; align-items: center; margin-top: 0.9rem; font-size: 0.92rem; color: var(--ink-soft); }
.izb-kolicina[hidden] { display: none; }
.izb-kolicina .kol { margin-top: 0; }

/* obvestilo */
.kos-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 1200;
  transform: translate(-50%, 20px);
  max-width: min(92vw, 520px);
  background: var(--ink);
  color: white;
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(45, 38, 32, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.kos-toast.viden { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.kos-toast-pov {
  background: none; border: none; color: var(--rose-pale); cursor: pointer;
  font-family: var(--font-body); font-size: 0.92rem; text-decoration: underline; text-underline-offset: 2px;
  margin-left: 0.35rem; padding: 0;
}

@media (max-width: 520px) {
  .kos-gumb { right: 1rem; bottom: 1rem; }
  .kos-toast { bottom: 5.2rem; }
  .kos-vsebina { padding: 1rem 1.1rem 2rem; }
  .kos-glava { padding: 0.9rem 1.1rem; }
  .kos-dva { grid-template-columns: 7rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .kos-plosca, .kos-ozadje, .kos-modal, .kos-toast, .kos-gumb { transition: none; }
}
