.compare {
 padding: 30px 0;
}

.comp {
 background: #fff;
 border-radius: 12px;
}

.comp__diff-toggle {
 padding: 14px;
 border-top: 1px solid #EDEDED;
 border-bottom: 1px solid #EDEDED;
 background: #fff;
}

.diff-toggle {
 display: flex;
 gap: 10px;
 align-items: center;
}

.comp__stats {
 border-radius: 0 0 12px 12px;
 overflow: hidden;
}

.comp-section-header {
 padding: 14px;
 border-bottom: 1px solid #EDEDED;
 background: #EDEDED;
}

.comp-table {
 background: #fff;
}

/* grid columns must match Swiper slidesPerView in compare.js breakpoints */
.comp-table-row {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 position: relative;
 border-bottom: 1px solid #EDEDED;
}

.comp-table-row:last-child {
 border-bottom: none;
}

.comp-table-label {
 position: absolute;
 top: 14px;
 left: 14px;
 color: #111212;
 font-size: 15px;
 font-weight: 600;
 line-height: 139%;
}

.comp-table-cell {
 padding: 45px 14px 14px 14px;
 color: #303133;
 font-size: 14px;
 font-weight: 400;
 line-height: 150%;
 transition: all 0.3s;
}

.comp-table-cell[data-product-id] {
 display: block;
}

.comp-table-cell:not(.visible) {
 display: none;
}


.compare-carousel__wrapper {
 position: relative;
}

.compare-carousel__slider {
 overflow: hidden;
 border-radius: 12px 12px 0 0;
}

/* Pre-Swiper layout: constrain slides before JS initializes to prevent FOUC */
.compare-carousel__slider:not(.swiper-initialized) .swiper-wrapper {
 display: flex;
}

.compare-carousel__slider:not(.swiper-initialized) .swiper-slide {
 flex-shrink: 0;
 width: 25%;
}

@media (max-width: 1024px) {
 .compare-carousel__slider:not(.swiper-initialized) .swiper-slide {
  width: 33.333%;
 }
}

@media (max-width: 768px) {
 .compare-carousel__slider:not(.swiper-initialized) .swiper-slide {
  width: 50%;
 }
}


.comp__slider-wrapper .product-card {
 box-shadow: none !important;
 border-radius: 0 !important;
 border: none !important;
}


.comp__slider-wrapper .product-card__wishlist {
 opacity: 1 !important;
 transform: none !important;
 visibility: visible !important;
}


.delete-compare {
 position: absolute;
 top: 14px;
 right: 14px;
 width: 32px;
 height: 32px;
 display: flex;
 align-items: center;
 justify-content: center;
 border-radius: 10px;
 border: 2px solid #EDEDED;
 background: #FFF;
 transition: all .3s;
}

.delete-compare:hover {
 background: #EDEDED;
}

.checkbox-switch {
 display: flex;
 align-items: center;
 gap: 10px;
 cursor: pointer;
}

.checkbox-switch__inputs {
 position: relative;
 display: flex;
 align-items: center;
}

.checkbox-switch__inputs input[type="checkbox"] {
 position: absolute;
 opacity: 0;
 width: 0;
 height: 0;
}

.checkbox-switch__track {
 width: 46px;
 height: 24px;
 background: #EDEDED;
 border-radius: 100px;
 position: relative;
 transition: all 0.3s ease;
 cursor: pointer;
}

.checkbox-switch__track::before {
 content: '';
 position: absolute;
 width: 20px;
 height: 20px;
 border-radius: 50%;
 top: 2px;
 left: 2px;
 transition: all 0.3s ease;
 box-shadow: 0 2px 5px rgba(0, 0, 0, 0.23);
 background: #fff;
}

.checkbox-switch__inputs input[type="checkbox"]:checked+.checkbox-switch__track {
 background: #769458;
}

.checkbox-switch__inputs input[type="checkbox"]:checked+.checkbox-switch__track::before {
 transform: translateX(22px);
}

.checkbox-switch__info {
 flex: 1;
}

.checkbox-switch__title {
 color: #111212;
 font-size: 13px;
 font-weight: 400;
 line-height: 150%;
 margin: 0;
}

.wishlist-compare-mob {
 position: absolute;
 top: 49px;
 right: 12px;
 width: 32px;
 height: 32px;
 align-items: center;
 justify-content: center;
 border-radius: 10px;
 border: 2px solid #EDEDED;
 background: #FFF;
 transition: all .3s;
 display: none;
}

.wishlist-compare-mob--active path {
 fill: #FC5417;
 stroke: #FC5417;
 stroke-width: 1.2;
}

.compare__header {
 margin-bottom: 30px;
 display: flex;
 align-items: center;
 gap: 15px;
 justify-content: space-between;
}

.compare__cats {
 padding: 4px;
 border-radius: 9px;
 background: #EDEDED;
 display: flex;
 align-items: center;
 gap: 10px;
}

.compare__cat {
 padding: 6px 10px;
 border-radius: 7px;
 color: #393B40;
 font-size: 13px;
 font-weight: 500;
 line-height: 150%;
 position: relative;
 cursor: pointer;

}

.compare__cat--active {
 background: #FFF;
 font-weight: 600;
 color: #111212;
}

.compare__cat-count {
 position: absolute;
 right: 0;
 top: -6.158px;
 min-width: 17px;
 height: 17px;
 padding: 1px;
 border-radius: 900px;
 background: #FCAF17;
 color: #FFF;
 text-align: center;
 display: flex;
 justify-content: center;
 align-items: center;
 font-size: 10px;
 font-weight: 600;
 line-height: 150%;
 z-index: 2;
}

.compare__header-clear {
 display: flex;
 align-items: center;
 gap: 10px;
 cursor: pointer;
}

.compare__header-clear-text {
 color: #526086;
 font-size: 13px;
 font-weight: 600;
 line-height: 150%;
 border-bottom: 1px dashed rgba(82, 96, 134, 0.30);
 transition: all .3s;
}

.compare__header-clear:hover .compare__header-clear-text {
 color: #FC5417;
}

.compare__header-clear-icon {
 line-height: 0;
}

.products-horizontal--compare {
 padding-bottom: 90px;
}


.clear-compare-popup__content {
 position: relative;
 background: #FFF;
 border-radius: 20px;
 padding: 25px;
 max-width: 466px;
 width: 100%;
 text-align: center;
}


.clear-compare-popup__title {
 margin-bottom: 10px;
}

.clear-compare-popup__text {
 color: #393B40;
 font-size: 13px;
 font-weight: 500;
 line-height: 150%;
 margin-bottom: 25px;
}


.clear-compare-popup__confirm {
 width: 100%;
 padding: 16px 25px;
 border-radius: 10px;
 font-size: 15px;
 font-weight: 700;
 line-height: 139%;
 border: none;
 cursor: pointer;
 margin-bottom: 15px;
 transition: background 0.3s;
}


.clear-compare-popup__cancel {
 width: 100%;
 padding: 9px 25px;
 font-size: 13px;
 font-weight: 700;
 line-height: 150%;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 10px;
 transition: color 0.3s;
 border-radius: 10px;
}


@media (max-width: 1024px) {
 .compare-carousel__wrapper .carousel-arrow {
  width: 25px;
  height: 25px;
  border-radius: 6px;
 }

 .compare-carousel__wrapper .carousel-arrow svg {
  height: 9px;
 }

 .carousel-arrow--next {
  right: -10px;
 }

 .carousel-arrow--prev {
  left: -10px;
 }

 .comp-table-row {
  grid-template-columns: repeat(3, 1fr);
 }

 .comp-section-header {
  padding: 8px 10px;
 }

 .comp-table-cell {
  padding: 31px 10px 10px 10px;
  font-size: 12px;
 }

 .comp-table-label {
  top: 10px;
  left: 10px;
  font-size: 14px;
 }

 .comp__slider-wrapper .product-card__action .product-card__wishlist {
  display: none;
 }

 .delete-compare {
  top: 12px;
  right: 12px;
 }

 .wishlist-compare-mob {
  display: flex;
 }

 .compare {
  padding: 20px 0 40px;
 }

 .compare__header {
  margin-bottom: 20px;
 }

 .products-horizontal--compare {
  padding-bottom: 40px;
 }

 .clear-compare-popup__content {
  border-radius: 16px;
  padding: 16px;
  max-width: 328px;
 }

 .clear-compare-popup__title {
  margin-bottom: 6px;
 }

 .clear-compare-popup__text {
  font-size: 12px;
  margin-bottom: 20px;
 }

 .clear-compare-popup__confirm {
  padding: 13px 25px;
  font-size: 14px;
  margin-bottom: 10px;
 }
}

@media (max-width: 768px) {
 .comp-table-row {
  grid-template-columns: repeat(2, 1fr);
 }

 .delete-compare {
  top: 10px;
  right: 10px;
 }

 .wishlist-compare-mob {
  top: 47px;
  right: 10px;
 }

 .compare__header {
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
 }

 .compare {
  overflow: hidden;
 }

 .compare__cats {
  width: 100vw;
  padding-right: 16px;
  margin-right: 26px;
  overflow-x: auto;
  flex-wrap: nowrap;
 }

 .compare__cat {
  white-space: nowrap;
 }

 .compare__cat-count {
  position: absolute;
  right: -3px;
  top: -3px;
 }

 .clear-compare-popup__confirm {
  padding: 13px 10px;
 }
}