/* Hero */
.product-hero {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.product-hero__media img {
  width: 100%;
  aspect-ratio: 952/635;
  object-fit: contain;
  border-radius: 10px;
  display: flex;
  width: 44.25rem;
  height: 30.4375rem;
  padding: 0.0625rem 6.9375rem 0 6.9375rem;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.product-title {
  margin: 8px 0;
  text-align: left;
}
.product-lead {
  margin: 0 0 8px;
  font-weight: 400;
}

.product-datasheet a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--Blue);
  color: var(--Blue);
}
.product-datasheet a:hover {
  box-shadow: var(--shadow-sm);
}

/* Spec kartice */
.product-specs__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.spec {
  border-radius: 10px;
  background: var(--Light-Grey);
  padding: 16px;
  min-height: 80px;
}
.spec__title {
  font-weight: 700;
  margin-bottom: 6px;
}
.spec__text {
  font-weight: 400;
}

@media (max-width: 1023px) {
  .product-specs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .product-specs__grid {
    grid-template-columns: 1fr;
  }
}

/* Akordeon */
.c-acc {
  border-top: 1px solid var(--Medium-Grey);
}
.c-acc:first-child {
  border-top: 0;
}
.c-acc__btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-weight: 700;
  text-align: left;
  border: 0;
  background: none;
  cursor: pointer;
}
.c-acc__icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background-size: contain;
  background-repeat: no-repeat;
}
.c-acc__icon--plus {
  background-image: url("/themes/custom/cicek_theme/icons/plus.svg");
}
.c-acc__icon--minus {
  background-image: url("/themes/custom/cicek_theme/icons/minus.svg");
  display: none;
}
.c-acc[open] .c-acc__icon--plus {
  display: none;
}
.c-acc[open] .c-acc__icon--minus {
  display: block;
}
.product-accordion .js-accordion > :not(h3) {
  /* safety: ako urednik stavi sadržaj prije prvog h3 */
  margin-bottom: 1rem;
}

/* Galerija */
.product-gallery__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.product-gallery__grid a {
  display: block;
  border: 1px solid var(--Medium-Grey);
  border-radius: 10px;
  overflow: hidden;
}
.product-gallery__grid img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 767px) {
  .product-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.product-gallery__grid a {
  display: block;
  width: 100%;
  border: 1px solid var(--Medium-Grey);
  border-radius: 10px;
  overflow: hidden;
}
.product-gallery__grid img {
  display: block;
  width: 100%;
  height: auto;
}
.p-product {
  position: relative;
}
/* Hero u 2 stupca na ≥992px, stack na manjim */
.product-hero__container {
  position: relative;
  display: grid;
  gap: 5rem; /* razmak između <header> i .product-specs */
  z-index: 0; /* formira stacking context za ::after ispod sadržaja */
  margin-bottom: 8.75rem;
}
.product-hero__container::after {
  content: " ";
  position: absolute;
  inset: 0;
  top: inherit;
  z-index: -1;
  bottom: 0px;
  height: 400px;
  opacity: 0.1;
  /* pointer-events: none; */
  background-repeat: no-repeat;
  background-image: url("/themes/custom/cicek_theme/icons/hero-bg.svg");
}
.product-specs {
  width: 100%;
}
@media (min-width: 992px) {
  .product-hero {
    grid-template-columns: 1.4fr 1fr;
  } /* slika šira, tekst desno */
}

.product-hero__media img {
  /*  width: 100%; 
    height: auto;
    display: block;
    aspect-ratio: 952 / 635;
    object-fit: contain; /* bez croppanja, sve vidljivo */
  /* border-radius: 10px;*/
}
.product-hero__media {
  border-radius: 0.625rem;
  border: 1px solid var(--Medium-Grey, #e9e9e9);
  background: #fff;
}
.product-hero__meta {
  display: grid;
  gap: 12px;
  align-content: start;
}
.product-title {
  margin: 0;
}
.product-lead {
  margin: 0;
  font-weight: 400;
}
.product-datasheet a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--Blue);
  color: var(--Blue);
}
.product-datasheet a:hover {
  box-shadow: var(--shadow-sm);
}
/* Sakrij default marker i pripremi gumb */
.c-acc__btn::-webkit-details-marker {
  display: none;
}
.c-acc__btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-weight: 700;
  text-align: left;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Ikone +/− */
.c-acc__icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: center/contain no-repeat;
}
.c-acc__icon--plus {
  background-image: url("/themes/custom/cicek_theme/icons/plus.svg");
}
.c-acc__icon--minus {
  background-image: url("/themes/custom/cicek_theme/icons/minus.svg");
  display: none;
}
.c-acc[open] .c-acc__icon--plus {
  display: none;
}
.c-acc[open] .c-acc__icon--minus {
  display: inline-block;
}

/* Panel s glatkom animacijom visine */
.c-acc .c-acc__panel {
  overflow: hidden;
  padding-bottom: 16px;
}

/* Animacija details elementa */
.c-acc {
  transition: height 0.3s ease-out;
  height: auto;
}

.c-acc:not([open]) {/*
  height: 0;
  overflow: hidden;*/
}

.c-acc[open] {
  height: auto;
}

/* Unutarnji wrap sadržaja (radi paddinga i sigurnog overflow-a) */
.c-acc__inner {
  padding-bottom: 16px;
}

/* Dvostupčani raspored: naslov lijevo, accordion desno */
.section-split {
  display: grid;
  gap: 24px;
  align-items: start;
}
@media (min-width: 992px) {
  .section-split {
    grid-template-columns: minmax(220px, 1fr) 2fr;
  }
}
.section-split__title {
  margin: 0;
  font-weight: 700;
}
@media (min-width: 992px) {
  .section-split__title.is-sticky {
    position: sticky;
    top: calc(6.875rem + 16px); /* visina sticky headera + malo lufta */
  }
}
/* --- Product side gallery (1 velika + 4 thumb-a desno) --- */
.p-gallery--side {
  display: grid;
  gap: 12px;
}
@media (min-width: 992px) {
  .p-gallery--side {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.p-gallery__main {
  display: block;
  border: 1px solid var(--Medium-Grey);
  border-radius: 10px;
  overflow: hidden;
}
.p-gallery__main img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 952 / 635;
  object-fit: contain;
}

.p-gallery__rail {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}
.p-gallery__thumb {
  appearance: none;
  border: 1px solid var(--Medium-Grey);
  background: #fff;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  transition: box-shadow 0.12s ease, transform 0.12s ease,
    border-color 0.12s ease;
}
.p-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.p-gallery__thumb:is(:hover, :focus) {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.p-gallery__thumb.is-active {
  border-color: var(--Blue);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--Blue) 30%, transparent);
}

.p-gallery__hidden {
  display: none;
}

/* Mobile fallback: thumbs ispod kao traka (horizontalni scroll) */
@media (max-width: 991.98px) {
  .p-gallery--side {
    grid-template-columns: 1fr;
  }
  .p-gallery__rail {
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .p-gallery__thumb {
    width: 104px;
    height: 78px;
    aspect-ratio: auto;
  }
}
