/* The Sleep Company — collection / category PLP (pixel-match tokens) */

.page-category {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #faf6ed;
  color: #5c4f20;
  overflow-x: hidden;
}

.page-category .category-circles-bar {
  display: none !important;
}

.page-category .category-tsc {
  padding: 0 0 56px;
  position: relative;
}

/* Hero banner */
.category-tsc-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 280px;
  max-height: 420px;
  overflow: hidden;
  margin-bottom: 0;
}

.category-tsc-hero-bg {
  width: 100%;
  height: 100%;
  min-height: 280px;
  /* max-height: 420px; */
  object-fit: cover;
  object-position: center center;
  display: block;
}

.category-tsc-hero--image-only .category-tsc-hero-bg {
  display: block;
}

.category-tsc-bc-wrap {
  padding-top: 20px;
  padding-bottom: 16px;
}

.category-tsc-breadcrumb {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  padding: 10px 0;
}

.category-tsc-bc-current {
  color: #5c4f20;
  font-weight: 600;
}

/* Marquee */
.category-tsc-marquee-wrap {
  background: #fef9eb;
  border-bottom: 1px solid #f5e6b8;
  overflow: hidden;
  padding: 14px 0;
}

.category-tsc-marquee {
  display: flex;
  width: max-content;
  animation: category-marquee 28s linear infinite;
}

.category-tsc-marquee-track {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.category-tsc-marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 36px;
  font-size: 14px;
  font-weight: 600;
  color: #5c4f20;
  white-space: nowrap;
}

.category-tsc-marquee-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5c4f20;
}

.tsc-marquee-bifma {
  font-size: 10px;
  font-weight: 800;
  background: #fff;
  border: 2px solid #c62828;
  color: #c62828;
  padding: 4px 6px;
  border-radius: 4px;
}

@keyframes category-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.category-tsc-bc-sep {
  margin: 0 8px;
  color: #cbd5e1;
}

/* Toolbar: Filters + Sort one row */
.category-tsc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8edf2;
}

.category-tsc-toolbar .category-tsc-filters-head {
  margin-bottom: 0;
}

.category-tsc-toolbar .category-tsc-filters-head h4 {
  font-size: 22px;
}

#category-products {
  padding-top: 8px;
}

.page-category .container-tsc {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.category-tsc-breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.category-tsc-breadcrumb a:hover {
  color: #5c4f20;
}

.category-tsc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.page-category .category-tsc-main {
  min-width: 0;
}

/* —— Filters sidebar —— */
.category-tsc-filters {
  position: sticky;
  top: 96px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.category-tsc-filters .category-tsc-filters-head {
  display: none;
}

.category-tsc-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.category-tsc-filters-head h4 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #5c4f20;
  letter-spacing: -0.02em;
}

.category-tsc-filters-head button {
  border: none;
  background: none;
  color: #d4af37;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.filter-block {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e8edf2;
}

.filter-block:last-of-type {
  border-bottom: none;
}

.filter-block-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #5c4f20;
  margin-bottom: 16px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #5c4f20;
  margin-bottom: 10px;
  cursor: pointer;
}

.filter-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #5c4f20;
  cursor: pointer;
}

/* Price range slider — single track line */
.tsc-price-slider {
  padding: 4px 0 8px;
}

.tsc-range-tooltips {
  position: relative;
  height: 32px;
  margin-bottom: 6px;
}

.tsc-range-tip {
  position: absolute;
  transform: translateX(-50%);
  top: 0;
  background: #5c4f20;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.2;
}

.tsc-range-tip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #5c4f20;
}

.tsc-range-wrap {
  position: relative;
  height: 28px;
  margin: 0 4px;
}

.tsc-range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  z-index: 1;
}

.tsc-range-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #5c4f20;
  border-radius: 4px;
  z-index: 2;
  left: 0;
  width: 50%;
}

.tsc-range-wrap input[type="range"] {
  position: absolute;
  left: 0;
  width: 100%;
  top: 0;
  height: 28px;
  margin: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  z-index: 3;
}

.tsc-range-wrap #range-min {
  z-index: 3;
}

.tsc-range-wrap #range-max {
  z-index: 4;
}

.tsc-range-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}

.tsc-range-wrap input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}

.tsc-range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #5c4f20;
  box-shadow: 0 2px 8px rgba(74, 63, 26, 0.2);
  cursor: pointer;
}

.tsc-range-wrap input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #5c4f20;
  box-shadow: 0 2px 8px rgba(74, 63, 26, 0.2);
  cursor: pointer;
}

.tsc-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 12px;
  padding: 0 2px;
}

.filter-block--seating .filter-seating-list {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.filter-block--price {
  padding-bottom: 24px;
}

.tsc-filter-apply {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #d32f2f;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.tsc-filter-apply:hover {
  background: #b71c1c;
}

/* Sort bar */
.category-tsc-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  color: #5c4f20;
}

.category-tsc-sort span {
  color: #64748b;
  font-weight: 500;
}

.category-tsc-sort select {
  border: none;
  outline: none;
  font-weight: 600;
  font-size: 14px;
  color: #5c4f20;
  background: transparent;
  cursor: pointer;
}

/* Product grid */
.tsc-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 22px;
  padding: 12px 4px 4px 12px;
}

.tsc-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: none;
  overflow: visible;
  box-shadow: 0 4px 16px rgba(74, 63, 26, 0.08), 0 1px 4px rgba(74, 63, 26, 0.04);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
  position: relative;
}

.tsc-product-card:hover {
  box-shadow: 0 12px 32px rgba(74, 63, 26, 0.14);
  transform: translateY(-2px);
}

.tsc-card-visual {
  display: block;
  text-decoration: none;
  line-height: 0;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.tsc-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: visible;
  border-radius: 14px 14px 0 0;
  margin: 0;
  padding: 0;
}

.tsc-card-img img {
  border-radius: 14px 14px 0 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  padding: 0;
  margin: 0;
  border: none;
}

.tsc-deal-badges {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.tsc-deal-badge {
  position: absolute;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tsc-deal-badge--gift {
  top: 8px;
  left: 8px;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  max-width: 72px;
  max-height: 72px;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: rotate(-8deg);
  filter: drop-shadow(0 4px 10px rgba(183, 28, 28, 0.5));
  animation: tsc-gift-wiggle 2.8s ease-in-out infinite;
  z-index: 4;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}

@keyframes tsc-gift-wiggle {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  20% { transform: rotate(-11deg) scale(1.05); }
  40% { transform: rotate(-5deg) scale(1.02); }
  60% { transform: rotate(-10deg) scale(1.04); }
  80% { transform: rotate(-6deg) scale(1.01); }
}

.tsc-deal-badge__gift-burst {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #ff5252 0 10deg, #c62828 10deg 20deg, #ff5252 20deg 30deg, #c62828 30deg 40deg, #ff5252 40deg 50deg, #c62828 50deg 60deg, #ff5252 60deg 70deg, #c62828 70deg 80deg, #ff5252 80deg 90deg, #c62828 90deg 100deg, #ff5252 100deg 110deg, #c62828 110deg 120deg, #ff5252 120deg 130deg, #c62828 130deg 140deg, #ff5252 140deg 150deg, #c62828 150deg 160deg, #ff5252 160deg 170deg, #c62828 170deg 180deg, #ff5252 180deg 190deg, #c62828 190deg 200deg, #ff5252 200deg 210deg, #c62828 210deg 220deg, #ff5252 220deg 230deg, #c62828 230deg 240deg, #ff5252 240deg 250deg, #c62828 250deg 260deg, #ff5252 260deg 270deg, #c62828 270deg 280deg, #ff5252 280deg 290deg, #c62828 290deg 300deg, #ff5252 300deg 310deg, #c62828 310deg 320deg, #ff5252 320deg 330deg, #c62828 330deg 340deg, #ff5252 340deg 350deg, #c62828 350deg 360deg);
  box-shadow: inset 0 0 0 3px #ffd54f, inset 0 0 0 5px rgba(255, 255, 255, 0.4);
}

.tsc-deal-badge__gift-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  line-height: 1;
}

.tsc-deal-badge__gift-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  color: #fff;
  margin-bottom: 1px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  flex-shrink: 0;
}

.tsc-deal-badge__gift-label {
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.6);
}

.tsc-deal-badge--save {
  top: 8px;
  right: 8px;
  left: auto;
  background: linear-gradient(135deg, #ff8c2a 0%, #e85d04 100%);
  color: #fff;
  font-size: 0.62rem;
  padding: 5px 9px;
  border-radius: 999px;
  max-width: calc(100% - 78px);
  white-space: nowrap;
  transform: none;
  filter: none;
}

.tsc-card-price--deal {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.tsc-card-price--deal .tsc-price-was {
  order: 1;
  font-size: 14px;
}

.tsc-card-price--deal .tsc-price-now {
  order: 2;
  color: #111827;
}

.page-category .card-image,
.page-home .card-image {
  position: relative;
}

.page-category .card-image .tsc-deal-badge--gift,
.page-home .card-image .tsc-deal-badge--gift {
  top: 6px;
  left: 6px;
  width: 58px;
  height: 58px;
}

.page-category .card-image .tsc-deal-badge__gift-icon,
.page-home .card-image .tsc-deal-badge__gift-icon {
  width: 16px;
  height: 16px;
}

.page-category .card-image .tsc-deal-badge__gift-label,
.page-home .card-image .tsc-deal-badge__gift-label {
  font-size: 0.42rem;
}

/* Gift sticker — category listing only */
.page-shop .tsc-deal-badge--gift,
.page-home .tsc-deal-badge--gift,
.page-product .tsc-deal-badge--gift {
  display: none !important;
}

.pdp-gallery-stage {
  position: relative;
}

.pdp-zoom-stage {
  position: relative;
}

.pdp-gallery-stage .tsc-deal-badge--gift,
.pdp-zoom-stage .tsc-deal-badge--gift {
  width: 76px;
  height: 76px;
  top: 8px;
  left: 8px;
}

.pdp-gallery-stage .tsc-deal-badge__gift-icon,
.pdp-zoom-stage .tsc-deal-badge__gift-icon {
  width: 22px;
  height: 22px;
}

.pdp-gallery-stage .tsc-deal-badge__gift-label,
.pdp-zoom-stage .tsc-deal-badge__gift-label {
  font-size: 0.52rem;
}

.pdp-gallery-stage .tsc-deal-badge--save,
.pdp-zoom-stage .tsc-deal-badge--save {
  top: 14px;
  right: 14px;
  font-size: 0.75rem;
  padding: 8px 14px;
}

.tsc-card-body {
  overflow: hidden;
  border-radius: 0 0 14px 14px;
  background: #fff;
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tsc-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #5c4f20;
  text-decoration: none;
  margin-bottom: 8px;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tsc-card-title:hover {
  color: #d32f2f;
}

.tsc-card-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.tsc-stars {
  color: #f59e0b;
  font-size: 11px;
  letter-spacing: -1px;
}

.tsc-rating-num {
  font-weight: 600;
  color: #5c4f20;
}

.tsc-google-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  font-weight: 600;
  color: #5c4f20;
}

.tsc-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853, #fbbc05, #ea4335);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.tsc-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin-bottom: 12px;
}

.tsc-price-now {
  font-size: 18px;
  font-weight: 800;
  color: #d32f2f;
  letter-spacing: -0.02em;
}

.tsc-price-was {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: line-through;
}

.tsc-price-off {
  font-size: 11px;
  font-weight: 700;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 3px 7px;
  border-radius: 4px;
}

.tsc-card-usps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  flex: 1;
}

.tsc-usp {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  font-size: 9px;
  line-height: 1.2;
  color: #5c4f20;
}

.tsc-usp-lines {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tsc-usp-lines strong {
  font-size: 9px;
  font-weight: 800;
  color: #4a3f1a;
}

.tsc-usp-lines span {
  font-size: 8px;
  font-weight: 500;
  color: #8b7355;
}

.tsc-usp-ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(74, 63, 26, 0.1);
  color: #5c4f20;
}

.tsc-usp-ico .pdp-ico {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.tsc-usp-ico .pdp-ico--img {
  padding: 5px;
}

.tsc-usp-ico svg {
  width: 18px;
  height: 18px;
  stroke: #5c4f20;
}

.tsc-card-actions {
  display: grid;
  grid-template-columns: 44px 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.tsc-btn-wish {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fef8ea;
  color: #5c4f20;
  border: 1px solid #faecc8;
  cursor: pointer;
  padding: 0;
}

.tsc-btn-wish:hover {
  background: #faecc8;
}

.tsc-btn-cart,
.tsc-btn-buy {
  padding: 11px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
}

.tsc-btn-cart {
  border: 2px solid #d32f2f;
  background: #fff5f5;
  color: #d32f2f;
}

.tsc-btn-cart:hover {
  background: #ffe4e6;
}

.tsc-btn-buy {
  border: none;
  background: #d32f2f;
  color: #fff;
}

.tsc-btn-buy:hover {
  background: #b71c1c;
}

/* Floating rail */
.category-tsc-rail {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-tsc-rail-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0c060;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(74, 63, 26, 0.15);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.category-tsc-rail-btn:hover {
  transform: scale(1.06);
}

.category-tsc-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}

.tsc-page-link {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #d32f2f;
  border-radius: 8px;
  color: #d32f2f;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.tsc-page-link.is-active,
.tsc-page-link:hover {
  background: #d32f2f;
  color: #fff;
}

.category-tsc-empty {
  text-align: center;
  padding: 64px 20px;
  color: #64748b;
}

@media (max-width: 1199.98px) {
  .tsc-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991.98px) {
  .category-tsc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .category-tsc-hero-overlay {
    justify-content: center;
    padding: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent 60%);
    align-items: flex-end;
  }

  .category-tsc-layout {
    grid-template-columns: 1fr;
  }

  .category-tsc-filters {
    position: relative;
    top: auto;
    border: 1px solid #faf6ed;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
  }

  .category-tsc-rail {
    bottom: 88px;
    top: auto;
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .tsc-deal-badges {
    position: absolute !important;
    inset: 0;
    pointer-events: none;
    overflow: visible;
  }

  .tsc-deal-badge--save {
    top: 6px !important;
    right: 6px !important;
    left: auto !important;
    font-size: 0.48rem !important;
    padding: 3px 6px !important;
    max-width: calc(100% - 50px);
  }
}

@media (max-width: 575.98px) {
  .tsc-product-grid {
    grid-template-columns: 1fr;
  }
}
