/* ===== TripTea — Catalog / Category page ================================== */

/* ===== Page wrapper ======================================================= */

.tt-catalog {
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2B2B2B;
  background: #fff;
}

.tt-catalog *,
.tt-catalog *::before,
.tt-catalog *::after {
  box-sizing: border-box;
}

.tt-catalog__inner {
  max-width: 1704px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

/* ===== Category tabs ===================================================== */

.tt-catalog__tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 1200px) {
  .tt-catalog__tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tt-catalog__tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border: 1.5px solid #E0D5C9;
  border-radius: 16px;
  background: #FFFFFF;
  text-decoration: none;
  color: var(--color-dark-tea);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.tt-catalog__tab:hover {
  border-color: #8B5E3C;
  color: #8B5E3C;
  text-decoration: none;
}

.tt-catalog__tab--active {
  background: var(--color-warm-sand);
  border-color: var(--color-tea-brown);
  color: #4A3426;
  font-weight: 600;
}

.tt-catalog__tab--active:hover {
  border-color: #4A3426;
  color: #4A3426;
}

.tt-catalog__tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #E7D7C8;
  flex-shrink: 0;
  overflow: hidden;
}

.tt-catalog__tab--active .tt-catalog__tab-icon {
  background: #8B5E3C;
}

.tt-catalog__tab-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== Two-column layout ================================================= */

.tt-catalog__layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}

/* ===== Filter sidebar ==================================================== */

.tt-catalog__sidebar {
  border: 1px solid #E0D5C9;
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 24px;
}

.tt-catalog__filters-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #4A3426;
  border-bottom: 1px solid #E0D5C9;
}

.tt-catalog__filter-group {
  border-bottom: 1px solid #E0D5C9;
}

.tt-catalog__filter-group:last-of-type {
  border-bottom: none;
}

.tt-catalog__filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #2B2B2B;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease;
}

.tt-catalog__filter-btn:hover {
  color: #8B5E3C;
}

.tt-catalog__filter-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tt-catalog__filter-group.is-open .tt-catalog__filter-chevron {
  transform: rotate(180deg);
}

.tt-catalog__filter-body {
  display: none;
  padding: 0 16px 12px;
}

.tt-catalog__filter-group.is-open .tt-catalog__filter-body {
  display: block;
}

.tt-catalog__filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  color: #2B2B2B;
  transition: color 0.15s ease;
}

.tt-catalog__filter-item:hover {
  color: #8B5E3C;
}

.tt-catalog__filter-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #8B5E3C;
  cursor: pointer;
}

.tt-catalog__sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid #E0D5C9;
}

.tt-catalog__show-results-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: #8B5E3C;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease;
}

.tt-catalog__show-results-btn:hover {
  background: #7A5234;
}

/* ===== Toolbar ============================================================ */

.tt-catalog__toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #EAEAEA;
}
.tt-catalog__count span {
  color: var(--color-tea-brown);
  font-weight: 400;
  font-size: 16px;
}

.tt-catalog__count {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-dark-tea);
}


/* Custom sort select */
.tt-catalog__sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tt-catalog__sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 36px 8px 12px;
  border: 1px solid #E0D5C9;
  border-radius: 8px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #2B2B2B;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.tt-catalog__sort-select:hover,
.tt-catalog__sort-select:focus {
  border-color: #8B5E3C;
}

.tt-catalog__sort-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
}

/* View toggle */
.tt-catalog__view-toggle {
  display: flex;
  gap: 4px;
}

.tt-catalog__view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #E0D5C9;
  border-radius: 8px;
  background: #fff;
  color: #B0A898;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.tt-catalog__view-btn:hover {
  border-color: #8B5E3C;
  color: #8B5E3C;
}

.tt-catalog__view-btn--active {
  border-color: #8B5E3C;
  color: #8B5E3C;
  background: #F5EFE7;
}

/* ===== Product grid ======================================================= */

.tt-catalog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Override the strip-specific flex sizing from bestsellers_block.css */
.tt-catalog__grid .tt-product-card {
  flex: none;
  width: 100%;
}

/* Old/strikethrough price in the catalog */
.tt-product-card__prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tt-product-card__old-price {
  font-size: 13px;
  font-weight: 400;
  color: #B0A898;
  text-decoration: line-through;
  line-height: 1.3;
}

/* ===== Show more button =================================================== */

.tt-catalog__show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.tt-catalog__show-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: 1.5px solid #8B5E3C;
  border-radius: 12px;
  background: transparent;
  color: #8B5E3C;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tt-catalog__show-more:hover {
  background: #F5EFE7;
  color: #4A3426;
  text-decoration: none;
}

/* ===== Empty state ======================================================== */

.tt-catalog__empty {
  padding: 48px 0;
  text-align: center;
  color: #6B6B6B;
  font-size: 16px;
}

/* ===== Responsive ========================================================= */

@media (max-width: 1200px) {
  .tt-catalog__layout {
    grid-template-columns: 220px 1fr;
    gap: 24px;
  }

  .tt-catalog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .tt-catalog__layout {
    grid-template-columns: 1fr;
  }

  .tt-catalog__sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .tt-catalog__inner {
    padding: 20px 16px 48px;
  }

  .tt-catalog__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .tt-catalog__toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .tt-catalog__count {
    width: 100%;
    flex: none;
  }
}

@media (max-width: 600px) {
  .tt-catalog__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    height: fit-content;
  }
  .tt-catalog__grid .tt-product-card__media {
    max-height: 125px;
   
  }
  .tt-catalog__grid .tt-product-card__price-row {
     margin-top: 0;
  }
  .tt-catalog__grid .tt-product-card {
      min-height: 0;
  }

  .tt-catalog__grid .tt-product-card__price-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
