/* categories-widget.css */

/* =========================================
   RajskieTajskie — Kategorie GRID + Sidebar
   Zachowane te same selektory widgetów
   Bez gradientów / bez box-shadow / radius 16px
========================================= */

.elementor-widget-herbalovo_categories,
.elementor-widget-herbalovo_category_sidebar{
  --hbcat-accent: var(--c-primary, #950d11);
  --hbcat-accent-hover: var(--c-primary-hover, #c41116);
  --hbcat-text: var(--c-text, #1b1b1f);
  --hbcat-muted: var(--c-muted, #5d6068);
  --hbcat-border: var(--c-border, #e9e9ee);
  --hbcat-surface: #ffffff;
  --hbcat-surface-soft: #F5F7FB;
  --hbcat-radius: 16px;
  --hbcat-ring: 0 0 0 3px color-mix(in srgb, var(--hbcat-accent) 16%, transparent);
}

.elementor-widget-herbalovo_categories .hbcat-wrap,
.elementor-widget-herbalovo_categories .hbcat-wrap *{
  box-sizing: border-box;
}

.elementor-widget-herbalovo_categories .hbcat-wrap{
  width: 100%;
  margin: 0 auto 24px;
}

/* ----- HEAD ----- */
body .elementor-widget-herbalovo_categories .hbcat-head.hbcat-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--hbcat-border);
  border-radius: var(--hbcat-radius);
}

body .elementor-widget-herbalovo_categories .hbcat-heading.hbcat-heading{
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--hbcat-text);
  letter-spacing: 0;
}

@media (max-width: 767px){
  body .elementor-widget-herbalovo_categories .hbcat-heading.hbcat-heading{
    font-size: 22px;
  }
}

/* ----- BACK BUTTON ----- */
.elementor-widget-herbalovo_categories .hbcat-back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--hbcat-border);
  color: var(--hbcat-accent);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.elementor-widget-herbalovo_categories .hbcat-back:hover,
.elementor-widget-herbalovo_categories .hbcat-back:focus-visible{
  background: var(--hbcat-surface-soft);
  border-color: color-mix(in srgb, var(--hbcat-accent) 26%, var(--hbcat-border));
  color: var(--hbcat-accent-hover);
  outline: none;
}

:where(.hbcat-back__ico, .hbcat-side__back-ico){
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("https://rajskietajskie.pl/wp-content/uploads/2026/03/undo-2-1.svg") center/contain no-repeat;
  mask: url("https://rajskietajskie.pl/wp-content/uploads/2026/03/undo-2-1.svg") center/contain no-repeat;
}

/* ----- GRID ----- */
.elementor-widget-herbalovo_categories .hbcat-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1199px){
  .elementor-widget-herbalovo_categories .hbcat-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991px){
  .elementor-widget-herbalovo_categories .hbcat-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px){
  .elementor-widget-herbalovo_categories .hbcat-grid{
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.elementor-widget-herbalovo_categories .hbcat-cell{
  min-width: 0;
}

/* ----- CARD ----- */
.elementor-widget-herbalovo_categories .hbcat-item{
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--hbcat-border);
  border-radius: 16px;
  transition: background-color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.elementor-widget-herbalovo_categories .hbcat-item:hover,
.elementor-widget-herbalovo_categories .hbcat-item:focus-visible{
  background: var(--hbcat-surface-soft);
  border-color: color-mix(in srgb, var(--hbcat-accent) 24%, var(--hbcat-border));
  outline: none;
}

.elementor-widget-herbalovo_categories .hbcat-imgbox{
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 90px;
  background: var(--hbcat-surface-soft);
  overflow: hidden;
  flex-shrink: 0;
  border-bottom: 1px solid var(--hbcat-border);
}

.elementor-widget-herbalovo_categories .hbcat-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
}

@media (min-width: 768px){
  .elementor-widget-herbalovo_categories .hbcat-img{
    padding: 22px;
  }
}

.elementor-widget-herbalovo_categories .hbcat-ph{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--hbcat-border) 35%, #fff);
}

.elementor-widget-herbalovo_categories .hbcat-fallback{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--hbcat-muted);
}

.elementor-widget-herbalovo_categories .hbcat-name{
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 14px 6px;
  color: var(--hbcat-text);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
}

.elementor-widget-herbalovo_categories .hbcat-meta{
  display: block;
  padding: 0 14px 14px;
  color: var(--hbcat-muted);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.elementor-widget-herbalovo_categories .hbcat-item:hover .hbcat-name,
.elementor-widget-herbalovo_categories .hbcat-item:focus-visible .hbcat-name{
  color: var(--hbcat-accent);
}

@media (max-width: 767px){
  .elementor-widget-herbalovo_categories .hbcat-item{
    min-height: 0;
  }

  .elementor-widget-herbalovo_categories .hbcat-imgbox{
    aspect-ratio: auto;
    height: clamp(160px, 42vw, 220px);
    min-height: 160px;
  }

  .elementor-widget-herbalovo_categories .hbcat-img{
    padding: 12px;
  }

  .elementor-widget-herbalovo_categories .hbcat-name{
    padding: 12px 12px 6px;
    font-size: 14px;
  }

  .elementor-widget-herbalovo_categories .hbcat-meta{
    padding: 0 12px 12px;
    font-size: 12px;
  }

  .elementor-widget-herbalovo_categories .hbcat-head{
    flex-wrap: wrap;
  }

  .elementor-widget-herbalovo_categories .hbcat-back{
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 380px){
  .elementor-widget-herbalovo_categories .hbcat-imgbox{
    height: clamp(140px, 46vw, 190px);
    min-height: 140px;
  }

  .elementor-widget-herbalovo_categories .hbcat-img{
    padding: 10px;
  }
}

/* =========================================
   SIDEBAR KATEGORII
========================================= */

.elementor-widget-herbalovo_category_sidebar .hbcat-side{
  color: var(--hbcat-text);
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__desktop{
  display: block;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__mobile{
  display: none;
}

@media (max-width: 767px){
  .elementor-widget-herbalovo_category_sidebar .hbcat-side__desktop{
    display: none;
  }

  .elementor-widget-herbalovo_category_sidebar .hbcat-side__mobile{
    display: block;
  }
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__title{
  margin: 0 0 16px 0;
  padding: 0;
  color: var(--hbcat-text);
  line-height: 1.25;
  font-size: 18px;
  font-weight: 700;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__back{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px 0;
  padding: 10px 12px;
  border-radius: 16px;
  text-decoration: none;
  background: #fff;
  color: var(--hbcat-accent);
  border: 1px solid var(--hbcat-border);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__back:hover,
.elementor-widget-herbalovo_category_sidebar .hbcat-side__back:focus-visible{
  background: var(--hbcat-surface-soft);
  color: var(--hbcat-accent-hover);
  border-color: color-mix(in srgb, var(--hbcat-accent) 26%, var(--hbcat-border));
  outline: none;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__back-txt{
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__item{
  margin: 0 0 4px;
  padding: 0;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--hbcat-text);
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__link:hover,
.elementor-widget-herbalovo_category_sidebar .hbcat-side__link:focus-visible{
  background: var(--hbcat-surface-soft);
  color: var(--hbcat-accent);
  outline: none;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__name{
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__pill{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hbcat-surface-soft);
  border: 1px solid color-mix(in srgb, var(--hbcat-surface-soft) 40%, var(--hbcat-border));
  color: var(--hbcat-muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__link:hover .hbcat-side__pill,
.elementor-widget-herbalovo_category_sidebar .hbcat-side__link:focus-visible .hbcat-side__pill{
  border-color: color-mix(in srgb, var(--hbcat-accent) 20%, var(--hbcat-border));
  color: var(--hbcat-accent);
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__item.is-current .hbcat-side__link{
  background: var(--hbcat-surface-soft);
  color: var(--hbcat-accent);
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__item.is-current .hbcat-side__name{
  font-weight: 600;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__item.is-current .hbcat-side__pill{
  border-color: color-mix(in srgb, var(--hbcat-accent) 20%, var(--hbcat-border));
  color: var(--hbcat-accent);
}

/* ----- MOBILE DETAILS ----- */
.elementor-widget-herbalovo_category_sidebar .hbcat-side__mobile{
  margin: 0;
  padding: 0;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__summary{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--hbcat-border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__summary::-webkit-details-marker{
  display: none;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__summary-title{
  font-weight: 700;
  white-space: nowrap;
  color: var(--hbcat-text);
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__summary-current{
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  color: var(--hbcat-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__mobile > summary::after{
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: color-mix(in srgb, var(--hbcat-accent) 24%, #000);
   -webkit-mask: url("https://rajskietajskie.pl/wp-content/uploads/2026/03/undo-2-1.svg") center/contain no-repeat;
  mask: url("https://rajskietajskie.pl/wp-content/uploads/2026/03/undo-2-1.svg") center/contain no-repeat;
  transition: transform .15s ease;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__mobile[open] > summary::after{
  transform: rotate(180deg);
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__panel{
  padding-top: 10px;
}

.elementor-widget-herbalovo_category_sidebar .hbcat-side__back--mobile{
  margin-bottom: 8px;
}