* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 30px;
  background: #f2f4f7;
  /* font-family: Arial, Helvetica, sans-serif; */
  color: #111827;
}

/* =========================
   CATALOG
========================= */

.catalog {
  max-width: 1280px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* =========================
   PRODUCT CARD
========================= */

.product-card {
  background: white;
  border-radius: 18px 18px 0 0;
  overflow: hidden;

  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.11);
}

/* =========================
   GALLERY
========================= */

.gallery {
  position: relative;

  width: 100%;
  /* aspect-ratio: 1 / 1; */

  overflow: hidden;

  background: #f3f3f3;

  touch-action: pan-y;

  cursor: grab;
}

.gallery.dragging {
  cursor: grabbing;
}

.slides {
  display: flex;

  width: 100%;
  /* height: 100%; */

  transition: transform 0.3s ease;

  will-change: transform;
}

.slide {
  min-width: 100%;
  height: 100%;

  user-select: none;
}

.slide img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  pointer-events: none;
}

/* =========================
   DISCOUNT
========================= */

.discount {
  position: absolute;

  top: 12px;
  left: 12px;

  z-index: 5;

  padding: 6px 10px;

  border-radius: 8px;

  background: #ff1744;
  color: white;

  font-size: 14px;
  font-weight: 700;
}

/* =========================
   VIDEO
========================= */

.video-badge {
  position: absolute;

  top: 12px;
  right: 12px;

  z-index: 5;

  padding: 7px 10px;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.95);

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);

  font-size: 13px;
  font-weight: 600;
}

/* =========================
   ARROWS
========================= */

.arrow {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  z-index: 5;

  width: 38px;
  height: 38px;

  padding: 0;

  border: 0;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.95);

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);

  font-size: 25px;

  cursor: pointer;

  opacity: 0;

  transition: opacity 0.2s ease;
}

.gallery:hover .arrow {
  opacity: 1;
}

.arrow-left {
  left: 10px;
}

.arrow-right {
  right: 10px;
}

/* =========================
   DOTS
========================= */

.dots {
  position: absolute;

  bottom: 12px;
  left: 50%;

  transform: translateX(-50%);

  z-index: 5;

  display: flex;

  gap: 5px;

  padding: 6px 9px;

  border-radius: 20px;

  background: rgba(255, 255, 255, 0.9);
}

.dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #cbd5e1;

  cursor: pointer;

  transition: all 0.2s ease;
}

.dot.active {
  width: 20px;

  border-radius: 10px;

  background: #111827;
}

/* =========================
   PRODUCT INFO
========================= */

.product-info {
  padding: 16px;
}

.bestseller {
  margin-bottom: 7px;

  color: #006cff;

  font-size: 14px;
  font-weight: 600;
}

.product-title {
  margin: 0 0 10px;

  min-height: 48px;

  font-size: 18px;
  line-height: 1.3;

  font-weight: 700;
}

.rating-row {
  display: flex;
  align-items: center;

  gap: 10px;

  margin-bottom: 14px;

  color: #6b7280;

  font-size: 13px;
}

.rating {
  color: #111827;

  font-size: 15px;
  font-weight: 700;
}

.star {
  color: #ffb800;
}

/* =========================
   PRICE
========================= */

.price {
  display: flex;
  align-items: center;

  flex-wrap: wrap;

  gap: 7px;

  margin-bottom: 3px;

  color: #16a34a;

  font-size: 26px;
  font-weight: 800;
}

.card-price {
  padding: 4px 7px;

  border-radius: 6px;

  background: #16a34a;

  color: white;

  font-size: 11px;
  font-weight: 600;
}

.old-price {
  margin-bottom: 14px;

  color: #9ca3af;

  font-size: 15px;
}

.old-price span {
  text-decoration: line-through;
}

/* =========================
   BUTTON
========================= */

.cart-button {
  width: 100%;

  padding: 12px;

  border: 0;

  border-radius: 10px;

  background: #006cff;

  color: white;

  font-size: 16px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.cart-button:hover {
  background: #0059d6;
}

.cart-button:active {
  transform: scale(0.98);
}

.delivery {
  display: block;

  margin-top: 2px;

  font-size: 12px;

  font-weight: 400;
}

/* =========================
   MOBILE
========================= */

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

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .catalog {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .product-card {
    border-radius: 15px;
  }

  .arrow {
    opacity: 1;
  }
}
