/* ================================================================
   HomeCategoryCarousel – Embla + Theme Miniature (v1.2)
   ================================================================ */

.hcc-section *:focus,
.hcc-section *:focus-visible,
.hcc-section *:active {
  outline: none !important;
  box-shadow: none !important;
}

.hcc-section {
  width: 100%;
  font-family: inherit;
}

.hcc-header {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: center
}

.hcc-header__title-wrap {
  min-width: 0;
}

.hcc-header__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 6px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hcc-header__subtitle {
  font-size: 0.95rem;
  color: #7a7168;
  margin: 0;
  line-height: 1.4;
}

/* ── Taby ── */
.hcc-tabs {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap
}

.hcc-tab {
  background: none;
  border: none;
  padding: 0px;
  font-size: 1rem;
  font-weight: 400;
  color: #6b625a;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
  position: relative;
}

.hcc-tab > span { display: inline-block; padding-bottom: 6px; border-bottom: 2px solid transparent; transition: border-color 0.2s; }

.hcc-tab:hover  { color: #1a1a1a; }
.hcc-tab.active { color: #1a1a1a; font-weight: 500; }
.hcc-tab.active > span { border-bottom-color: #8b6f47; }

/* ── Strzałki + licznik ── */
.hcc-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.hcc-nav__btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--cornero-border-light);
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}

.hcc-nav__btn:hover { background: var(--ivory); }
.hcc-nav__btn[disabled],
.hcc-nav__btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
  color: #3d3630;
  border-color: #d6cfc6;
}

.hcc-nav__counter {
  font-size: 0.9rem;
  color: #4a423b;
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: center;
}

/* ── Filter bar ── */
.hcc-filterbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hcc-filter-pill {
  border: 1.5px solid #d6cfc6;
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 0.85rem;
  font-weight: 400;
  color: #555;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
  font-family: inherit;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.hcc-filter-pill:hover     { border-color: #1a1a1a; color: #1a1a1a; }
.hcc-filter-pill.active    { background: #1a1a1a; border-color: #1a1a1a; color: #fff; font-weight: 500; }
.hcc-filter-pill.is-static { cursor: default; pointer-events: none; }

/* ── Panels ── */
.hcc-tab-panel        { display: none; }
.hcc-tab-panel.active { display: block; }

/* ── Panel inner: hero tile + carousel ── */
.hcc-panel-inner {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

/* ── Hero tile (lewa strona) ── */
.hcc-tile-hero {
  flex: 0 0 30%;
  max-width: 30%;
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 420px;
  border-radius: 14px;
  overflow: hidden;
  background-color: #d9d2c8;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-decoration: none;
  color: #fff;
  transition: transform 0.3s ease;
  isolation: isolate;
}

.hcc-tile-hero:hover { text-decoration: none; color: #fff; }
.hcc-tile-hero:hover .hcc-tile-hero__cta { background: #fff; color: #1a1a1a; }

.hcc-tile-hero__overlay {
  width: 100%;
  padding: 28px 26px 26px;
  background: linear-gradient(180deg, rgba(20,15,10,0) 0%, rgba(20,15,10,0.55) 45%, rgba(20,15,10,0.85) 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.hcc-tile-hero__title {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}

.hcc-tile-hero__desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.45;
  margin-bottom: 8px;
}

.hcc-tile-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  background: transparent;
}

/* ── Carousel wrap ── */
.hcc-carousel-wrap {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ══════════════════════════════════════════════
   EMBLA
   ══════════════════════════════════════════════ */

.hcc-embla { overflow: hidden; }
.hcc-embla__container { display: flex; }

/* 3 slajdy widoczne (jak na screenie) */
.hcc-embla__slide {
  flex: 0 0 33.3333%;
  min-width: 0;
  padding: 0 8px;
  box-sizing: border-box;
}

.hcc-embla__slide:first-child { padding-left: 0; }
.hcc-embla__slide:last-child  { padding-right: 0; }

.hcc-embla__slide .product-miniature {
  width: 100%;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

/* ── Progress bar ── */
.hcc-progress-wrap { padding: 20px 0 0; }

.hcc-progress-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: #e6dfd6;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.hcc-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #6b4a2b;
  border-radius: 2px;
  transition: left 0.35s ease, width 0.35s ease;
  width: 30%;
}

/* ── Loader / empty ── */
.hcc-loader-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.hcc-loader { display: flex; align-items: center; gap: 8px; }
.hcc-loader span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b8ada0;
  animation: hccBounce 1.2s infinite ease-in-out;
}
.hcc-loader span:nth-child(2) { animation-delay: 0.2s; }
.hcc-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes hccBounce {
  0%,80%,100% { transform: scale(0.7); opacity: 0.5; }
  40%         { transform: scale(1);   opacity: 1; }
}

.hcc-empty-item {
  color: #8b8378;
  font-size: 0.875rem;
  padding: 60px 24px;
  text-align: center;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1200px) {
  .hcc-tile-hero { min-height: 380px; }
  .hcc-tile-hero__title { font-size: 1.5rem; }
  .hcc-header__title { font-size: 1.7rem; }
}

@media (max-width: 1024px) {
  .hcc-section { padding: 28px 24px 32px; }
  .hcc-tile-hero { flex: 0 0 34%; max-width: 34%; min-height: 340px; }
  .hcc-tile-hero__title { font-size: 1.35rem; }
  .hcc-header__title { font-size: 1.5rem; }
  .hcc-tabs { gap: 22px; }
  .hcc-tab { font-size: 0.95rem; }
  .hcc-embla__slide { flex: 0 0 50%; }
}

@media (max-width: 900px) {
  .hcc-header {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: left;
  }
  .hcc-tabs { justify-content: flex-start; padding-top: 0; }
  .hcc-nav { justify-content: flex-start; }
  .hcc-tile-hero { min-height: 300px; }
}

@media (max-width: 768px) {
  .hcc-section { padding: 22px 16px 28px; margin-bottom: 32px !important; }

  .hcc-panel-inner {
    flex-direction: column-reverse;
    gap: 16px;
  }

  .hcc-tile-hero {
    flex: none;
    max-width: 100%;
    width: 100%;
    min-height: 240px;
  }

  .hcc-carousel-wrap { width: 100%; }
  .hcc-embla__slide { flex: 0 0 60%; padding: 0 6px; }
  .hcc-embla__slide:first-child { padding-left: 0; }

  .hcc-header__title { font-size: 1.35rem; }
  .hcc-tabs { gap: 18px; }
  .hcc-nav__btn { width: 36px; height: 36px; }

  .hcc-filterbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .hcc-filterbar::-webkit-scrollbar { display: none; }
  .hcc-filterbar .hcc-filter-pill { flex-shrink: 0; }
}

@media (max-width: 480px) {
  .hcc-section { padding: 0; }
  .hcc-header__title { font-size: 1.2rem; }
  .hcc-header__subtitle { font-size: 0.85rem; }
  .hcc-tabs { gap: 14px; }
  .hcc-tab { font-size: 0.9rem; }
  .hcc-tile-hero__title { font-size: 1.2rem; }
  .hcc-tile-hero__desc { font-size: 0.85rem; }
  .hcc-tile-hero__cta { padding: 8px 16px; font-size: 0.82rem; }
  .hcc-embla__slide { flex: 0 0 100%; padding: 0; }
}
