@import url("https://fonts.googleapis.com/css2?family=Afacad:ital,wght@0,400..700;1,400..700&family=League+Spartan:wght@100..900&display=swap");
html {
  background-color: rgb(255, 255, 255);
  color: #ffffff;
  padding: 0%;
  margin: 0;
  font-family: "Afacad";
  width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0%;
  overflow-x: hidden;
}

.webshop {
  margin-top: 19.5rem;
  display: grid;
  grid-template-columns: 320px 1fr; /* left filter | right products */
  gap: 24px;
  padding: 24px clamp(12px, 3vw, 32px) 64px;
  background: #efefef;
}

.webshop-col-1 {
  position: sticky;
  top: 9.5rem; /* ispod sticky headera */
  align-self: start;
  height: fit-content;
}

.filter-sort {
  background: #fff;
  border: 1px solid #e9eff7;
  border-radius: 18px;
  padding: 18px 18px 8px;
}

/* === Search suggest dropdown === */
.search-container {
  position: relative;
}
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e9eff7;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  z-index: 100000; /* iznad navigacije */
  max-height: 420px;
  overflow: auto;
}
.search-suggest.hidden {
  display: none;
}
.search-suggest ul {
  list-style: none;
  margin: 0;
  padding: 6px;
}
.search-suggest li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.search-suggest li:hover,
.search-suggest li.is-active {
  background: #f4f7ff;
}
.search-suggest li img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border: 1px solid #eef2fb;
  border-radius: 8px;
  background: #fff;
}
.search-suggest .ss-title {
  color: #2b2b2b;
  font-weight: 600;
}
.search-suggest .ss-price {
  color: #22549f;
  font-weight: 700;
}

/* === Product Modal === */
.product-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  z-index: 999999;
}
.product-modal.is-open {
  display: grid;
  place-items: center;
}
.pm-dialog {
  width: min(900px, 92vw);
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid #e9eef7;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow: auto;
}
.pm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pm-title {
  font-family: "League Spartan";
  font-weight: 800;
  font-size: 1.6rem;
  color: #2b2b2b;
  margin: 0;
}
.pm-attrs {
  color: #4d5363;
}
.pm-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}
.pm-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}
.pm-img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  border: 1px solid #ebeff7;
  border-radius: 12px;
  background: #fff;
}
.pm-price .now {
  font-size: 1.6rem;
  font-weight: 800;
  color: #2b2b2b;
}
.pm-price .was {
  color: #9aa6c5;
  text-decoration: line-through;
  margin-left: 8px;
}
.pm-desc {
  color: #4d5363;
  margin-top: 6px;
}
@media (max-width: 700px) {
  .pm-body {
    grid-template-columns: 1fr;
  }
}

/* tiny spacing for the toolbar */
.product-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}

/* lijevi panel sekcije */
.fs-section + .fs-section {
  margin-top: 18px;
}
.fs-title {
  font-family: "League Spartan";
  font-weight: 800;
  color: #2b2b2b;
  font-size: 1.25rem;
  margin: 0 0 6px;
  border: transparent;
  background-color: transparent;
}
.fs-attr-row {
  flex-wrap: wrap;
}
.fs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fs-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  color: #2b2b2b;
}
.fs-list input[type="checkbox"] {
  accent-color: #22549f;
}
.fs-cat-btn {
  display: block;
  width: 100%;
  padding: 6px 2px;
  text-align: left;
  background: none;
  border: none;
  color: #1d2538;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}
.fs-cat-btn:hover,
.fs-cat-btn:focus-visible {
  color: #22549f;
  outline: none;
}
.fs-link {
  text-decoration: none;
  color: #2b2b2b;
}
.fs-link:hover {
  color: #22549f;
}

/* === Right column === */
.webshop-col-2 {
  min-width: 0;
  max-width: 65vw;
  margin-left: 8vw;
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.breadcrumbs {
  font-size: 0.95rem;
  color: #6a748f;
}
.breadcrumbs a {
  color: #22549f;
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}

.product-title {
  font-family: "League Spartan";
  font-weight: 800;
  color: #2b2b2b;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin: 8px 0;
}

/* sort dropdown */
.sort-wrap {
  margin-left: auto;
}
.sort-select {
  border: 1px solid #d9def0;
  border-radius: 12px;
  background: #fff;
  padding: 8px 12px;
  font-family: inherit;
  color: #2b2b2b;
}

/* grid kartica — koristi tvoj .product-card stilove */
.product-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
}

/* pagination button */
.shop-load-more {
  display: flex;
  justify-content: center;
  margin: 18px 0 8px;
}
.shop-load-more button {
  background: #22549f;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(34, 84, 159, 0.25);
}
.shop-load-more button:hover {
  background: #0a387e;
}

.shop-btn {
  background-color: #22549f;
  padding: 1rem;
  width: 10rem;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.596);
  transition: all ease-in-out 0.5s;
  text-align: center;
  border-radius: 5em;
  font-size: 1.2rem;
}

.shop-btn:hover {
  background-color: #0a387e;
  transform: scale(1.1);
}

/* Product Card */
.product-card {
  background: #fff;
  border: 1px solid #ebeff7;
  border-radius: 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 430px;
  height: fit-content;
  width: 300px;
}

.pc-option-select, .pm-option-select{
  border: transparent;
  background-color: #c5d9f8;
  font-family: "Afacad";
  width: 100%;
  padding: 0.2rem;
  border-radius: 0.2rem;
}

.product-card .card-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* >>> ispuni visinu kartice iznad gumba */
  padding: 0.9rem;
  justify-content: space-between;
}

.pc-add-to-cart {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0%;
  margin: 0%;
  align-items: end;
}

.pc-add-to-cart .pc-add {
  display: flex;
  width: 100%;
  height: 3rem;
  border-top-right-radius: 0%;
  border-top-left-radius: 0%;
  bottom: 0;
}

.pc-add {
  margin-left: auto;
  align-items: center;
  justify-content: center;
  font-family: "Afacad";
  font-size: 1rem;
  background: #22549f;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 0.55rem 0.9rem;
  border-radius: 2rem;
  transition: 0.2s;
}
.pc-add:hover {
  background: #0a387e;
}

.product-card .pc-img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  max-height: fit-content;
}

/* Blok s kodom + naslovom */
.cc-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pc-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 4px;
  height: 100%;
}

.product-card.no-desc .card-content {
  display: flex;
  flex-direction: column;
}

.product-card.no-desc .cc-top {
  flex: 1 1 auto; /* zauzmi preostali prostor iznad .pc-price */
  display: flex;
  align-items: center; /* vodoravno centriraj tekst */
  justify-content: center; /* okomito centriraj unutar tog prostora */
  text-align: center;
}

.pc-code {
  color: #7a86a6;
  font-size: 0.8rem;
}
.pc-title {
  color: #2b2b2b;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  font-family: "League Spartan";
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.25em * 2);
  width: 100%;
}

.pc-description {
  color: #4d5363;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1; /* future-friendly */
  overflow: hidden;
}
.pc-description:empty {
  display: none;
}

.pc-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: fit-content;
}

.price-display {
  display: flex;
  flex-direction: column;
}

.pc-price .now {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2b2b2b;
}
.pc-price .was {
  color: #9aa6c5;
  text-decoration: line-through;
  font-size: 0.95rem;
}
.pc-actions {
  display: flex;
  align-items: center;
  margin-top: 0.25rem;
}
.pc-qty {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1rem;
}
.pc-qty button {
  width: 25px;
  height: 28px;
  border: transparent;
  background: #c0c0c0;
  cursor: pointer;
  transition: all 0.5s ease;
}

.pc-qty button:hover {
  background-color: #929292;
}

.pc-price .pc-actions .pc-qty button:nth-child(1) {
  border-radius: 0%;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.pc-qty button:nth-child(3) {
  border-radius: 0%;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.pc-qty input {
  width: 42px;
  height: 28px;
  border: transparent;
  background-color: #d9d9d9;
  text-align: center;
  padding: 0%;
}

.pc-heart {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.8;
}

:root {
  --kc-bg: #2c2c2c;
  --kc-text: #f2f2f2;
  --kc-dim: #cfcfcf;
  --kc-accent: #2f56a6;
}

/* Responsive */

@media (max-width: 1383px) {
  .webshop {
    margin-top: 27rem;
  }
}
@media (max-width: 1115px) {
  .webshop-col-2 {
    margin-left: 0;
  }
}
@media (max-width: 1023px) {

  .pc-title {
    line-height: 1.2;
    height: fit-content;
  }
}
@media (max-width: 980px) {
  .webshop {
    grid-template-columns: 1fr;
  }
  .webshop-col-1 {
    position: static;
  }
  .webshop-col-2 {
    max-width: 100vw;
    width: 100%;
  }
  .product-container {
    justify-content: center;
  }

  .filter-sort {
    padding: 12px;
    border-radius: 14px;
  }

  .fs-section {
    border: 1px solid #e9eff7;
    border-radius: 12px;
    background: #fff;
  }
  .fs-section + .fs-section {
    margin-top: 12px;
  }

  .fs-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    font-family: "League Spartan";
    font-weight: 800;
    color: #2b2b2b;
    font-size: 1.1rem;
    cursor: pointer;
    background: transparent;
    border: transparent;
  }
  .fs-title::after {
    content: "▾";
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
  }
  .fs-section.is-open .fs-title::after {
    transform: rotate(180deg);
  }

  .fs-body {
    display: none;
    padding: 0 14px 10px;
  }
  .fs-section.is-open .fs-body {
    display: block;
  }

  /* unutarnji spacing */
  .fs-list {
    padding-top: 6px;
  }
}
@media (max-width: 703px) {
  .webshop {
    margin-top: 9rem;
  }
  .product-card {
  height: fit-content;
}
}

@media (max-width: 455px) {
  .webshop {
    padding-left: 8px;
    padding-right: 8px;
  }

  .product-container {
    justify-content: center;
  }
  .product-card {
    width: 180px;
    border-radius: 1rem;
    min-height: 370px;
  }
  .pc-img {
    height: 95px;
  }

  .pc-qty button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
  .pc-qty input {
    width: 32px;
    height: 26px;
  }


  .pc-title {
    font-size: 0.95rem;
  }
  .pc-price .now {
    font-size: 1.05rem;
  }
  .pc-price{
    max-height: 40px;
    align-items: center;
  }
  .pc-add {
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
    border-radius: 1rem;
    height: 2rem;
  }
}

/* ≤425px */
@media (max-width: 425px) {
  .webshop {
    margin-top: 7.5rem;
  }
  .pc-img {
    height: 105px;
  }

  .pc-qty button {
    width: 24px;
    height: 24px;
  }
  .pc-qty input {
    width: 35px;
    height: 24px;
  }
  .pm-dialog {
    overflow: auto;
    padding: 5vw;
  }
}

/* ≤375px */
@media (max-width: 395px) {
  .webshop {
    margin-top: 7rem;
  }
  .product-card {
    max-width: 160px;
    border-radius: 1rem;
    height: max-content;
  }
  .product-container{
    gap: 7px;
    height: fit-content;
  }
  .pc-img {
    height: 95px;
  }

  .pc-qty button {
    width: 22px;
    height: 22px;
  }
  .pc-qty input {
    width: 28px;
    height: 22px;
  }
  .pc-title {
    font-size: 0.9rem;
    line-height: 1.2;
  }
  .product-card .pc-add {
  display: block; /* ili inline-flex ako imaš ikone */
  width: 100%;
  box-sizing: border-box;
  align-self: stretch; /* osiguraj 100% širine i u flex kontekstu */
  margin-top: auto; /* gumb ide na dno kartice */
}
}

/* ≤320px  (račun: 2*148 + 8 gap + 2*8 padding ≈ 320) */
@media (max-width: 320px) {
  .webshop {
    margin-top: 6rem;
  }

  .product-card{
    min-height: 350px;
    max-height: 360px;
    width: 140px;
  }

  .pc-img {
    height: 84px;
  }

  .pc-qty button {
    width: 20px;
    height: 20px;
  }
  .pc-qty input {
    width: 26px;
    height: 20px;
  }

  .pc-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--title-lines, 2);
    line-clamp: var(--title-lines, 2);
    overflow: hidden;
    font-size: 0.85rem;
  }

  .pc-add {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
  }
}


