/*
Theme Name: Naše Limča (Blank)
Version: 1.3.2
*/

/* ===== 1. ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ ===== */
:root {
  --primary-color: #ff5a58;        /* Tvá hlavní korálová/červená */
  --secondary-color: #247b7b;      /* Tyrkysová/petrolejová z loga */
  --accent-color: #ffe066;         /* Žlutá z loga */
  --text-color: #222222;
  --background-color: #fffaf7;
  --white-color: #ffffff;
  --font-main: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Výška sticky headeru pro kotvy */
  --header-h: 90px;
}

@media (max-width: 768px) {
  :root { --header-h: 70px; }
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.6;
}

html { scroll-behavior: smooth; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }

/* ===== 2. HARD RESET MEZER NA HRANĚ OBSAHU (Gutenberg fix) ===== */
body > :where(header,main,footer){margin:0 !important;padding:0 !important}

:where(.wp-site-blocks,.wp-block-post-content,.entry-content,.page,.post,.hentry,
       .type-page,.type-post,.site-main,#primary){margin:0 !important;padding:0 !important}

:where(main,#primary,.site-main,.entry-content,.wp-site-blocks,.wp-block-post-content)
  > :first-child { margin-block-start:0 !important; padding-block-start:0 !important; }
:where(main,#primary,.site-main,.entry-content,.wp-site-blocks,.wp-block-post-content)
  > :last-child { margin-block-end:0 !important; padding-block-end:0 !important; }

:where(.wp-block-group,.is-layout-flow,.is-layout-constrained,.wp-block-columns,
       .wp-block-cover,.wp-block-paragraph,.wp-block-heading):first-child { margin-block-start:0 !important; padding-block-start:0 !important; }
:where(.wp-block-group,.is-layout-flow,.is-layout-constrained,.wp-block-columns,
       .wp-block-cover,.wp-block-paragraph,.wp-block-heading):last-child  { margin-block-end:0 !important; padding-block-end:0 !important; }

.wp-block-spacer { display:none !important; }

header,footer{margin:0}

/* ===== 3. STICKY HEADER & NAVIGACE ===== */
header {
  background: var(--white-color);
  padding: 20px 0; /* Zvětšeno z 15px pro elegantnější výšku hlavičky */
  border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 1000;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
}

header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "logo nav cart";
  align-items: center;
  column-gap: 16px;
}

.logo-link { grid-area: logo; display: inline-flex; align-items: center; }
nav        { grid-area: nav; justify-self: center; }
.cart-button{ grid-area: cart; justify-self: end; }

.logo {
  height: 60px; /* Zvětšeno z 50px, aby se logo nedeformovalo a nebylo useknuté */
  max-width: 100%;
  width: auto;
  display: block;
}

nav ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; gap: 25px;
}
nav a {
  text-decoration: none; color: var(--text-color);
  font-weight: 700; line-height: 1.2; transition: color .2s ease;
}
nav a:hover, nav a:focus-visible { color: var(--primary-color); outline: none; }

/* Tlačítko košík (DESKTOP) - Opraveno na 15px */
.cart-button {
  background-color: var(--primary-color); color: var(--white-color);
  padding: 10px 20px; border-radius: 15px; text-decoration: none;
  font-weight: 700; white-space: nowrap;
  transition: background-color .2s ease, transform .1s ease;
}
.cart-button:hover, .cart-button:focus-visible { background-color: #d94643; outline: none; }
.cart-button:active { transform: translateY(1px); }

/* Mobilní menu ovládací prvky */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nav-toggle-label { display: none; cursor: pointer; }
.burger, .close { width: 22px; height: 22px; display: inline-block; }
.cart-mobile { display: none; }

/* Kotvy – odskočí pod sticky header */
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
body.admin-bar header { top: 32px; }
body.admin-bar section[id] { scroll-margin-top: calc(var(--header-h) + 32px); }

/* RESPONSIVE TABLET & MOBIL */
@media (max-width: 1024px) {
  .logo { height: 52px; }
  nav ul { gap: 18px; }
  .cart-button { padding: 10px 18px; }
}

@media (max-width: 768px) {
  body.admin-bar header { top: 46px; }
  body.admin-bar section[id] { scroll-margin-top: calc(var(--header-h) + 46px); }

  header .container {
    grid-template-columns: 1fr auto;
    grid-template-areas: "logo toggle" "nav nav";
    row-gap: 10px;
  }
  .logo { height: 50px; }
  .nav-toggle-label {
    grid-area: toggle; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid #ddd; border-radius: 10px; background: transparent;
  }
  nav {
    grid-area: nav; width: 100%; overflow: hidden; max-height: 0; opacity: 0;
    transition: max-height .3s ease, opacity .25s ease; justify-self: stretch;
  }
  nav ul { flex-direction: column; gap: 12px; padding: 10px 0; }
  nav a { display: block; padding: 10px 6px; }
  
  .cart-mobile { display: list-item; }
  .cart-mobile a {
    display: block; text-align: center; background: var(--primary-color); color: var(--white-color);
    padding: 12px 16px; border-radius: 12px; font-weight: 800; text-decoration: none;
  }
  .nav-toggle:checked ~ nav, nav.nav-open { max-height: 320px; opacity: 1; }
  .nav-toggle:checked + .nav-toggle-label .burger { display: none; }
  .nav-toggle:checked + .nav-toggle-label .close { display: inline-block; }
  .nav-toggle:not(:checked) + .nav-toggle-label .close { display: none; }
  .nav-toggle:not(:checked) + .nav-toggle-label .burger { display: inline-block; }
  .cart-button { display: none; }
}

@media (max-width: 400px) {
  .logo { height: 42px; }
  nav a { padding: 12px 2px; }
  nav ul { gap: 10px; }
}

/* ===== 4. SEKCE WEBU (OBSAH HOMEPAGE) ===== */
section { padding: 40px 0; }
section h2 { font-size: 2.5rem; font-weight: 900; color: var(--secondary-color); margin-bottom: 40px; }

/* Hero Sekce */
.hero {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 100px 20px; min-height: 70vh;
  background-image: url("http://nase-limca.cz/wp-content/uploads/2025/08/pozadi.png");
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 3.5rem; font-weight: 900; color: var(--primary-color); margin: 0 0 10px; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; color: #ffffff; }

.cta-button {
  background: var(--primary-color); color: var(--white-color);
  padding: 15px 35px; font-size: 1.1rem; font-weight: 700; text-decoration: none; border-radius: 50px;
  transition: transform 0.3s ease, background-color 0.3s ease; display: inline-block;
}
.cta-button:hover { background-color: #d94643; transform: translateY(-3px); }

/* Sekce pod Hero s obrázkem */
.image-section { padding: 0; line-height: 0; }
.full-width-image { width: 100%; height: auto; object-fit: cover; max-height: 550px; }

/* O nás */
#o-nas { background-color: var(--white-color); }
.story-text { max-width: 700px; margin: 0 auto; font-size: 1.1rem; }

/* Produkty (Grid) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.product-card {
  background: var(--white-color); border-radius: 15px; overflow: hidden; text-align: center;
  padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.product-card img { max-width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; }
.product-card h3 { margin: 0 0 10px; font-size: 1.5rem; color: var(--primary-color); }
.product-card .price { font-size: 1.8rem; font-weight: 900; color: var(--secondary-color); margin: 20px 0; }

.add-to-cart-btn {
  background: var(--secondary-color); color: var(--white-color); border: none;
  padding: 12px 25px; border-radius: 50px; font-weight: 700; cursor: pointer; width: 100%;
  font-family: var(--font-main); font-size: 1rem; transition: background-color 0.3s ease;
}
.add-to-cart-btn:hover { background-color: #1a5959; }

/* Vlastnosti (Kompletní oprava vycentrování panelů a emoji) */
.features .container { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 40px; 
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-item { 
  background: var(--white-color); 
  padding: 40px 30px; 
  border-radius: 15px; 
  text-align: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-item:nth-child(1) { border-bottom: 5px solid var(--primary-color); }
.feature-item:nth-child(2) { border-bottom: 5px solid var(--accent-color); }
.feature-item:nth-child(3) { border-bottom: 5px solid var(--secondary-color); }

/* Oprava nefunkčního selektoru pro emoji/ikony */
.feature-item span, .feature-item div, .feature-item svg, .feature-item i { 
  font-size: 3rem !important; 
  color: var(--primary-color); 
  margin-bottom: 15px; 
  display: inline-block;
  line-height: 1;
}
.feature-item h3 { margin: 0 0 10px; font-size: 1.8rem; color: var(--secondary-color); font-weight: 700; }
.feature-item p { font-size: 1.1rem; margin: 0; color: #555; }

/* Mobilní úpravy sekcí */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero p  { font-size: 1rem; }
  section { padding: 60px 0; }
  section h2 { font-size: 2rem; }
}

/* ===== 5. PŘÍSTUPNOST A POMOCNÉ STYLY ===== */
:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary-color) 60%, #000 0%); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== 6. ARCHITEKTURA PRO STICKY FOOTER (Drží patičku dole) ===== */
html, body {
  height: 100%;
}

body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

body.admin-bar { min-height: calc(100vh - 32px) !important; }
@media (max-width: 782px) { body.admin-bar { min-height: calc(100vh - 46px) !important; } }

.site-wrapper {
  flex: 1 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100%;
  background-color: #fbfbfb;
}

.site-main {
  flex: 1 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Finální nastylovaná patička */
footer {
  flex-shrink: 0 !important;
  margin-top: auto !important;
  background-color: var(--secondary-color) !important;
  color: var(--white-color);
  padding: 60px 0 20px !important;
}
footer h2 { color: var(--white-color); margin-bottom: 20px; }
footer a { color: var(--accent-color); text-decoration: none; }
footer a:hover { text-decoration: underline; }

copyright { display: block; margin-top: 40px; opacity: .7; font-size: .9rem; }



/* ===== 7. STRÁNKA KOŠÍKU (Omluva) ===== */
.cart-notice-card {
  background: var(--white-color);
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  
  /* Tento trik kartu vycentruje na střed zbývajícího prostoru */
  margin: auto auto; 
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Obal, který simuluje flexbox na pozadí stránky košíku bez ovlivnění zbytku webu */
.cart-notice-card {
  /* Zajistí, že prostor pro kartu bude mít výšku přes celou obrazovku minus header a footer */
  margin-top: calc((100vh - var(--header-h) - 300px) / 2);
  margin-bottom: calc((100vh - var(--header-h) - 300px) / 2);
  margin-left: auto;
  margin-right: auto;
}

/* Pokud by byla výška okna moc malá, aby karta nelezla do patičky */
@media (max-height: 700px) {
  .cart-notice-card {
    margin-top: 40px;
    margin-bottom: 40px;
  }
}

.cart-notice-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: inline-block;
}

.cart-notice-card h1 {
  font-family: var(--font-main);
  font-size: 2.2rem;
  font-weight: 800;
  color: #222222;
  margin: 0 0 20px 0 !important;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.cart-notice-card p {
  font-family: var(--font-main);
  font-size: 1.1rem;
  color: #555555;
  margin: 0 0 30px 0 !important;
  line-height: 1.6;
}

.cart-notice-card p a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
}

.cart-notice-card p a:hover {
  text-decoration: underline;
}

.cart-notice-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white-color) !important;
  text-decoration: none !important;
  padding: 14px 35px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cart-notice-btn:hover {
  background-color: #d94643;
  transform: translateY(-2px);
}

.cart-notice-btn:active {
  transform: translateY(1px);
}

/* Mobilní optimalizace pro kartu košíku */
@media (max-width: 500px) {
  .cart-notice-card {
    padding: 30px 20px;
    margin-top: 30px;
    margin-bottom: 30px;
  }
  .cart-notice-card h1 {
    font-size: 1.8rem;
  }
}