/*
  LAYOUT.CSS – hlavička, navigácia, vyhľadávanie v hlavičke, footer
*/

/* ===== Hlavička ===== */
.hlavicka {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(22, 29, 49, 0.8);
  backdrop-filter: blur(0.4rem);
  border-bottom: 1px solid var(--okraj);
}
.hlavicka .obal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

/* ===== Logo ===== */
.logo {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.3rem;
  white-space: nowrap;
}
.logo span { color: var(--akcia); }

/* ===== Hamburger (mobil) ===== */
.prepnut-nav {
  display: inline-flex;
  flex-direction: column;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid var(--okraj);
  padding: 0.6rem 0.7rem;
  border-radius: 0.7rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.prepnut-nav .ciara {
  width: 1.3rem;
  height: 0.13rem;
  background: var(--text);
}

/* ===== Navigácia ===== */
.navigacia {
  position: fixed;
  left: 0;
  right: 0;
  top: 3.6rem;
  background: var(--panel);
  transform: translateY(-120%);
  transition: transform 0.25s ease;
  box-shadow: var(--tien);
  border-bottom: 1px solid var(--okraj);
}
.navigacia[data-zatvorene="false"] { transform: translateY(0); }

.zoznam-navigacie {
  list-style: none;
  padding: 0.8rem;
}
.zoznam-navigacie li a {
  display: block;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 0.7rem;
}
.zoznam-navigacie li a:hover {
  background: rgba(255,255,255,0.06);
}

/* ===== Dropdown podmenu ===== */
.ma-podmenu { position: relative; }
.podmenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--panel);
  border: 1px solid var(--okraj);
  border-radius: 0.6rem;
  box-shadow: var(--tien);
  list-style: none;
  padding: 0.5rem 0;
  display: none;
  min-width: 12rem;
  z-index: 200;
}
.podmenu li a {
  display: block;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  transition: background 0.2s ease;
}
.podmenu li a:hover { background: rgba(255,255,255,0.06); }

/* ===== Košík ikona ===== */
.kosik-odkaz { position: relative; }
.pocitadlo-kosika {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  font-size: 0.75rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--akcia);
  color: #03121b;
  font-weight: 700;
  margin-left: 0.4rem;
}

/* ===== Live vyhľadávanie v hlavičke ===== */
.header-search {
  position: relative;
  flex: 1;
  margin: 0 1rem;
  max-width: 520px;
}
.header-search-form input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid var(--okraj);
  background: #0c101b;
  color: var(--text);
  outline: none;
}
.header-search-form input:focus {
  border-color: rgba(46,164,230,0.7);
}
.header-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.6rem);
  background: var(--panel);
  border: 1px solid var(--okraj);
  border-radius: 0.8rem;
  box-shadow: var(--tien);
  z-index: 400;
  display: none;
  overflow: hidden;
}
.header-search-results[data-open="true"] { display: block; }

.search-result-item {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--okraj);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,0.06); }

.search-result-thumb {
  width: 46px;
  height: 46px;
  border-radius: 0.6rem;
  background: #0c101b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.search-result-thumb img { width: 100%; height: 100%; object-fit: contain; }

.search-result-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.search-result-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub  { font-size: 0.85rem; color: var(--tichy); }
.search-result-price { font-size: 0.9rem; font-weight: 700; margin-left: auto; white-space: nowrap; }

.search-result-footer {
  padding: 0.7rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255,255,255,0.03);
}
.search-result-footer a { color: var(--akcia); text-decoration: none; font-weight: 600; }

/* ===== Footer ===== */
.footer {
  background: #0c101b;
  border-top: 1px solid var(--okraj);
  margin-top: auto;
  padding-top: 2.5rem;
}
.footer-obsah {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer h3 { font-size: 1.6rem; color: var(--akcia); margin-bottom: 0.6rem; }
.footer h4 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text); }
.footer-text { color: var(--tichy); font-size: 0.95rem; line-height: 1.4rem; }
.footer-menu { list-style: none; padding: 0; }
.footer-menu li a {
  text-decoration: none;
  color: var(--tichy);
  font-size: 0.95rem;
  display: block;
  padding: 0.2rem 0;
  transition: color 0.2s ease;
}
.footer-menu li a:hover { color: var(--akcia); }
.footer-spodok {
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid var(--okraj);
  background: #0a0e17;
}
.footer-spodok p { color: var(--tichy); font-size: 0.85rem; }

/* ===== Responzivita ===== */
@media (min-width: 48rem) {
  .navigacia {
    position: static;
    transform: none !important;
    background: transparent;
    box-shadow: none;
    border: none;
  }
  .zoznam-navigacie { display: flex; gap: 0.6rem; padding: 0; }
  .prepnut-nav { display: none; }
  .ma-podmenu:hover > .podmenu { display: block; }
}

@media (max-width: 48rem) {
  .hlavicka .obal { gap: 0.7rem; }
  .header-search { display: block; flex: 1; margin: 0; max-width: none; min-width: 0; }
  .header-search-form input { padding: 0.55rem 0.65rem; font-size: 0.95rem; }
  .header-search-results { left: 0; right: 0; }

  /* ===== Mobil: podmenu ako akordeon ===== */
  .ma-podmenu > a::after {
    content: ' ▸';
    font-size: 0.75rem;
    opacity: 0.5;
    transition: transform 0.2s;
    display: inline-block;
  }
  .ma-podmenu.podmenu-otvorene > a::after {
    transform: rotate(90deg);
  }
  .podmenu {
    position: static;
    display: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    background: transparent;
  }
  .ma-podmenu.podmenu-otvorene > .podmenu {
    display: block;
  }
  .podmenu li a {
    padding-left: 1.8rem;
    font-size: 0.9rem;
    color: var(--tichy);
  }
}

@media (max-width: 360px) { .logo { font-size: 1.05rem; } }
