/* Rojkowa child theme: loaded after hummingbird theme.css (priority 1000). */

/* Brand block */
.header-brand {
  padding: 1.5rem 0 1rem;
}

.header-brand__title {
  display: inline-block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  padding-left: 0.35em; /* balances the trailing letter-spacing so the word looks centred */
  line-height: 1.1;
  color: inherit;
  text-decoration: none;
}

.header-brand__tagline {
  max-width: 42rem;
  margin: 0.75rem auto 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

/* Header row: menu, search, account and cart in one line (desktop) */
@media (min-width: 768px) {
  .header-bottom__row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .header-bottom__row .ps-mainmenu--desktop {
    flex: 1 1 auto;
    width: auto;
  }

  #_desktop_ps_searchbar {
    order: 2;
    margin-left: auto;
  }

  #_desktop_ps_customersignin,
  #_desktop_ps_shoppingcart {
    order: 3;
    flex: 0 0 auto;
    width: auto;
    display: flex;
    align-items: center;
  }
}

/* Header row on phones: hamburger, search, account and cart in one line */
@media (max-width: 767.98px) {
  .header-bottom__row {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  #_desktop_ps_customersignin,
  #_desktop_ps_shoppingcart {
    display: none;
  }
}

/* Social icons at the end of the header row (desktop) */
.header-social {
  order: 4;
  gap: 0.75rem;
  padding-left: 0.5rem;
}

.header-social__link {
  display: inline-flex;
  color: inherit;
  opacity: 0.75;
}

.header-social__link:hover {
  opacity: 1;
}

/* Footer: light background, quiet and small type */
.footer__main {
  background-color: #f7f5f2;
  color: #444;
  border-top: 1px solid #e6e1da;
}

.footer__main :is(a, h1, h2, h3, h4, h5, h6, p, li, span, label) {
  color: #444;
}

.footer__main,
.footer__main a,
.footer__before {
  font-size: 0.8rem;
}

.footer__main a:hover {
  color: #000;
}

.footer__main .copyright {
  margin-top: 1rem;
  text-align: center;
  color: #777;
}

/* Cookie consent banner (assets/js/custom.js) */
.cookie-consent {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1080;
  box-sizing: border-box;
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.1rem 1.25rem;
  background: #fff;
  color: #222;
  border: 1px solid #d9d3ca;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.85rem;
  line-height: 1.5;
}

.cookie-consent[hidden],
.cookie-consent [hidden] {
  display: none !important;
}

.cookie-consent__title {
  margin: 0 0 0.4rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.cookie-consent__text {
  margin: 0 0 0.8rem;
}

.cookie-consent__text a {
  color: #222;
  text-decoration: underline;
}

.cookie-consent__details {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.75rem;
  background: #f7f5f2;
}

.cookie-consent__option {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
}

.cookie-consent__option input {
  margin-top: 0.2rem;
  flex: none;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

/* "Reject" and "Accept" are deliberately styled the same (same size, same look) */
.cookie-consent__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1 1 8rem;
  padding: 0.55rem 0.9rem;
  background: #222;
  color: #fff;
  border: 1px solid #222;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent__btn:hover,
.cookie-consent__btn:focus-visible {
  background: #000;
}

.cookie-consent__link {
  padding: 0.4rem 0.25rem;
  background: none;
  border: 0;
  color: #222;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-consent button:focus-visible,
.cookie-consent a:focus-visible,
.cookie-consent input:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .cookie-consent {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    width: auto;
  }
}

/* Homepage product tiles and session photos link to products: keep images crisp and uniform */
#content-wrapper .products img,
.custom-text img {
  max-width: 100%;
  height: auto;
}

/* ===== COLOR TEST (accent: leather brown) =====
   To go back to the previous look: delete everything from this line to the end of the file,
   or restore custom.css.bak-przed-kolorami. */
:root {
  --rojkowa-accent: #8a5a3b;
  --rojkowa-accent-dark: #6e4529;
  --rojkowa-accent-rgb: 138, 90, 59;
  --bs-primary: #8a5a3b;
  --bs-primary-rgb: 138, 90, 59;
  --bs-link-color: #8a5a3b;
  --bs-link-color-rgb: 138, 90, 59;
  --bs-link-hover-color: #6e4529;
  --bs-link-hover-color-rgb: 110, 69, 41;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #8a5a3b;
  --bs-btn-border-color: #8a5a3b;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #6e4529;
  --bs-btn-hover-border-color: #6e4529;
  --bs-btn-focus-shadow-rgb: 138, 90, 59;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #5c3a22;
  --bs-btn-active-border-color: #5c3a22;
  --bs-btn-disabled-bg: #8a5a3b;
  --bs-btn-disabled-border-color: #8a5a3b;
}

.btn-outline-primary {
  --bs-btn-color: #8a5a3b;
  --bs-btn-border-color: #8a5a3b;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #8a5a3b;
  --bs-btn-hover-border-color: #8a5a3b;
  --bs-btn-active-bg: #6e4529;
  --bs-btn-active-border-color: #6e4529;
}

/* Better contrast for small grey texts */
.header-brand__tagline { color: #444; }
.footer__main .copyright { color: #5f5f5f; }
.footer__main a:hover { color: var(--rojkowa-accent-dark); }

/* Keep cookie banner and page content links readable */
.cookie-consent__text a,
.cookie-consent__link { color: #222; }
.header-social__link:hover { color: var(--rojkowa-accent); }
/* ===== END COLOR TEST ===== */

/* Header menu fit (desktop): keep the menu on one line next to a narrower search box */
@media (min-width: 768px) {
  #_desktop_ps_searchbar {
    flex: 0 1 12rem;
    max-width: 12rem;
    min-width: 0;
  }

  /* .ps-searchbar has its own min-width in the parent theme and would cover "Zaloguj się" */
  #_desktop_ps_searchbar :is(.ps-searchbar, form, input, .search-widget) {
    width: 100%;
    min-width: 0;
  }

  #_desktop_ps_searchbar .ps-searchbar__input {
    text-overflow: ellipsis;
  }

  /* room for the clear button is needed only once something is typed */
  #_desktop_ps_searchbar .ps-searchbar__input:placeholder-shown {
    padding-right: 0.25rem;
  }

  /* smaller hint only, so that "Szukaj produktów..." fits; typed text keeps its size */
  #_desktop_ps_searchbar .ps-searchbar__input::placeholder {
    font-size: 0.8125rem;
  }
}

/* Laptop widths: tighter spacing leaves enough room for the search box */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  #_desktop_ps_searchbar,
  #_desktop_ps_customersignin,
  #_desktop_ps_shoppingcart {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  #_desktop_ps_customersignin .header-block__action-btn,
  #_desktop_ps_shoppingcart .header-block__action-btn {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

@media (min-width: 1200px) {
  .header-bottom__row .ps-mainmenu--desktop {
    flex: 0 0 auto;
  }

  .header-bottom__row .ps-mainmenu__tree {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }
}

/* Form controls: brown instead of the parent theme's hard-coded blue (checkboxes, radios, focus rings) */
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
  background-color: #8a5a3b;
  border-color: #8a5a3b;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #b89479;
  box-shadow: 0 0 0 0.25rem rgba(138, 90, 59, 0.25);
}

.nav-link:focus-visible,
.stars-selector:has(.stars-selector__input:focus-visible),
.search-filters__form-check--color .color:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(138, 90, 59, 0.25);
}

.nav-pills {
  --bs-nav-pills-link-active-bg: #8a5a3b;
}

.form-range::-webkit-slider-thumb { background-color: #8a5a3b; }
.form-range::-moz-range-thumb { background-color: #8a5a3b; }

/* ===== Product image zoom (modal): big dialog, full original, +/- zoom, pinch, drag ===== */
.product-images-modal .modal-dialog {
  max-width: none;
  width: 96vw;
  height: 96vh;
  margin: 2vh auto;
}

.product-images-modal .modal-content {
  height: 100%;
  position: relative;
}

.product-images-modal__body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.product-images-modal__carousel,
.product-images-modal__carousel .carousel-inner,
.product-images-modal__carousel .carousel-item {
  width: 100%;
  height: 100%;
}

.product-images-modal__carousel .carousel-item {
  touch-action: pan-x pan-y; /* pinch is handled by custom.js, not by the browser */
}

.product-images-modal__carousel .carousel-item picture {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.product-images-modal__carousel .carousel-item img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(96vh - 5rem);
  object-fit: contain;
  cursor: zoom-in;
  -webkit-user-drag: none;
  user-select: none;
}

.product-images-modal__carousel .carousel-item.is-zoomed {
  overflow: auto;
}

.product-images-modal__carousel .carousel-item.is-zoomed picture {
  display: flex;
  width: max-content;
  min-width: 100%;
  height: auto;
  min-height: 100%;
}

.product-images-modal__carousel .carousel-item.is-zoomed img {
  flex: none;
  max-width: none;
  max-height: none;
  margin: auto;
  cursor: grab;
}

.product-images-modal__carousel .carousel-item.is-dragging img {
  cursor: grabbing;
}

.product-images-modal__zoom-controls {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d9d3ca;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.product-images-modal__zoom-controls button {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  background: #222;
  color: #fff;
  border: 0;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.product-images-modal__zoom-controls button:hover,
.product-images-modal__zoom-controls button:focus-visible {
  background: #8a5a3b;
}

.product-images-modal__zoom-controls button[data-zoom="reset"] {
  font-size: 0.85rem;
}
/* ===== END Product image zoom ===== */

/* Mobile menu: side panel that leaves part of the page visible (tap outside to close) */
@media (max-width: 767.98px) {
  .ps-mainmenu--mobile.offcanvas {
    --bs-offcanvas-width: min(62vw, 16rem);
    width: var(--bs-offcanvas-width);
    max-width: var(--bs-offcanvas-width);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
  }

  .ps-mainmenu--mobile .menu__list li {
    border-bottom: 1px solid #e6e1da;
  }

  .ps-mainmenu--mobile .menu__list li:last-child {
    border-bottom: 0;
  }
}
