/* ============================= */
/* 🔝 Uvek vidljiva gornja traka */
/* ============================= */
.gallery-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  z-index: 11000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(255, 0, 100, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.top-btn {
  background: rgba(255, 15, 123, 0.45);
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(255, 0, 100, 0.3);
}
.top-btn:hover {
  background: rgba(255, 15, 123, 0.65);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 0, 120, 0.5);
}

/* ============================= */
/* 🖼️ Lightbox i kontrole        */
/* ============================= */
.lightbox {
  position: fixed;
  inset: 0;
  isolation: isolate; /* ⬅️ KLJUČNO */
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 30000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.lightbox:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(0,0,0,0.7);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.lightbox:not(.hidden) img {
  opacity: 1;
  transform: scale(1);
}

/* Navigaciona dugmad i close */
.nav-btn, .close-btn {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 10px;
  z-index: 9100;
  transition: background .25s ease, transform .25s ease;
}
.nav-btn:hover, .close-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }
.nav-btn.prev { left: 30px; }
.nav-btn.next { right: 30px; }
.close-btn { top: 82px; right: 30px; font-size: 2.2rem; }

/* ============================= */
/* ➕➖ Dugmad za količinu        */
/* ============================= */
.circle-btn {
  background: rgba(255, 15, 123, 0.35);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.8rem;
  font-weight: bold;
  margin: 15px;
  cursor: pointer;
  z-index: 9200;
  box-shadow: 0 0 15px rgba(255,15,123,0.4),
              inset 0 0 10px rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.25s ease;
}
.circle-btn:hover {
  background: rgba(255,15,123,0.55);
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(255,15,123,0.8),
              inset 0 0 14px rgba(255,255,255,0.3);
}
.circle-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 20px rgba(255,0,120,0.6);
}
.lightbox-actions {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 9200;
}

/* ============================= */
/* 🔢 Brojač količine u Lightboxu */
/* ============================= */
.photo-qty-indicator {
  position: absolute;
  top: 90px;
  left: 25px;
  background: rgba(255, 15, 123, 0.55);
  color: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  min-width: 40px;
  text-align: center;
  z-index: 20010; /* ✅ ostaje samo ovo */
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 15px rgba(255, 0, 100, 0.5),
              inset 0 0 6px rgba(255, 255, 255, 0.2);
}
.photo-qty-indicator.show { opacity: 1; transform: scale(1); }
.photo-qty-indicator.pulse {
  box-shadow: 0 0 25px rgba(255, 0, 120, 0.7);
  transform: scale(1.1);
}

/* ============================= */
/* 🖼️ GRID galerija              */
/* ============================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 20px;
}
.photo-item {
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
}
.photo-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
  position: relative;
  z-index: 1;
}
.photo-item:hover img { transform: scale(1.05); }
.photo-name {
  position: relative;
  z-index: 2;
}

/* ============================= */
/* 🧾 Donja traka (narudžbine)   */
/* ============================= */
.order-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.9);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  font-size: 1.1rem;
  z-index: 40000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}
.order-summary input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 8px;
}

/* 💎 Glass Glow za "Završi narudžbinu" dugme */
.finish-btn {
  background: rgba(255, 15, 123, 0.45);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 10px rgba(255, 0, 100, 0.3),
              inset 0 0 10px rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}
.finish-btn:hover,
.finish-btn:active {
  background: rgba(255, 15, 123, 0.65);
  box-shadow: 0 0 20px rgba(255, 0, 120, 0.6),
              0 0 40px rgba(255, 0, 160, 0.4);
  transform: scale(1.05);
}
.finish-btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 15px rgba(255, 0, 150, 0.5);
}

/* ============================= */
/* 📱 Mobilno prilagođavanje     */
/* ============================= */
@media (max-width: 600px) {
  .lightbox-actions { bottom: 65px; gap: 16px; }
  .circle-btn {
    width: 56px;
    height: 56px;
    font-size: 1.7rem;
  }
  .photo-qty-indicator { top: 85px; left: 20px; font-size: 1rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .gallery-cover { height: 260px !important; }
  .gallery-name { font-size: 1.7rem; font-weight: 800; color: #fff; text-align: center; margin-top: 10px; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
}

/* ============================= */
/* 📱 Studio7 mobilni grid fix   */
/* ============================= */
@media (max-width: 700px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* manje slike */
    gap: 10px; /* manji razmak */
    padding: 10px;
  }

  .photo-item img {
    border-radius: 8px;
  }

  .photo-name {
    font-size: 0.75rem;
    text-align: center;
    padding: 2px 0 6px;
  }

  .qty-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    top: 6px;
    right: 6px;
  }
}


/* ⚖️ Manje “Završi narudžbinu” i kalkulacija */
.order-summary { font-size: 1rem; padding: 8px 15px; }
.finish-btn { padding: 8px 16px; font-size: 0.95rem; }

@media (max-width: 600px) {
  .order-summary { font-size: 0.95rem; padding: 6px 12px; }
  .finish-btn { font-size: 0.9rem; padding: 7px 14px; }
}

/* ========================================== */
/* 🧩 FINAL Studio7 Badge fix (grid + fullscreen) */
/* ========================================== */

/* Grid slika */
.photo-item {
  position: relative !important;
  overflow: hidden !important;
}

/* 🟣 Badge u gridu */
.qty-badge {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  background: linear-gradient(135deg, rgba(255,15,123,0.95), rgba(255,80,180,0.85)) !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  box-shadow: 0 0 12px rgba(255, 0, 100, 0.6) !important;
  display: none !important;
  z-index: 2000 !important;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none !important;
  transition: all 0.25s ease-in-out !important;
}
.photo-item.selected .qty-badge {
  display: block !important;
  opacity: 1;
  transform: scale(1);
}

/* Kad je fullscreen aktivan – sakrij sve grid-badge-ove */
.lightbox:not(.hidden) ~ .client-gallery .qty-badge {
  display: none !important;
  opacity: 0 !important;
}

/* 🟣 Studio7 Fullscreen Badge — Compact & Perfectly Positioned */
.photo-qty-indicator {
  position: absolute;
  top: 65px;             /* 🔽 spušten još malo */
  right: 35px;           /* 🔹 malo udaljen od ivice */
  background: linear-gradient(145deg, rgba(255,15,123,0.92), rgba(255,80,180,0.82));
  color: #fff;
  font-size: 1rem;       /* 🔹 manji tekst, kompaktnije */
  font-weight: 700;
  padding: 6px 10px;     /* 🔹 manji padding, elegantnije */
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(255, 0, 120, 0.7);
  z-index: 20000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content !important;  /* ✅ širina po sadržaju */
  height: auto !important;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.9);
  transition: transform 0.25s ease, opacity 0.25s ease;
  border: 1px solid rgba(255,255,255,0.25); /* 🔹 tanki okvir za kontrast */
}

.photo-qty-indicator.show {
  opacity: 1;
  transform: scale(1.05);
}

/* 🔝 Gornja traka */
.gallery-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 🏷️ Naslov levo */
.topbar-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ============================= */
/* 🔙 Dugmad: Nazad u galerije / Povratak na početnu */
/* ============================= */

.back-home-btn,
.back-gallery-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 0, 140, 0.9), rgba(255, 80, 180, 0.75));
  color: #fff;
  padding: 6px 48px;              /* 🔹 manji padding → tanje dugme, ista visina na webu i mobu */
  position: relative;
  top: -2px;                      /* 🔹 fino podešavanje poravnanja */
  line-height: 1.2;               /* 🔹 stabilna visina teksta */
  border-radius: 7px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 12px rgba(255, 0, 120, 0.4),
              inset 0 0 8px rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.back-home-btn:hover,
.back-gallery-btn:hover {
  background: linear-gradient(145deg, rgba(255, 15, 123, 1), rgba(255, 80, 180, 0.9));
  transform: scale(1.04);
  box-shadow: 0 0 18px rgba(255, 0, 150, 0.6),
              0 0 30px rgba(255, 0, 120, 0.3);
}

.back-home-btn:active,
.back-gallery-btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 10px rgba(255, 0, 120, 0.5);
}

input,
textarea {
  font-size: 16px !important;
}

.lightbox {
  touch-action: pan-y;
}


/* 🖼️ Lightbox click fix */
.lightbox img {
  pointer-events: none;   /* ⬅️ SLIKA NE HVATA KLIK */
}

.lightbox .nav-btn,
.lightbox .close-btn,
.lightbox .circle-btn {
  pointer-events: auto;
z-index: 50000; /* ⬅️ iznad overlay-a i order-summary */
}


.photo-name-overlay,
.photo-qty-indicator {
  pointer-events: none; /* ⬅️ KLJUČNO */
}

/* -------------------------------------------------*/

/* POVRATAK – LEVO */
.topbar-back {
  justify-self: start;
  background: linear-gradient(135deg, #ff0077, #ff3b9a);
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

/* NASLOV – SAVRŠENO CENTRIRAN */
.topbar-title {
  justify-self: center;
  text-align: center;

  font-size: 17px;
  font-weight: 700;
  color: #fff;

  white-space: nowrap;      /* 👈 jedan red */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* BURGER – DESNO */
.burger-btn {
  justify-self: end;

  position: relative;   /* ⬅ OVO JE KLJUČ */
  z-index: 2;           /* ⬅ iznad title-a */

  background: rgba(255,255,255,0.12);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 20px;
  padding: 8px 12px;
  cursor: pointer;
}

/* ===== LOGIN ACTION BUTTONS ===== */
.login-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

/* sekundarno dugme */
.login-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 999px;

  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;

  color: #ff5aa5;
  background: rgba(255, 0, 120, 0.18);
  border: 1px solid rgba(255, 0, 120, 0.45);

  transition: all 0.25s ease;
}

.login-back-btn:hover {
  background: rgba(255, 0, 120, 0.3);
  box-shadow: 0 0 14px rgba(255, 0, 120, 0.45);
}

/* ghost varijanta (još tiša) */
.login-back-btn.ghost {
  background: transparent;
  color: #ff8fc4;
  border-color: rgba(255, 255, 255, 0.25);
}


/* ===== LOGIN BACKGROUND ===== */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;

  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  filter: blur(18px);
  transform: scale(1.1);
}

/* tamni overlay */
.login-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;

  background:
    radial-gradient(
      circle at center,
      rgba(0,0,0,0.35),
      rgba(0,0,0,0.85)
    );
}

/* login kartica ide iznad */
.login-wrapper {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {

  .login-bg {
    /* manji blur = vidi se više slike */
    filter: blur(10px);

    /* manji zoom da slika ne “beži” */
    transform: scale(1.03);

    /* dodatno osiguranje centriranja */
    background-position: center top;
  }

  .login-card {
    max-width: 92%;
    padding: 2.2rem 1.8rem;
  }
}

/* ============================= */
/* 🔒 LOCK IKONA NA GALERIJI     */
/* ============================= */

/* wrapper oko slike / carousela */
.gallery-thumb {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}

/* katanac u uglu slike */
.gallery-lock {
  position: absolute;
  top: 10px;
  left: 10px;          /* ako hoćeš desno: right: 10px */

  width: 34px;
  height: 34px;
  border-radius: 50%;

  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
  color: #fff;

  z-index: 5;
  pointer-events: none; /* ne blokira klik */
}

/* malo veći na mobu */
@media (max-width: 768px) {
  .gallery-lock {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}


/* ===== IME GALERIJE (LINK COLOR FIX) ===== */
.gallery-name {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
  width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}

a:hover .gallery-name {
  color: #ff0077 !important;
}

@media (max-width: 600px) {
  .gallery-name {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 6px !important;
  }
  /* Klijentske galerije - 2 kolone na mobu umesto 3 */
  .galleries-list .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .galleries-list .gallery-cover {
    height: 180px !important;
  }
}


/* ⬅️ stranice koje imaju fixed client header */
body.page-with-header {
  padding-top: 60px; /* VISINA .gallery-topbar */
}

/* ======================================= */
/* ✅ Gallery view – horizontal overflow fix */
/* ======================================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ⚠️ DO NOT REMOVE – fixes Safari fixed overflow  
pravilo je problem u gallery_view seklo je burger i button */


.gallery-topbar,
.order-summary {
  left: 0;
  right: 0;
  width: auto;
}

/* ======================================= */
/* 🧼 Lightbox kontrole – clean & readable */
/* ======================================= */

/* STRELICE + X */
.lightbox .nav-btn,
.lightbox .close-btn {
  background: rgba(0, 0, 0, 0.45);   /* samo malo tamnije */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none;
  color: #fff;
}

/* hover – suptilno */
.lightbox .nav-btn:hover,
.lightbox .close-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.03);
}

/* MANJI X */
.lightbox .close-btn {
  font-size: 1.6rem;   /* bilo ~2.2rem */
  padding: 8px 12px;
}

/* ============================= */
/* ➕➖ PLUS / MINUS             */
/* ============================= */
.lightbox .circle-btn {
  background: rgba(255, 15, 123, 0.45); /* samo opacity */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none;
}

.lightbox .circle-btn:hover {
  background: rgba(255, 15, 123, 0.6);
  transform: scale(1.06);
}

/* ======================================= */
/* 📱 Gallery grid – 3 slike po redu (mobile) */
/* ======================================= */
@media (max-width: 600px) {
  .gallery-grid {
grid-template-columns: repeat(3, 1fr);
gap: 6–8px; /* malo manji razmak da stane lepše */
  }
}

/* ======================================= */
/* 🧩 Gallery grid – ujednačen izgled */
/* ======================================= */

/* wrapper slike */
.photo-item {
  aspect-ratio: 3 / 4;     /* 👈 portrait feel (idealno za svadbe) */
  overflow: hidden;
  border-radius: 10px;
}

/* sama slika */
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* 👈 KLJUČ */
  display: block;
}
