/* style.css — Bistro v2.0 "Gourmet Dark Mode" */

:root {
  --bg: #121212;
  --panel: #1e1e1e;
  --border: #333;
  --primary: #D4AF37; /* Zlato */
  --primary-hover: #E0C160;
  --text: #F5F5F5;
  --muted: #aaa;

  --font-title: 'Playfair Display', serif;
  --font-text: 'Inter', sans-serif;
  
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 1. Globalni Reset i Tipografija */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Spriječava horizontalni scroll zbog animacija */
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
h1, h2, h3 {
  font-family: var(--font-title);
  color: var(--text);
  font-weight: 700;
}
h2.section-title {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary);
  /* Animacija - početno stanje */
  opacity: 0;
  transform: translateY(20px);
}
p {
  color: var(--muted);
  font-weight: 300;
}
img {
  max-width: 100%;
  height: auto;
}

/* 2. Gumbi */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn.primary {
  background: var(--primary);
  color: #121212;
}
.btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #121212;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

/* 3. Navigacija */
.top-nav {
  width: 100%;
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  /* Animacija - početno stanje */
  opacity: 0;
  transform: translateY(-100%);
}
.top-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--text);
}
.brand span {
  color: var(--primary);
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 24px;
  font-weight: 600;
  transition: color 0.3s ease;
}
.nav a:hover {
  color: var(--primary);
}

/* 4. Hero Sekcija */
.hero {
  height: 90vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), 
              url('https://source.unsplash.com/1600x900/?gourmet,food,dark') no-repeat center center;
  background-size: cover;
  overflow: hidden; /* Važno za animacije */
}
.hero-title {
  font-size: 5rem;
  line-height: 1.1;
  margin: 0;
}
/* Početno stanje za animaciju naslova */
.hero-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotate(5deg);
}
.hero-subtitle {
  font-size: 1.2rem;
  margin: 20px 0 30px 0;
  color: var(--text);
  font-weight: 300;
  /* Početno stanje za animaciju */
  opacity: 0;
  transform: translateY(20px);
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 15px;
  /* Početno stanje za animaciju */
  opacity: 0;
  transform: translateY(20px);
}
.phone-number {
  font-size: 1.2rem;
  color: var(--text);
}
.phone-number a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* 5. Sekcije Meni & Stalna Ponuda */
.menu-section {
  padding-top: 80px;
  padding-bottom: 80px;
}
.menu-meta {
  text-align: center;
  font-size: 1.1rem;
  color: var(--muted);
  margin: -30px 0 30px 0;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}
.day-title {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--text);
  grid-column: 1 / -1; /* Zauzima cijeli red */
  margin: 20px 0 10px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  /* Animacija - početno stanje */
  opacity: 0;
  transform: translateX(-30px);
}
.small-muted {
  grid-column: 1 / -1;
  text-align: center;
}

/* KARTICA JELA (Novi dizajn) */
.item-card {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Animacija - početno stanje */
  opacity: 0;
  transform: translateY(30px);
}
.item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}
.item-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid var(--primary);
}
.item-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Gura gumb na dno */
}
.item-card-content h4 {
  font-size: 1.3rem;
  margin: 0 0 8px 0;
}
.item-card-content p.description {
  font-size: 0.9rem;
  color: var(--muted);
  flex-grow: 1;
  margin-bottom: 15px;
}
.item-card-content .price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}
.item-card .btn {
  width: 100%;
}

/* 6. CTA Sekcija (Između menija) */
.cta-section {
  background: var(--panel);
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Animacija - početno stanje */
  opacity: 0;
}
.cta-section h2 {
  font-size: 2.2rem;
  color: var(--primary);
}
.cta-section p {
  font-size: 1.1rem;
  color: var(--text);
  margin: 10px 0 25px 0;
}

/* 7. Kontakt Sekcija */
.contact-section {
  padding: 80px 0;
  /* Animacija - početno stanje */
  opacity: 0;
  transform: translateY(30px);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  align-items: center;
}
.contact-info p {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 10px;
}
.contact-map iframe {
  border-radius: 12px;
  border: 1px solid var(--border) !important;
}

/* 8. Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* 9. Košarica (Gumb i Modal) */
.cart-open-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 101;
  background: var(--primary);
  color: #121212;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
  transition: transform 0.3s ease;
  /* Animacija - početno stanje */
  opacity: 0;
  transform: scale(0);
}
.cart-open-btn:hover {
  transform: scale(1.1) rotate(10deg);
}
.cart-open-btn #cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: #ff4136;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-modal {
  position: fixed;
  top: 0;
  right: -400px; /* Počinje izvan ekrana */
  width: 400px;
  height: 100vh;
  background: var(--panel);
  z-index: 1000;
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  border-left: 1px solid var(--border);
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Glatka animacija */
}
.cart-modal.show {
  right: 0; /* Pokaži modal */
}
.cart-modal-content {
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.cart-modal-content h2 {
  color: var(--primary);
  margin: 0 0 20px 0;
  text-align: center;
}
.cart-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2.5rem;
  cursor: pointer;
}
.cart-items {
  flex-grow: 1;
  overflow-y: auto;
}
.cart-items .row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.cart-items .cart-remove {
  color: #ff6b6b;
  text-decoration: none;
  margin-left: 10px;
  font-weight: 700;
}
.total {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0;
  text-align: right;
}
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-actions .btn {
  width: 100%;
}

/* 10. Modal za Offline Narudžbu */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}
.modal-inner {
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 30px;
  width: 100%;
  max-width: 450px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  /* Animacija - početno stanje */
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal:not(.hidden) .modal-inner {
  transform: scale(1);
}
.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2rem;
  cursor: pointer;
}
.modal-inner h3 {
  color: var(--primary);
  margin-top: 0;
}
.modal-inner label {
  display: block;
  margin: 15px 0 5px 0;
  color: var(--muted);
}
.modal-inner input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1rem;
}
.modal-actions {
  margin-top: 25px;
}

/* 11. Responzivni dizajn */
@media(max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }
  .top-nav .container {
    flex-direction: column;
    gap: 15px;
  }
  .nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav a { margin: 0; }
  .cart-modal {
    width: 90%;
    right: -100%; /* Prilagodba za 90% širine */
  }
}

/* --- NOVO: Tabovi za Tjedni Meni --- */

/* Kontejner za gumbe dana */
.tabs-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Da se prebaci u novi red na mobitelu */
  gap: 10px;
  margin-bottom: 40px;
  opacity: 0; /* Za animaciju */
  transform: translateY(20px);
  animation: fadeUp 0.8s forwards 0.5s;
}

/* Stil gumba za dan (Neaktivan) */
.tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 12px 24px;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border-radius: 4px; /* Malo oštriji rubovi za tabove */
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Stil gumba za dan (AKTIVAN) */
.tab-btn.active {
  background: var(--primary);
  color: #121212; /* Tamni tekst na zlatnoj pozadini */
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Kontejner za jela određenog dana */
.day-content {
  display: none; /* Skriveno po defaultu */
  animation: fadeIn 0.5s ease-in-out;
}

/* Klasa koja prikazuje sadržaj */
.day-content.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}


/* --- 1. DIZAJN TABOVA (Dani u tjednu) --- */
.tabs-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp 0.8s forwards 0.3s;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: #121212;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Kontejner za sadržaj dana */
.day-content {
  display: none; /* Skriveno po defaultu */
}

/* --- NOVO: Flexbox za centriranje --- */
.day-content.active {
  display: flex;             /* Flex umjesto Grid */
  flex-wrap: wrap;           /* Prelomi u novi red kad nema mjesta */
  justify-content: center;   /* KLJUČNO: Centriraj kartice u sredinu ekrana */
  gap: 25px;                 /* Razmak između kartica */
  padding-bottom: 20px;
  animation: fadeIn 0.4s ease-in-out;
}

/* --- 2. KOMPAKTNIJE KARTICE JELA (Manje slike i tekst) --- */
/* --- NOVO: Fiksna širina kartice za simetriju --- */
.item-card {
  width: 260px;              /* Fiksna širina (kompaktno) */
  max-width: 100%;           /* Sigurnost za male mobitele */
  
  /* Flex postavke da se ne rastežu čudno */
  flex-grow: 0;
  flex-shrink: 0; 
  
  /* Dizajn */
  background: var(--panel);  /* Osiguraj pozadinu */
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;             
  flex-direction: column;    /* Sadržaj jedan ispod drugog */
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efekt na hover */
.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.15); /* Zlatni odsjaj */
  border-color: var(--primary);
}

.item-card img {
  height: 150px; /* Smanjena visina slike (bilo je 200px) */
  transition: height 0.3s ease;
}

.item-card-content {
  padding: 15px; /* Manji padding unutra (bilo je 20px) */
}

.item-card-content h4 {
  font-size: 1.1rem; /* Manji naslov jela */
  margin-bottom: 5px;
  line-height: 1.3;
}

.item-card-content p.description {
  font-size: 0.85rem; /* Sitniji opis */
  margin-bottom: 10px;
  line-height: 1.5;
}

.item-card-content .price {
  font-size: 1.15rem; /* Malo manja cijena */
  margin-bottom: 10px;
}

.btn {
  padding: 8px 16px; /* Manji gumbi */
  font-size: 0.85rem;
}

/* Animacije */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Stil za Lightbox pozadinu */
.lightbox {
    display: none; /* Sakriveno po defaultu */
    position: fixed;
    z-index: 2000; /* Da bude iznad svega */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Crna prozirna pozadina */
    justify-content: center;
    align-items: center;
}

/* Stil za veliku sliku */
.lightbox-content {
    max-width: 80%;
    max-height: 80%;
    border: 3px solid var(--primary); /* Tvoja zlatna boja */
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Gumb za zatvaranje */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}