#slider-root,
.slider-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

#slider-root > .slider,
#slider-root .slide {
  width: 100%;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.slide {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 30px;
  box-sizing: border-box;
}

.slide-content {
  max-width: 55%;
  padding-right: 20px;
}

.slide-image {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 340px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dots {
  left: 60px;
  bottom: 28px;
}
.carousel-arrows label {
  opacity: 0.95;
}

#categories,
.categories {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  padding: 10px 6px;
  box-sizing: border-box;
}

@media (min-width: 1230px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 992px) {
  #categories,
  .categories {
    gap: 5px;
    padding: 8px 6px;
  }
}

@media (max-width: 768px) {
  #categories,
  .categories {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    white-space: nowrap;
    flex-wrap: nowrap;
  }

  #categories::-webkit-scrollbar,
  .categories::-webkit-scrollbar {
    height: 8px;
  }

  #categories::-webkit-scrollbar-thumb,
  .categories::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
  }

  .category-item {
    flex: 0 0 auto;
    min-width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    scroll-snap-align: start;
    padding: 6px;
    box-sizing: border-box;
  }

  .category-circle {
    width: 64px;
    height: 64px;
    margin: 0;
  }

  .category-name {
    font-size: 0.72rem;
    color: #ddd;
  }
}

@media (max-width: 420px) {
  .category-item {
    min-width: 84px;
  }
  .category-circle {
    width: 56px;
    height: 56px;
  }
  .category-name {
    font-size: 0.7rem;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 6px;
  box-sizing: border-box;
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .product-image {
    height: 220px;
  }
  .product-name {
    font-size: 1.02rem;
  }
  .product-description {
    font-size: 0.82rem;
    color: #bdbdbd;
  }
  .buy-button {
    padding: 8px 10px;
    font-size: 0.86rem;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card {
    transform: none;
  }

  .product-image {
    height: 190px;
    background-position: center;
  }

  .product-info {
    padding: 10px;
    gap: 6px;
  }

  .product-name {
    font-size: 0.98rem;
  }
  .product-price,
  .product-description {
    font-size: 0.75rem;
  }
  .buy-button {
    border-radius: 20px;
    padding: 8px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-image {
    height: 150px;
  }
  .product-info {
    padding: 8px;
  }
  .product-name {
    font-size: 0.94rem;
  }
  .product-price {
    font-size: 0.72rem;
  }
  .product-description {
    font-size: 0.7rem;
    line-height: 1.25;
  }
  .buy-button {
    font-size: 0.78rem;
    padding: 7px;
  }
  .product-card {
    border-radius: 8px;
  }
}

@media (max-width: 340px) {
  .products-grid {
    grid-template-columns: 2fr;
  }

  .product-image {
    height: 170px;
  }
}

.product-card {
  width: 100%;
  box-sizing: border-box;
}

.modal-box {
  max-width: 1000px;
  margin: 36px auto;
  box-sizing: border-box;
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 18px;
  align-items: start;
}

.modal-box .left-column .image-wrapper {
  width: 100%;
}

@media (max-width: 992px) {
  .modal-content-grid {
    grid-template-columns: 1fr;
  }
  .modal-box {
    padding: 14px;
    margin: 24px 12px;
  }
  .modal-box .description-section {
    padding: 10px;
  }
  .left-column .image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

@media (max-width: 480px) {
  .qty-btn {
    padding: 6px 8px;
  }
  .buy-btn {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .slide-content {
    padding-left: 12px;
    padding-right: 12px;
  }
  .slide-content .title {
    font-size: 26px;
    line-height: 1.12;
  }
  .slide-content .subtitle {
    font-size: 14px;
  }
  .slide-image {
    position: relative;
    width: 88%;
    margin: 8px auto 0;
    transform: none;
    top: auto;
    right: auto;
    height: auto;
  }
  .dots {
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
  }
  .carousel-arrows {
    display: none;
  }
}

.slide-image img,
.product-image img,
.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pagination {
  padding: 10px;
  gap: 8px;
}

.category-item.active .category-circle {
  background: linear-gradient(135deg, #b8b8b8, #8a8a8a);
}

.container-footer {
  max-width: 1200px;
  margin: 0 auto;
}
