/* additions.css: buttons, product image sizing, disabled look, and filter buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.1);
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { box-shadow: 0 6px 16px rgba(0,0,0,.10); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn-secondary { background: #9eab9b; color: #ffffff; border-color: #9eab9b; }

/* Catalog product images unified */
.products .product .product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background: #f0f2f5;
}

/* Disabled-looking buttons (no action yet) */
.btn.is-disabled, .btn.is-disabled:hover, .btn.is-disabled:active {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* Filter buttons row */
.product-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
/* Active filter state */
.btn-filter.is-active {
  background: #9eab9b;
  color: #ffffff;
  border-color: #9eab9b;
}
/* Ghost placeholders to preserve 3-up grid alignment when filtering */
.product.product--ghost {
  visibility: hidden;     /* occupies space but not visible */
  pointer-events: none;
}

/* Hide filtered-out products robustly */
.product.is-hidden { display: none !important; }


/* --- UX tweak: secondary button should only slightly darken on hover/active --- */
a.btn-secondary,
a.btn-secondary:link,
a.btn-secondary:visited {
  background-color: #9eab9b;   /* base green */
  color: #fff;
}

/* Hover: ~6% darker */
a.btn-secondary:hover {
  background: color-mix(in oklab, #9eab9b 94%, black);
}

/* Active: ~12% darker (no full-black flash) */
a.btn-secondary:active {
  background: color-mix(in oklab, #9eab9b 88%, black);
}

/* Smooth transitions */
.btn, .btn-secondary {
  transition: background-color .15s ease, background .15s ease, box-shadow .2s ease, transform .06s ease;
}

/* Fallback when color-mix is unsupported */
@supports not (background: color-mix(in oklab, #000 10%, #fff)) {
  a.btn-secondary:hover  { background-color: #2a3729; } /* ≈ +6% */
  a.btn-secondary:active { background-color: #253225; } /* ≈ +12% */
}

/* Keyboard focus: visible ring without color shift */
a.btn-secondary:focus-visible {
  outline: 2px solid #9eab9b;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(47,62,46,.15);
}


/* Clickable product image linking to detail */
.product a.product-img-link {
  display: block;
  border-radius: 8px;     /* align with .product-img radius */
  overflow: hidden;       /* keep rounded corners for the image */
}
.product a.product-img-link:focus-visible {
  outline: 2px solid #9eab9b;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(47,62,46,.15);
}


/* detail page action buttons */
.detail-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}


/* Breadcrumbs */
.breadcrumbs {
  background: #faf6ed; /* jemný odstín */
  border-radius: 10px;
  padding: .75rem 1rem;
  margin: 1rem 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #2b2b2b;
  box-shadow: 0 1px 2px rgba(0,0,0,.04) inset;
  font-size: 0.975rem;
}
.breadcrumbs .crumbs {
  list-style: none;
  display: flex;
  gap: .5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.breadcrumbs .crumbs li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.breadcrumbs .crumbs li+li:before {
  content: "/";
  opacity: .55;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Prev/Next */
.breadcrumbs .pager {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}
.breadcrumbs .pager a {
  padding: .25rem .5rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.1);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.breadcrumbs .pager .sep {
  opacity: .5;
}
.breadcrumbs .pager a[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}



/* --- Breadcrumbs: minimalist look (override previous styles) --- */
.breadcrumbs {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: .5rem 0 !important;
  margin: .5rem 0 1rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #2b2b2b;
  font-size: .95rem;
  border-top: 1px solid rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.breadcrumbs .crumbs {
  list-style: none;
  display: flex;
  gap: .5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.breadcrumbs .crumbs li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.breadcrumbs .crumbs li+li:before {
  content: "›";
  opacity: .55;
}
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Pager: text links with chevrons, no pills */
.breadcrumbs .pager {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}
.breadcrumbs .pager a {
  background: transparent;
  border: none;
  padding: .125rem .25rem;
  border-radius: 6px;
}
.breadcrumbs .pager a:hover { text-decoration: underline; }
.breadcrumbs .pager .sep { opacity: .45; }
.breadcrumbs .pager a[aria-disabled="true"] { opacity: .4; pointer-events: none; }

@media (max-width: 640px){
  .breadcrumbs { flex-direction: column; align-items: flex-start; gap: .5rem; }
}



/* --- Breadcrumbs fine-tune --- */
.breadcrumbs {
  font-size: .9rem !important;
  border-top: 1px solid rgba(0,0,0,.04) !important;
  border-bottom: 1px solid rgba(0,0,0,.04) !important;
}
.breadcrumbs .crumbs li+li:before { content: "›"; opacity: .5; }
.breadcrumbs a { color: inherit; text-decoration: none; opacity: .9; }
.breadcrumbs a:hover { opacity: 1; text-decoration: underline; }

/* --- Pagination (minimal) --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 0;
  margin: 1rem 0 0;
  border-top: 1px solid rgba(0,0,0,.05);
  font-size: .9rem;
}
.pagination a, .pagination span {
  padding: .25rem .5rem;
  border-radius: 6px;
}
.pagination a {
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
}
.pagination a:hover { text-decoration: underline; }
.pagination .is-current { font-weight: 600; }
.pagination a[aria-disabled="true"] {
  opacity: .45; pointer-events: none;
}


/* --- Pagination: borderless & softer current number --- */
.pagination a {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: .25rem .4rem; /* lehčí odskok */
}
.pagination a:hover { text-decoration: underline; }
.pagination .is-current {
  font-weight: 500;           /* méně tučné */
  color: rgba(0,0,0,.7);      /* jemnější tón */
  padding: .25rem .4rem;
}
.pagination a[aria-disabled="true"] { opacity: .35; }





/* === Top bar for products page ======================================= */
.topbar {
  background: #9eab9b; /* use current site header color; no new colors introduced */
  color: #fff;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1200px;
}
.topbar .brand {
  font-size: 1.25rem;
  font-weight: 700;
}
.topbar .nav-actions .btn.btn-pill {
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0,0,0,.1);
  padding: .55rem 1rem;
}
.topbar .nav-actions .btn.btn-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.10);
}


/* === Compact page header on catalog page ============================== */
header.page-header.compact {
  background: transparent;
  padding-top: 16px;
  padding-bottom: 12px;
  min-height: unset;
  border-bottom: 0;
}
header.page-header.compact .container {
  padding-top: 0;
  padding-bottom: 0;
}
header.page-header.compact h1 {
  margin: 0 0 8px;
}


/* === Topbar adjustments: full-width + right-aligned back button ====== */
.topbar .container { 
  max-width: none;  /* stretch to full page width */
  width: 100%;
}
.topbar .nav-actions { 
  margin-left: auto; 
  display: flex; 
  align-items: center; 
}


/* === Topbar right padding for action button ========================== */
.topbar .nav-actions { padding-right: 28px; } /* space from right edge */
@media (min-width: 1200px){
  .topbar .container { padding-right: 32px; }
}


/* === Topbar equal left/right spacing ================================= */
.topbar .container {
  padding-left: 20px;
  padding-right: 20px;
}
.topbar .nav-actions { padding-right: 0; margin-right: 0; }
@media (min-width: 1200px){
  .topbar .container { padding-left: 20px; padding-right: 20px; }
}


/* === Topbar: center content with fixed max-width ===================== */
.topbar .container {
  max-width: 1120px;   /* keeps button away from the hard right edge */
  margin: 0 auto;
  padding: 12px 20px;  /* keep the same inner gutters */
}
.topbar .nav-actions { margin-left: auto; }


/* === Sticky footer (catalog + product details + all pages) =========== */
html, body { height: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* push footer to the bottom when content is short */
footer { margin-top: auto !important; }


/* === Responsive tweaks =============================================== */
/* Tablets and down */
@media (max-width: 900px){
  .topbar .brand { font-size: 1.05rem; }
  .topbar .container { padding: 10px 16px; }
  .btn.btn-pill { padding: .5rem .9rem; }
  .breadcrumbs { font-size: .9rem; }
  .products { gap: 16px; }
  .product { padding: 16px; }
}

/* Phones */
@media (max-width: 600px){
  .topbar .container { padding: 10px 14px; }
  .topbar .brand { font-size: 1rem; }
  .product-filters { display:flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
  .btn.btn-filter { padding: .45rem .75rem; font-size: .95rem; }
  .product h3 { font-size: 1.05rem; }
  .breadcrumbs { font-size: .85rem; }
  .pagination { font-size: .85rem; }
}

/* Very small phones */
@media (max-width: 380px){
  .product-filters { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .product-filters .btn { display:inline-block; }
  .btn.btn-pill { padding: .45rem .7rem; }
}


/* === Mobile header & breadcrumbs alignment =========================== */
@media (max-width: 600px){
  /* keep same gutters left/right as desktop feel */
  .topbar .container { padding-left: 20px; padding-right: 20px; }
  .topbar .nav-actions { padding-right: 0; }

  /* put pager to the right on the breadcrumbs row */
  .breadcrumbs { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 8px;
    flex-wrap: nowrap;
  }
  .breadcrumbs .crumbs { flex: 1 1 auto; min-width: 0; }
  .breadcrumbs .pager { margin-left: auto; white-space: nowrap; }
}


/* === Mobile breadcrumbs: force single line =========================== */
@media (max-width: 600px){
  .breadcrumbs { display:flex; align-items:center; gap:8px; }
  .breadcrumbs .crumbs{
    display:flex; gap:6px; 
    flex-wrap: nowrap;          /* no wrapping on crumbs */
    min-width: 0;               /* allow ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breadcrumbs .pager{
    flex: 0 0 auto; 
    margin-left:auto; 
    white-space:nowrap;
  }
}


@media (max-width: 600px){
  /* force one-line layout with flexible crumbs area */
  .breadcrumbs { display:flex; align-items:center; }
  .breadcrumbs .crumbs{ 
    display:flex; gap:6px; 
    flex: 1 1 auto;           /* allow shrinking to keep pager on same line */
    min-width: 0; 
    white-space: nowrap; 
    overflow: hidden; text-overflow: ellipsis; 
    margin-right: 8px;
  }
  .breadcrumbs .pager{ flex: 0 0 auto; white-space: nowrap; }
}
