/* ====================================================================
   site.css — dorade izgleda (učitava se zadnji, nakon ostalih stilova)
==================================================================== */

/* --------------------------------------------------------------------
   Linkovi: jasno podcrtani, bez strelica
-------------------------------------------------------------------- */
.text-link,
.product-link,
.email-link,
.legal-footer a,
.footer-contact a,
.connection-section .text-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  border-bottom: 0;
  color: var(--plum);
}
.text-link:hover,
.product-link:hover,
.email-link:hover,
.legal-footer a:hover,
.footer-contact a:hover {
  color: var(--plum-dark);
  text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------
   Podnožje: kontakt
-------------------------------------------------------------------- */
.footer-contact a {
  font-size: 14px;
}
.footer-contact .footer-contact-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
  margin: 0 0 4px;
}

/* --------------------------------------------------------------------
   Poklon: planer učenja (stranica seta Planiranje učenja)
-------------------------------------------------------------------- */
.included-items .gift-highlight .gift-text {
  margin: 4px 0 0;
  font-size: 14px;
  letter-spacing: normal;
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------------------------------
   Traka "Čemu služi · Za dijete · …" na stranicama setova i kompleta:
   linkovi s podlogom, centrirano, lomi se u više redova (bez
   vodoravnog scrollanja na mobitelu)
-------------------------------------------------------------------- */
.detail-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 18px 0;
  overflow: visible;
  font-size: 12.7px;
}
.detail-nav a {
  white-space: nowrap;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.detail-nav a:hover {
  background: var(--lavender);
  color: var(--plum-dark);
}
@media (max-width: 680px) {
  .detail-nav {
    gap: 8px;
    padding: 14px 0;
    font-size: 12px;
  }
  .detail-nav a {
    padding: 7px 12px;
  }
}

/* --------------------------------------------------------------------
   "Istražite ostale setove": kartice koje jasno izgledaju kao linkovi
-------------------------------------------------------------------- */
.related-links a {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  transition:
    background 0.2s,
    border-color 0.2s;
}
.related-links a:first-child {
  border-top: 1px solid var(--line);
}
.related-links strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.related-links a:hover {
  background: var(--lavender);
  border-color: #c9b8c4;
}
@media (max-width: 680px) {
  .related-links {
    gap: 10px;
  }
  .related-links a {
    padding: 16px 18px;
  }
}

/* --------------------------------------------------------------------
   Početna: setovi i komplet u jednom carouselu
-------------------------------------------------------------------- */
.product-carousel {
  --carousel-slide: calc((100% - 28px) / 2);
  --carousel-gap: 28px;
}
.product-carousel .product {
  height: auto;
}
.product-carousel .carousel-track {
  align-items: stretch;
  padding-bottom: 4px;
}
.product .product-photo {
  aspect-ratio: 3/2;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.product .product-photo > img {
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}
.product .product-photo:hover > img {
  transform: scale(1.03);
}
.product-copy .product-button {
  margin-top: auto;
  align-self: flex-start;
  font-size: 14px;
  gap: 18px;
}

/* Kartica kompleta */
.product.komplet {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--white);
}
.product.komplet .product-photo {
  background: #e9e3e7;
}
.product.komplet .eyebrow {
  color: var(--white);
  opacity: 0.8;
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.product.komplet h3 {
  color: var(--white);
}
.product.komplet .komplet-lead {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 18px;
  min-height: 0;
  color: var(--white);
  opacity: 0.9;
}
.product.komplet .komplet-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 22px;
  min-height: 0;
  color: var(--white);
}
.product.komplet .komplet-price strong {
  font: 400 36px/1.2 var(--serif);
}
.product.komplet .komplet-price small {
  font-size: 12px;
  opacity: 0.85;
}

@media (max-width: 900px) {
  .product-carousel {
    --carousel-slide: 86%;
    --carousel-gap: 16px;
  }
}

/* --------------------------------------------------------------------
   Pravni kutak: linkovi i kartice-linkovi jasno označeni
-------------------------------------------------------------------- */
.legal-copy .text-link {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.legal-copy .legal-topic h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.legal-copy .legal-topic:hover {
  background: var(--lavender);
}

/* Traka sa sadržajem stranice: okvir je dovoljan, bez podvlačenja */
.detail-nav a {
  text-decoration: none;
}

/* --------------------------------------------------------------------
   Stranice setova i kompleta: cijena u istom redu s gumbom za upit
-------------------------------------------------------------------- */
.detail-buy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 28px;
  width: fit-content;
  max-width: 100%;
  margin-top: 30px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.detail-price {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.detail-price strong {
  font: 400 34px/1.1 var(--serif);
  color: var(--plum-dark);
  white-space: nowrap;
}
.detail-price small {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.detail-buy .button {
  font-size: 13.8px;
  gap: 18px;
}
@media (max-width: 680px) {
  .detail-buy {
    width: 100%;
    padding: 16px;
  }
  .detail-buy .button {
    flex: 1 1 auto;
    justify-content: space-between;
  }
}

/* Desni stupac stranice seta: carousel je sada zadnji element; poništi
   stil koji je bio namijenjen bloku s cijenom (product-photos.css) */
.set-aside > .carousel:last-child {
  display: block;
  padding: 0;
  border-top: 0;
}

/* Komplet: opis kompleta kao zaseban redak iznad cijene i gumba */
.detail-buy-label {
  flex-basis: 100%;
  margin: 0 0 -6px;
  font-size: 12.7px;
  color: var(--muted);
}

/* Fotografije u carouselu: isti okvir za sve, da carousel ne mijenja visinu */
.photo-carousel .gallery-stage {
  aspect-ratio: 3 / 2;
}
.photo-carousel .gallery-stage > img {
  height: 100%;
  object-fit: contain;
}

/* Cijena i gumb u istom redu i u užem stupcu (komplet): napomena o
   dostavi smije se prelomiti */
.detail-buy {
  column-gap: 22px;
}
.detail-price small {
  max-width: 150px;
}
@media (min-width: 681px) and (max-width: 1150px) {
  .detail-buy {
    padding: 16px;
    column-gap: 16px;
  }
  .detail-price small {
    max-width: 130px;
  }
  .detail-buy .button {
    padding: 14px 18px;
    gap: 12px;
    font-size: 12.7px;
  }
}

/* Podnožje: puni kontakt podaci */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 320px;
}
.footer-contact p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}
.footer-contact .footer-contact-name {
  color: var(--ink);
}

/* Komplet, "Što znači učiti uz cijeli sustav?": linija u boji seta iznad
   svakog reda (iste boje kao "Četiri područja" na početnoj) */
.system-rows > .system-row {
  border-top: 3px solid var(--line);
}
.system-rows > .system-row:nth-child(1) {
  border-top-color: #e6ca82;
}
.system-rows > .system-row:nth-child(2) {
  border-top-color: #b2d5e4;
}
.system-rows > .system-row:nth-child(3) {
  border-top-color: #bed2a5;
}
.system-rows > .system-row:nth-child(4) {
  border-top-color: #cbb0d8;
}
.system-rows > .system-row + .system-row {
  margin-top: 18px;
}

/* --------------------------------------------------------------------
   Hero stranice seta/kompleta: tekst i okvir s cijenom lijevo,
   fotografije desno. Na mobitelu: tekst -> fotografije -> cijena.
-------------------------------------------------------------------- */
.detail-hero {
  grid-template-areas:
    '. aside'
    'text aside'
    'order aside'
    '. aside';
  grid-template-rows: 1fr auto auto 1fr;
  row-gap: 0;
}
.detail-hero > div:first-child {
  grid-area: text;
}
.detail-hero > .set-aside {
  grid-area: aside;
}
.detail-hero > .detail-order {
  grid-area: order;
}
@media (max-width: 680px) {
  .detail-hero {
    grid-template-areas:
      'text'
      'aside'
      'order';
    grid-template-rows: auto;
    row-gap: 30px;
  }
  .detail-order .detail-buy {
    margin-top: 0;
  }
}

/* --------------------------------------------------------------------
   Linkovi na pojedinačne setove ("Istražite ostale setove"): u boji
   seta, svijetla pozadina + tamniji tekst (kontrast ≥ 4,5:1)
-------------------------------------------------------------------- */
.related-links a {
  --set-bg: var(--white);
  --set-fg: var(--plum);
  --set-border: var(--line);
  background: var(--set-bg);
  border-color: var(--set-border);
  color: var(--set-fg);
}
.related-links a[href*='/setovi/planiranje-ucenja/'] {
  --set-bg: #ecdfb8;
  --set-fg: #725a2c;
  --set-border: #dccb97;
}
.related-links a[href*='/setovi/aktivno-citanje/'] {
  --set-bg: #d6e3e5;
  --set-fg: #46666a;
  --set-border: #bcd1d4;
}
.related-links a[href*='/setovi/mentalne-mape/'] {
  --set-bg: #dce6cf;
  --set-fg: #4d6638;
  --set-border: #c3d3b0;
}
.related-links a[href*='/setovi/aktivno-prisjecanje/'] {
  --set-bg: #dfd6e6;
  --set-fg: #654f70;
  --set-border: #cbbdd5;
}
.related-links a:first-child {
  border-top-color: var(--set-border);
}
.related-links a > span {
  color: var(--set-fg);
  opacity: 0.75;
}
.related-links a:hover {
  background: var(--set-bg);
  border-color: var(--set-fg);
  filter: brightness(0.97);
}

/* Obrazac: poruka kad nije odabran nijedan proizvod */
.inquiry .ms-error {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #a33a3a;
}
.inquiry .multiselect-toggle[aria-invalid='true'] {
  border-color: #a33a3a;
}

/* --------------------------------------------------------------------
   Ciljevi za dodir: najmanje 24 px (WCAG 2.2, 2.5.8) za samostalne
   linkove i gumbe u podnožju i breadcrumbu
-------------------------------------------------------------------- */
.legal-footer a,
.breadcrumb a,
.footer-contact a,
.footer-meta button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.footer-contact {
  gap: 2px;
}

/* "Odakle krenuti?" na mobitelu: preporuka odmah ispod odabrane opcije */
@media (max-width: 680px) {
  .finder-options .finder-result {
    min-height: 0;
    margin: 0 0 14px;
    border-radius: 0 0 5px 5px;
    box-shadow: inset 3px 0 var(--plum);
    animation: finder-reveal 0.25s ease-out;
  }
}
@keyframes finder-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .finder-options .finder-result {
    animation: none;
  }
}

/* Sporedni gumb (npr. "Istražite setove"): prozirna pozadina i obrub kao
   gumb "Naruči" u izborniku */
.button.button-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid #ae96a6;
}
.button.button-outline:hover {
  background: #f1ebf2;
  color: var(--plum-dark);
}
.button.button-outline span {
  font-size: 18px;
  line-height: 1;
}

/* "Odakle krenuti?": strelica udesno u svakoj opciji */
.finder-options button svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--plum);
  transition: transform 0.2s;
}
.finder-options button:hover svg,
.finder-options button.selected svg {
  transform: translateX(3px);
}

/* Obrazac: mali pomoćni tekst ispod polja (npr. adresa za dostavu) */
.inquiry .field-hint {
  margin: -8px 0 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* Bazna cijena (sidrena cijena) uz istaknutu cijenu */
.base-price {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.85;
}

/* Cjenik: tablica (na mobitelu se tablica pomiče vodoravno unutar okvira) */
.price-table-wrap {
  overflow-x: auto;
  margin: 24px 0 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.price-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.price-table th,
.price-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.price-table thead th {
  background: #f1ebf2;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.price-table tbody th {
  font-weight: 400;
}
.price-table tbody tr:last-child > * {
  border-bottom: 0;
}
.price-table .num {
  text-align: right;
  white-space: nowrap;
}
.price-downloads {
  padding-left: 20px;
}
.price-downloads li {
  margin: 6px 0;
}

/* Plaćanje i dostava: bazna cijena u zasebnom retku ispod cijene */
.legal-price-list p {
  flex-wrap: wrap;
  row-gap: 0;
}
.legal-price-list .base-price {
  flex-basis: 100%;
  margin-top: 2px;
  text-align: right;
}
@media (max-width: 680px) {
  .legal-price-list .base-price {
    text-align: left;
  }
}

/* Početna, kartice setova: cijena i bazna cijena iznad gumba */
.product-copy .set-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: auto 0 18px;
  color: var(--plum-dark);
}
.product-copy .set-price strong {
  font: 400 30px/1.2 var(--serif);
}
.product-copy .set-price .base-price {
  margin-top: 0;
  color: var(--muted);
  opacity: 1;
}
.product-copy .set-price + .product-button {
  margin-top: 0;
}
/* Komplet: cijena odmah iznad gumba, kao u karticama setova */
.product.komplet .komplet-price {
  margin-top: auto;
}
.product.komplet .komplet-price + .product-button {
  margin-top: 0;
}
