/* ==============================================
   Verner potraviny – sdílené styly
   ============================================== */

/* --- CSS proměnné --- */
:root {
  --red:        #e61919;
  --red-dark:   #c01414;
  --white:      #ffffff;
  --text:       #333333;
  --text-muted: #666666;
  --bg-page:    #f4f4f4;
  --bg-card:    #ffffff;
  --border:     #e5e5e5;
  --shadow-sm:  0 2px 8px  rgba(0, 0, 0, .08);
  --shadow-md:  0 4px 20px rgba(0, 0, 0, .12);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, .16);
  --radius:     12px;
  --radius-lg:  20px;
  --navbar-h:   80px;
  --ease:       .25s ease;
  --max-w:      1100px;
}

/* --- Reset a základ --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--red); }

/* --- Navigace --- */
.navbar {
  position: sticky;
  top: 0; z-index: 500;
  background: var(--white);
  display: flex;
  align-items: center;
  height: var(--navbar-h);
  padding: 0 24px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.nav-logo { height: 58px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2px;
  flex: 1;
}

.nav-links a {
  display: block;
  padding: 7px 14px;
  color: var(--red);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  border-radius: 6px 6px 0 0;
  transition: background var(--ease), border-color var(--ease);
}

.nav-links a:hover  { background: #fff0f0; }
.nav-links a.active { font-weight: 700; border-bottom-color: var(--red); }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-fb img { height: 36px; }

/* Zarovnání textu na střed (index.html) */
.text-center { text-align: center; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--ease);
}
.nav-toggle:hover { background: #fff0f0; }
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--red);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Stránkový obsah --- */
.page-wrap {
  max-width: var(--max-w);
  margin: 36px auto;
  padding: 0 20px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 44px 48px;
}

.section { margin-bottom: 52px; }
.section:last-child { margin-bottom: 0; }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  border-bottom: 3px solid var(--red);
  padding-bottom: 8px;
  display: inline-block;
  margin-bottom: 22px;
  color: var(--text);
}

.section p {
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.section p:last-child { margin-bottom: 0; }

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 44px 0;
}

/* --- Patička --- */
footer {
  background: #1a1a1a;
  color: #bbb;
  text-align: center;
  padding: 44px 20px;
  font-size: .9rem;
  line-height: 2.1;
  margin-top: 0;
}
footer strong  { color: #fff; font-size: 1rem; }
footer a       { color: #f08080; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-inner  { max-width: 700px; margin: 0 auto; }

/* --- Letáky --- */
.letak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  justify-items: center;
}

.letak-card { text-align: center; }
.letak-card p {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--text);
}
.letak-card a { display: inline-block; }
.letak-card img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 360px;
  transition: transform var(--ease), box-shadow var(--ease);
}
.letak-card img:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }

/* --- Prodejny --- */
.stores-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.stores-sidebar {
  width: 215px;
  flex-shrink: 0;
  background: var(--bg-page);
  border-radius: var(--radius);
  padding: 20px 16px;
  position: sticky;
  top: calc(var(--navbar-h) + 20px);
  box-shadow: var(--shadow-sm);
}

.stores-sidebar h3 {
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.stores-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stores-nav a {
  display: block;
  padding: 8px 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .93rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}
.stores-nav a:hover  { background: #fff; color: var(--text); }
.stores-nav a.active { color: var(--red); font-weight: 700; background: #fff; border-left-color: var(--red); }

.stores-content { flex: 1; min-width: 0; }

.store-panel { display: none; }
.store-panel.active { display: block; }

.store-panel h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.store-info {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 24px;
}
.store-info-text { flex: 1 1 260px; }
.store-info-text h2 {
  font-size: 1.35rem;
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.store-info-text p { margin-bottom: 10px; font-size: 1rem; }
.store-info-text a  { color: var(--red); text-decoration: none; }
.store-info-text a:hover { text-decoration: underline; }

.store-map { flex: 1 1 300px; }
.store-map iframe {
  width: 100%; height: 280px; border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* --- Cash & Carry --- */
.cash-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.cash-text { flex: 1 1 300px; font-size: 1.05rem; }
.cash-text p { margin-bottom: 16px; }
.cash-text img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  margin-top: 4px;
}

.cash-letak       { flex: 1 1 240px; text-align: center; }
.cash-letak h2    { color: var(--red); font-size: 1.4rem; margin-bottom: 16px; }
.cash-letak a     { display: inline-block; }
.cash-letak img   {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 520px;
  width: 100%;
  object-fit: cover;
  transition: transform var(--ease);
}
.cash-letak img:hover { transform: scale(1.02); }

.pivo-block {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-page);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.pivo-block img { width: 110px; flex-shrink: 0; border-radius: 8px; }
.pivo-block p   { font-size: 1.05rem; font-weight: 500; }

.contact-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}
.contact-info { flex: 1 1 240px; font-size: 1rem; line-height: 2.1; }
.contact-info h2 {
  font-size: 1.35rem;
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
  margin-bottom: 14px;
  display: inline-block;
}
.contact-info a  { color: var(--red); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

.contact-map { flex: 1 1 320px; }
.contact-map iframe {
  width: 100%; height: 300px; border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-top: 52px;
}

/* --- Kavárna – foto grid --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}

.photo-grid-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .35s ease;
}

.photo-grid-item:hover img {
  transform: scale(1.06);
  filter: brightness(.68);
}

.photo-grid-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  font-size: 2.4rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.photo-grid-item:hover .photo-grid-zoom { opacity: 1; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .93);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 8px;
  user-select: none;
  display: block;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
}

.lightbox-close {
  position: fixed;
  top: 16px; right: 20px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--ease);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); }

.lightbox-counter {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .85);
  font-size: .88rem;
  background: rgba(0, 0, 0, .45);
  padding: 5px 18px;
  border-radius: 20px;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: .03em;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: none;
  font-size: 2.5rem;
  line-height: 1;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--ease);
  user-select: none;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, .3); }
.lightbox-nav.prev  { left: 16px; }
.lightbox-nav.next  { right: 16px; }

/* --- Objednávkový formulář (Cash & Carry) --- */
.order-form { max-width: 580px; margin-top: 10px; }

.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: .95rem;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fafafa;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(230, 25, 25, .1);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-hint {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ==============================================
   Mobilní responzivní styly
   ============================================== */
@media (max-width: 768px) {

  :root { --navbar-h: 64px; }

  /* Navbar */
  .navbar      { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 0; }
  .nav-logo    { height: 44px; }
  .nav-right   { margin-left: auto; }
  .nav-toggle  { display: flex; }
  .nav-fb img  { height: 30px; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 6px 0 10px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 1.1rem;
    padding: 12px 8px;
    border-bottom: none;
    border-left: 3px solid transparent;
    border-radius: 0;
  }
  .nav-links a.active { border-left-color: var(--red); background: #fff5f5; }
  .nav-links a:hover  { background: #fff0f0; border-radius: 0; }

  /* Layout */
  .page-wrap { margin: 16px auto; padding: 0 12px; }
  .card      { padding: 22px 18px; border-radius: var(--radius); }

  .section-title { font-size: 1.3rem; }

  /* Letaky */
  .letak-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Prodejny */
  .stores-layout   { flex-direction: column; }
  .stores-sidebar  { width: 100%; position: static; padding: 12px 10px; }
  .stores-sidebar h3 { margin-bottom: 8px; }
  .stores-nav {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .stores-nav::-webkit-scrollbar { display: none; }
  .stores-nav li { flex-shrink: 0; }
  .stores-nav a {
    white-space: nowrap;
    padding: 6px 14px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 20px;
    border-left: 2px solid var(--border);
    font-size: .88rem;
    color: var(--text);
  }
  .stores-nav a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
  }
  .store-info { flex-direction: column; }

  /* Cash & Carry */
  .cash-layout    { flex-direction: column; }
  .pivo-block     { flex-direction: column; text-align: center; }
  .pivo-block img { width: 90px; }
  .contact-layout { flex-direction: column; }
  .contact-map iframe { margin-top: 0; }

  /* Galerie – foto grid */
  .photo-grid     { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .lightbox-nav   { padding: 6px 12px; font-size: 2rem; }
  .lightbox-nav.prev { left: 6px; }
  .lightbox-nav.next { right: 6px; }

  /* Formulář */
  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 420px) {
  .card { padding: 16px 12px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
}
