/* === Shared styles (widget + overlay) === */

.korbi-cat__section {
  padding-top: 12px;
}

.korbi-cat__section-title {
  padding: 12px 16px 0;
  font-size: 16px;
  line-height: 17px;
  font-weight: 700;
  color: rgba(2, 6, 12, 0.78);
  letter-spacing: 0;
}

.korbi-cat__grid-wrap {
  padding: 0px 16px;
}

.korbi-cat__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 16px;
  align-items: start;
}

.korbi-cat__card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.korbi-cat__card:active {
  opacity: 0.85;
}

.korbi-cat__img {
  width: 100%;
  aspect-ratio: 84 / 95;
  overflow: hidden;
  border-radius: 12px;
  background: #f2f8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(0);
}

.korbi-cat__img img {
  width: 80%;
  height: 80%;
  display: block;
  object-fit: cover;
  background: transparent;
}

.korbi-cat__label {
  width: 100%;
  padding-top: 8px;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: #2f2f2f;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* === Overlay styles === */

.korbi-cat__overlay {
  position: fixed;
  inset: 0;
  z-index: 10006;
  pointer-events: none;
}

.korbi-cat__overlay.is-open {
  pointer-events: auto;
}

.korbi-cat__overlay-sheet {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.korbi-cat__overlay.is-open .korbi-cat__overlay-sheet {
  transform: translateX(0);
}

.korbi-cat__overlay-header {
  height: 58px;
  min-height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  box-shadow: #e3dbe0 0 2px 4px 0;
  z-index: 10;
}

.korbi-cat__overlay-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.korbi-cat__overlay-close {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: rgba(2, 6, 12, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.korbi-cat__overlay-close svg {
  width: 28px;
  height: 28px;
}

.korbi-cat__overlay-title {
  font-size: 17px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: 0;
  color: #282c3f;
}

.korbi-cat__overlay-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 28px;
}

/* === Standalone widget wrapper === */

.korbi-cat {
  background: #fff;
}

/* === Archive header chevron === */

.korbi-archive-header__title {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.korbi-archive-header__chevron {
  display: inline-flex;
  color: rgba(2, 6, 12, 0.6);
  transition: transform 200ms ease;
}

.korbi-archive-header__title:active .korbi-archive-header__chevron {
  transform: translateY(2px);
}

/* === Responsive === */

@media (max-width: 340px) {
  .korbi-cat__overlay-header {
    height: 56px;
    min-height: 56px;
  }

  .korbi-cat__overlay-title {
    font-size: 16px;
  }

  .korbi-cat__label {
    font-size: 12.2px;
    line-height: 15px;
  }
}
