

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}



/* NASLOV + ADMIN GUMB */

h1{
  text-align:center;
  margin:28px 0 10px;
  font-size:30px;
  font-weight:700;
}

/* MODAL + PREVIEW */

label{
  display:block;
  margin-top:10px;
  font-weight:600;
}

input,
select,
textarea{
  width:100%;
  padding:8px;
  margin-top:5px;
  border:1px solid #ccc;
  border-radius:6px;
}

textarea{
  resize:vertical;
}

.preview-gallery{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.preview-item{
  position:relative;
  display:inline-block;
}

.preview-item img,
.preview-item video{
  width:120px;
  height:120px;
  object-fit:cover;
  border-radius:6px;
  border:1px solid #ccc;
  display:block;
}

.remove-btn{
  position:absolute;
  top:2px;
  right:4px;
  width:22px;
  height:22px;
  line-height:22px;
  border:none;
  border-radius:50%;
  background:rgba(167,78,155,.9);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.star-btn{
  position:absolute;
  left:6px;
  top:6px;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#ffffffd9;
  border:1px solid #e0e0e0;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:16px;
  transition:transform .15s ease;
}

.star-btn:hover{
  transform:scale(1.08);
}

.star-btn.active{
  background:#ffe082;
  border-color:#f4b400;
}

.star-index{
  position:absolute;
  left:6px;
  bottom:6px;
  background:#a74e9b;
  color:#fff;
  font-size:11px;
  padding:2px 6px;
  border-radius:12px;
  display:none;
}

.star-btn.active + .star-index{
  display:inline-block;
}

/* Istaknuto (Top/Novo/Akcija) vodoravno */

.featured-row{
  display:flex;
  gap:18px;
  margin-top:6px;
  align-items:center;
}

.featured-row label{
  margin-top:0;
  font-weight:500;
}

/* GRUPE / NASLOVI */

.product-group h2{
  text-align:center;
  font-size:28px;
  margin:2rem 0 1.5rem;
  color:var(--accent);
}

.product-subgroup h3{
  margin:1rem 0 .5rem 1rem;
  font-size:20px;
  color:var(--accent);
}



/* TEKSTUALNI DIO */

.product-right{
  width:100%;
  padding:4px 4px 0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
}

.product-right h4{
  font-size:1rem;
  color:#333;
  margin:4px 0 6px;
  text-align:center;
  width:100%;
}

.product-right p{
  color:var(--muted);
  font-size:0.85rem;
  margin-bottom:0.9rem;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:15;
  line-clamp:15;
  line-height:1.5;
  max-height:calc(15 * 1.5em);
}

.meta-row{
  margin:.25rem 0;
  color:#333;
  font-size:0.7rem;
}

.meta-label{
  font-weight:700;
}

/* CIJENA */

.price-block{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.old-price{
  text-decoration:line-through;
  color:#999;
  font-size:.9rem;
}

.new-price{
  color:#e65100;
  font-weight:700;
  font-size:1.1rem;
}

.discount-pill{
  background:#ff5252;
  color:#fff;
  font-size:.8rem;
  padding:2px 8px;
  border-radius:999px;
}



/* GUMBI – manji, uredni  */
.shop-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:10px 16px 0;
}

.product-left .btn{
  width:80%;
  max-width:260px;
}

/* osnovni stil */
.btn{
  border:none;
  padding:7px 14px;          /* manje nego prije */
  border-radius:999px;       /* zaobljeni, "tablet" stil */
  font-weight:600;
  cursor:pointer;
  font-size:0.85rem;         /* manji font */
  box-shadow:0 2px 4px rgba(0,0,0,0.15);
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    opacity .15s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 8px rgba(0,0,0,0.25);
}

/* Dodaj u košaricu */
.btn-cart{
  background:#FFD166;
  color:#3b3b3b;
}

/* Više slika / galerija */
.btn-more-photos{
  background:#F5D7FF;
  color:#555;
  border:1px solid #e6d6ea;
}

/* kad je artikl rasprodan ili rezerviran */
.btn-disabled{
  opacity:0.6;
  cursor:not-allowed;
}

/* === ADMIN === */

.edit-toggle{
  position:absolute;
  bottom:14px;
  right:14px;
  width:36px;
  height:36px;
  background:#a74e9b;
  color:#fff;
  border:none;
  border-radius:50%;
  font-size:18px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 2px 8px rgba(0,0,0,0.25);
  transition:transform .25s ease, background .25s ease;
  z-index:10;
}

.edit-toggle:hover{
  transform:scale(1.15);
  background:#b65fb3;
}

.card-actions{
  position:absolute;
  bottom:60px;
  right:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
  z-index:11;
}

.card-actions.show{
  opacity:1;
  pointer-events:auto;
}

.edit-btn,
.delete-btn{
  padding:8px;
  font-size:.85rem;
  font-weight:bold;
  border:none;
  border-radius:6px;
  cursor:pointer;
}

.edit-btn{
  background:#ffc107;
  color:#333;
}

.delete-btn{
  background:#f44336;
  color:#fff;
}
/* LIGHTBOX – fullscreen galerija (novi stil) */
.lb-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.85);
  display:none;                 /* JS pali na "flex" */
  align-items:center;
  justify-content:center;
  z-index:200;
  padding:1rem;
}

.lb-wrap{
  position:relative;
  max-width:100%;
  max-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* središte lightboxa – tu ubacujemo sliku ili video */
#lbContent{
  max-width:100%;
  max-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* zajednički stil za sliku i video u lightboxu */
.lb-img,
.lb-video{
  max-width:100%;
  max-height:90vh;
  object-fit:contain;
  border-radius:10px;
  background:#000;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  display:block;
}

/* jednostavan loader dok se slika ne učita */
.lb-loading{
  width:48px;
  height:48px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,.4);
  border-top-color:#fff;
  animation:lb-spin .8s linear infinite;
}

@keyframes lb-spin{
  to{ transform:rotate(360deg); }
}

/* gumbi: close / prev / next */
.lb-close,
.lb-prev,
.lb-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.9);
  border:none;
  cursor:pointer;
  width:44px;
  height:44px;
  border-radius:50%;
  font-size:22px;
  line-height:44px;
  text-align:center;
  user-select:none;
  box-shadow:0 4px 12px rgba(0,0,0,.4);
}

.lb-close{
  top:10px;
  right:10px;
  transform:none;
  font-size:20px;
}

.lb-prev{
  left:10px;
}

.lb-next{
  right:10px;
}

/* malo sitnije na mobitelu */
@media (max-width:768px){
  .lb-close,
  .lb-prev,
  .lb-next{
    width:38px;
    height:38px;
    font-size:18px;
  }
}

/* === GLOBALNI POPUP OVERLAY (poklon + košarica) === */

.popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:300;
}

.popup-overlay.show{
  display:flex;
}

.popup-box{
  position:relative;
  background:#fff;
  border-radius:14px;
  padding:20px 24px 18px;
  max-width:420px;
  width:90%;
  box-shadow:0 12px 28px rgba(0,0,0,0.35);
  font-size:0.95rem;
}

.popup-box h3{
  margin-bottom:8px;
  font-size:1.1rem;
}

.popup-box p{
  margin-bottom:12px;
}

.popup-total{
  margin-top:10px;
  font-weight:600;
}

.popup-actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

.popup-close{
  position:absolute;
  top:8px;
  right:10px;
  width:26px;
  height:26px;
  border-radius:50%;
  border:none;
  background:#f44336;
  color:#fff;
  font-weight:bold;
  cursor:pointer;
}

/* === POPUP "Dodano u košaricu" – thumbnail === */

#cart-popup-list{
  max-height:220px;
  overflow-y:auto;
}

.cart-popup-item{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}

.cart-popup-thumb{
  width:60px;
  height:60px;
  border-radius:8px;
  overflow:hidden;
  flex-shrink:0;
  background:#fff;
}

.cart-popup-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* malo teksta desno od slike */

.cart-popup-info{
  flex:1 1 auto;
  min-width:0;
  font-size:0.9rem;
}

.cart-popup-title{
  font-weight:600;
  margin-bottom:2px;
}

.cart-popup-price{
  color:#e65100;
  font-weight:600;
  font-size:0.9rem;
}

html{
  scroll-padding-top:100px;
}

/* Osnovni stil za popup dugmad */

.popup-actions button,
.popup-actions a{
  padding:10px 18px;
  border-radius:6px;
  border:none;
  font-size:1rem;
  font-weight:600;
  cursor:pointer;
  transition:background 0.2s ease, transform 0.1s ease;
  display:inline-block;
  text-align:center;
  text-decoration:none;
}

/* Zelena - za Pokloni i Blagajna */

.popup-btn-green{
  background-color:#4caf50;
  color:white;
}
.popup-btn-green:hover{
  background-color:#43a047;
}

/* Siva - za Nastavi bez poklona i Nastavi s kupnjom */

.popup-btn-gray{
  background-color:#e0e0e0;
  color:#333;
}
.popup-btn-gray:hover{
  background-color:#d5d5d5;
}

/* Animacija */

.popup-actions button:hover,
.popup-actions a:hover{
  transform:translateY(-1px);
}

.popup-close,
.cart-popup-close{
  position:absolute;
  top:10px;
  right:12px;
  width:28px;
  height:28px;
  background-color:transparent;
  border:none;
  border-radius:50%;
  font-size:18px;
  font-weight:bold;
  color:#666;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
}

.popup-close:hover,
.cart-popup-close:hover{
  background-color:#ffe6e6;
  color:#d32f2f;
  transform:rotate(90deg);
}

.cart-popup-remove{
  background:transparent;
  border:none;
  color:#999;
  font-size:16px;
  font-weight:bold;
  cursor:pointer;
  border-radius:50%;
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
}

.cart-popup-remove:hover{
  background-color:#ffe6e6;
  color:#d32f2f;
  transform:rotate(90deg);
}
/* === SHELL OKO OGLASA + THUMB-KARTICE === */

.product-shell{
  display:flex;
  flex-direction:column;
  gap:0.6rem;
  height:100%;
}
/* Glavni header blok – desktop */
.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
}


