/* Osnovno */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: #fff; /* bijela pozadina za ostatak stranice */
  color: #333;
}

/* Wrapper za zaglavlje */
#hero_wrapper {
  background-color: #000;
  display: flex;
  justify-content: center;
}

/* Zaglavlje s pozadinskom slikom */
#hero {
  position: relative;
  width: 820px;
  height: 320px;
  background-image: url(/images/header_bg.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Admin ikona */
#admin_link {
  position: absolute;
  top: 20px;
  left: 20px;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

#admin_link:hover {
  opacity: 1;
}

/* Košarica */
#cart_icon_wrapper {
  position: absolute;
  top: 20px;
  right: 20px;
}

#cart_icon {
  width: 40px;
  height: 40px;
}

#cart_count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 50%;
}

/* Tekst u donjem lijevom kutu */
#hero_text {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  max-width: 500px;
}

#hero_text .headline {
  font-size: 22px;
  font-weight: bold;
}

#hero_text .subline {
  font-size: 14px;
  display: block;
  margin-top: 4px;
}

/* Navigacija dolje desno */
#nav_links {
  position: absolute;
  bottom: 10px;
  right: 0px;
}

#nav_links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav_links ul li {
  margin-bottom: 4px;
}

#nav_links ul li a {
  text-decoration: none;
  font-size: 15px;
  color: #d4d4d4;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Osjenčana pozadina za svaki link */
#nav_links ul li a span {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Hover efekt */
#nav_links ul li a:hover span {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Aktivni link s pozadinskom slikom i strelicom */
#nav_links ul li a.current span {
  display: inline-block;
  background-image: url("/images/menu_hoer_bg_right.png");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  color: white;
  font-weight: bold;
  padding: 4px 40px 4px 8px;
  min-width: 180px;
  height: 28px;
  line-height: 20px;
  box-sizing: border-box;

}

/* Sadržaj */
#content {
  background-color: #fff;
  padding: 20px;
  max-width: 820px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 500;
  color: #333;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

}

/* Podnožje */
#footer_wrapper {
  background-color: #222;
  color: #ccc;
  padding: 20px 0;
}

#footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer_list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer_list li {
  margin-bottom: 6px;
}

.section_w210 {
  width: 210px;
  float: left;
}

.margin_r_20 {
  margin-right: 20px;
}

.cleaner_h40 {
  height: 40px;
  clear: both;
}

.cleaner {
  clear: both;
}

.krigle-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.krigla-box {
  width: 18%;
  box-sizing: border-box;
  text-align: center;
}

.krigla-box img {
  width: 100%;
  max-width: 160px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.krigla-box img:hover {
  transform: scale(1.05);
}

.grid-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.proizvod-box {
  width: 23%; /* 4 u redu s razmakom */
  box-sizing: border-box;
  text-align: center;
}

.proizvod-box img {
  width: 100%;
  max-width: 210px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.proizvod-box h2 {
  height: 40px; /* fiksna visina */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin: 0 0 10px 0;
  overflow: hidden;
  text-align: center;
}


/* css za plačanje */
/* Wrapper za checkout */
#checkout_wrapper {
  display: flex;
  flex-wrap: nowrap; /* sprječava lomljenje u dvije linije */
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  max-width: 1000px;
  margin: 40px auto;
}

/* Lijeva strana: narudžba + obrazac */
.checkout_left {
  flex: 1 1 60%;
  border: 2px solid #4CAF50;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

/* Desna strana: način plaćanja */
.checkout_right {
  flex: 1 1 35%;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
  max-width: 350px;
}

/* Tabela u košarici */
.checkout_left table {
  width: 100%;
  border-collapse: collapse;
}

.checkout_left th,
.checkout_left td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.checkout_left img {
  max-width: 80px;
  border-radius: 4px;
}

/* Brojač */
input[type="number"] {
  border: 1px solid #999;
  padding: 6px;
  border-radius: 4px;
  width: 60px;
}

/* Gumbi */
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.update-button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.reset-button {
  background-color: #a8d5a2;
  color: #333;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.checkout-button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

/* Forma za uplatu */
.checkout-form label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="tel"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  box-sizing: border-box;
}

/* Radio gumbi i checkbox */
.checkout_right label {
  display: block;
  margin-bottom: 10px;
}

/* Modalni prozor */
.modal-sadrzaj {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: none;
  z-index: 9999;
}

.zatvori {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

.proizvod-detalji {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  margin: 40px 0;
}

.proizvod-slika {
  flex: 0 0 35%;
}

.proizvod-tekst {
  flex: 1;
}

.proizvod-tekst img {
  max-width: 100%;
  margin-top: 20px;
}

.grid-wrapper .proizvod-box a.current img {
  outline: 3px solid #4CAF50;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* === RESPONSIVE ZA MOBITELE === */
@media (max-width: 768px) {
	

  .krigle-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .krigla-box {
    width: 90%;
    max-width: 300px;
    margin-bottom: 20px;
  }

  .krigla-box img {
    max-width: 100%;
  }



  body {
    font-size: 15px;
    padding: 0;
    margin: 0;
  }
  



  /* Zaglavlje */
#hero {
  width: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center top;
}

#hero_text {
  position: absolute;
  bottom: 10px;
  left: 0%;
  width: 45%; /* povećano s 60% */
  background-color: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 6px;
  color: white;
}



  #hero_text .headline {
    font-size: 18px;
  }

  #hero_text .subline {
    font-size: 13px;
  }

  /* Ikone */
  #admin_link {
    top: 10px;
    left: 10px;
  }

  #cart_icon_wrapper {
    top: 10px;
    right: 10px;
  }

  #cart_icon {
    width: 32px;
    height: 32px;
  }

  #cart_count {
    font-size: 10px;
    padding: 2px 5px;
  }

  /* Navigacija */
 #nav_links {
  position: absolute;
  bottom: 10px;
  right: 0px;
  width: auto;
  max-width: 90%;
}

#nav_links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav_links ul li {
  margin-bottom: 4px;
}

#nav_links ul li a {
  font-size: 13px;
  color: #d4d4d4;
  padding: 4px 6px;
  border-radius: 4px;
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
}

#nav_links ul li a span {
  display: inline-block;
  padding: 4px 6px;
}


  /* Sadržaj */
  #content {
    padding: 10px;
    max-width: 100%;
  }

  /* Podnožje */
  #footer_wrapper {
    padding: 10px 0;
  }

  #footer {
    padding: 0 10px;
  }

  .section_w210 {
    width: 100%;
    float: none;
    margin-bottom: 20px;
  }

  .margin_r_20 {
    margin-right: 0;
  }

  .cleaner_h40 {
    height: 20px;
  }

  /* Checkout */
  #checkout_wrapper {
    flex-direction: column;
    gap: 20px;
    padding: 10px;
  }

  .checkout_left,
  .checkout_right {
    max-width: 100%;
  }

  .button-row {
    flex-direction: column;
    gap: 10px;
  }

  .update-button,
  .reset-button,
  .checkout-button {
    width: 100%;
    text-align: center;
  }

  /* Modal */
  .modal-sadrzaj {
    width: 95%;
    max-height: 90vh;
  }

  /* Proizvod detalji */
  .proizvod-detalji {
    flex-direction: column;
    gap: 20px;
  }

  .proizvod-slika,
  .proizvod-tekst {
    flex: 1 1 100%;
  }
  
  .grid-wrapper {
	display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.proizvod-box {
  width: 90%;
  max-width: 300px;
  margin: 0 auto;
  text-align: center;
}

.proizvod-box h2 {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 10px;
  overflow: hidden;
}

.proizvod-box img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

}

/* za tablete */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* Navigacija */
  #nav_links ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  #nav_links li a {
    font-size: 1.2em;
    padding: 10px 15px;
  }

  /* Galerija */
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .krigla-box img {
    max-width: 100%;
    height: auto;
  }

  /* Hero tekst */
  #hero_text .headline {
    font-size: 1.8em;
  }

  #hero_text .subline {
    font-size: 1.2em;
  }

  /* Footer */
  #footer_wrapper {
    padding: 20px;
    text-align: center;
  }

  .footer_list li {
    font-size: 1em;
    margin-bottom: 5px;
  }
}
