/* === SHOP MODAL === */
.shop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
  font-family: 'Arial', sans-serif;
}

.shop-modal.show {
  opacity: 1;
  pointer-events: all;
}

.shop-content {
  background: #fff;
  color: #333;
  border-radius: 16px;
  padding: 2rem;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto; /* scroll za sadržaj */
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

.close-btn {
  position: sticky; /* ostaje vidljivo dok scrolluješ */
  top: 0.2rem;      /* malo više gore */
  right: 0.2rem;    /* pomereno desno od ivice */
  align-self: flex-end;
  font-size: 2.2rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #555;
  z-index: 10;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #000;
}

/* Shop header */
.shop-content h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

/* Grid proizvoda */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.product-card h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.product-card p {
  font-size: 0.95rem;
  color: #555;
  margin: 0.3rem 0;
}

/* Dugmad akcija */
.actions a {
  display: inline-block;
  margin: 0.3rem;
  padding: 0.45rem 0.9rem;
  background: #f09943;
  color: #fff;
  border-radius: 24px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.3s;
}

.actions a:hover {
  background: #ffae00;
}

/* Link za otvaranje shop modal */
.shop-link {
  margin-left: 1rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-weight: normal;
}

.shop-link:hover {
  color: #f09943;
}

/* === Dark mode za Shop modal === */
body.dark-mode .shop-content {
  background: #1e1e1e;
  color: #fff;
}

body.dark-mode .product-card {
  background: #2a2a2a;
}

body.dark-mode .product-card p,
body.dark-mode .product-card h4 {
  color: #fff;
}

body.dark-mode .actions a {
  background: #f09943; 
  color: #fff;
}

body.dark-mode .actions a:hover {
  background: #ffae00;
}

body.dark-mode .close-btn {
  color: #fff;
}

body.dark-mode .shop-content h2 {
  color: #fff;
}
