/* ================================
   Product Info Accordion Menu
================================ */

.product-tab-bar{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;

  /*border: 1px solid #e2e4ea;*/
  border-radius: 14px;
  overflow: hidden;
}

/* Button row */
.product-tab{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #f5f7fb;
  border: none;
  border-radius: 0;

  padding: clamp(16px, 2.1vw, 21px);

  cursor: pointer;
  color: #245069;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);

  transition: transform 0.12s ease, background 0.12s ease;
}

/* separator linija između itema */
.product-tab + .product-tab{
  border-top: 1px solid #e2e4ea;
}

/* radius samo prvom i zadnjem */
.product-tab:first-child{
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
.product-tab:last-child{
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.product-tab:hover{
  transform: scale(1.01);
  background: #eceef3;
}

/* ================================
   LEFT SIDE (ICON + TITLE)
================================ */

.oo-tab-left{
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1vw, 10px); /* malo manji razmak */
  min-width: 0;
}

/* 🎨 LEFT ICON — smanjeno ~20% */
.oo-tab-icon{
  width: clamp(14px, 1.8vw, 18px);
  height: clamp(14px, 1.8vw, 18px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.oo-tab-icon img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.oo-tab-title{
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================
   RIGHT INDICATOR (ARROW)
================================ */

/* 🔽 ARROW wrapper — smanjeno ~20% */
.oo-tab-indicator{
  width: clamp(14px, 1.8vw, 18px);
  height: clamp(14px, 1.8vw, 18px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.oo-tab-indicator img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;

  /* rotacija animacija */
  transition: transform 0.22s ease;
  transform-origin: 50% 50%;
}

/* kad je otvoreno: arrow se rotira */
.product-tab[aria-expanded="true"] .oo-ind-arrow{
  transform: rotate(180deg);
}


/* ================================
   Panel (tab-section) - SMOOTH
================================ */

.tab-section{
  width: 100%;
  background-color: #fbfbfb;

  overflow: hidden;
  margin: 0;
  padding: 0;

  /* zatvoreno */
  max-height: 0;
  opacity: 0;
  pointer-events: none;

  transition: max-height 0.32s ease, opacity 0.20s ease;
  will-change: max-height, opacity;
}

.tab-inner{
  overflow: hidden;
  margin: 0;

  /* zatvoreno: nema paddinga */
  padding: 0;
  min-height: 0;

  transition: padding 0.32s ease;
  will-change: padding;
}

/* otvoreno stanje */
.tab-section[data-open="1"]{
  max-height: 1400px;
  opacity: 1;
  pointer-events: auto;
}

/* padding samo kad je otvoreno */
.tab-section[data-open="1"] .tab-inner{
  padding: clamp(10px, 1.2vw, 12px) 20px 30px 16px;
}

/* min visina samo kad je otvoreno */
.tab-section[data-open="1"] .tab-inner{
  min-height: 72px;
}

/* spriječi mikro-skok zbog margina */
.tab-inner > :first-child{ margin-top: 0 !important; }
.tab-inner > :last-child{ margin-bottom: 0 !important; }


/* ================================
   MOBILE / TABLET (≤ 1200px)
================================ */
@media (max-width: 1200px) {

  .product-tab-bar{
    border-radius: 18px;
  }

  .product-tab{
    font-size: 1.25rem;
    padding: 22px 18px;
    white-space: normal;
  }

  .oo-tab-title{
    font-size: 1.25rem;
  }

  /* 📱 ikone malo veće nego desktop, ali i dalje manje nego prije */
  .oo-tab-icon{
    width: 22px;
    height: 22px;
  }

  .oo-tab-indicator{
    width: 22px;
    height: 22px;
  }

  .tab-inner{
    padding: 0;
  }

  .tab-section[data-open="1"] .tab-inner{
    padding: 20px 18px 26px 18px;
    font-size: 1.1rem;
  }

  .tab-section[data-open="1"] .tab-inner{
    min-height: 84px;
  }

  .tab-section[data-open="1"]{
    max-height: 1800px;
  }
}


/* ================================
   REAL MOBILE BOOST (≤ 600px)
================================ */
@media (max-width: 600px) {

  .product-tab{
    padding: 20px 16px;
    font-size: 1.15rem;
  }

  .oo-tab-title{
    font-size: 1.15rem;
    font-weight: 700;
  }

  /* 📱 mobile ikone */
  .oo-tab-icon{
    width: 20px;
    height: 20px;
  }

  .oo-tab-indicator{
    width: 20px;
    height: 20px;
  }

  .tab-inner{
    padding: 0;
  }

  .tab-section[data-open="1"] .tab-inner{
    padding: 18px 16px 24px 16px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .tab-section[data-open="1"] .tab-inner{
    min-height: 96px;
  }

  .tab-section[data-open="1"]{
    max-height: 2200px;
  }
}
