/* =============================
   GLOBAL RESET
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}

/* =============================
   HERO SLIDER
============================= */
.slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--header-color);
  direction: ltr;
  border-radius: var(--border-radius-main);
  box-shadow: 0 10px 30px var(--shadow-box-main);
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  min-height: 240px;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
  cursor: grab;
  touch-action: pan-y;
  will-change: transform;
}

.slides:active {
  cursor: grabbing;
}

.slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

/* dots */
.dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.4;
  cursor: pointer;
  transition: 0.2s;
}

.dot.active {
  opacity: 1;
  transform: scale(1.6);
  background: var(--main-color);
}

/* =============================
   SEASON IMAGES
============================= */
.season-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.season-image {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}

/* =============================
   SALE SECTION
============================= */
#salesproductslider.productslider {
  margin: 18px 0;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--main-color);
  border-radius: 22px;
  overflow: hidden;
  direction: rtl;
}

/* ICON */
#sales-svg {
  width: 40px;
  height: 40px;
  color:#fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
}

/* TITLE */
#sales-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

#sales-title h3 {
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-badge {
  border:solid 1px #ffffff80;
  font-size:12px;
  padding: 4px 10px;
  border-radius:20px;
  background: #ffffff26;
}
.timer-segment {
  color:var(--text-color-white);
  border-radius:24px;
  border:solid 1px #ffffff80;
  padding:8px;
  background:#ffffff26;
}
/* TIMER */
#sales-timer-discount {
  font-size:12px;
  align-items:center;
  margin-left: auto;
  display: flex;
  gap: 10px;
  color: #fff;
}

/* PRODUCT TRACK */
#sales-product {
  flex: 1 1 100%;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  cursor: grab;
  direction: ltr;
  scrollbar-width: none;
}

#sales-product::-webkit-scrollbar {
  display: none;
}

#sales-product.dragging {
  cursor: grabbing;
}

/* =============================
   PRODUCT CARD
============================= */
.product-card {
  flex: 0 0 200px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,0.1);
  direction: rtl;
  transition: 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
}

/* IMAGE */
.product-image {
  position: relative;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* DISCOUNT */
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--main-color);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
}

/* INFO */
.product-info {
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* TITLE */
.product-title {
  flex: 1 1 100%;
  font-size: 13px;
  font-weight: 700;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CATEGORY */
.product-category {
  font-size: 10px;
  padding: 2px 8px;
  background: #000;
  color: #fff;
  border-radius: 999px;
  white-space: nowrap;
}

/* PRICE */
.product-price {
  flex: 1 1 100%;
  display: flex;
  gap: 6px;
  align-items: center;
}

.sale-price {
  font-weight: 900;
  color: var(--main-color);
  font-size: 15px;
}

.old-price {
  font-size: 11px;
  text-decoration: line-through;
  opacity: 0.6;
}

/* =============================
   CATEGORY GRID
============================= */
.category-images{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.category-image{
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* First row */
.category-image:nth-child(1){
    grid-column: span 2; /* 50% */
}

.category-image:nth-child(2){
    grid-column: span 1; /* 25% */
}

.category-image:nth-child(3){
    grid-column: span 1; /* 25% */
}

/* Second row */
.category-image:nth-child(4){
    grid-column: span 1; /* 25% */
}

.category-image:nth-child(5){
    grid-column: span 1; /* 25% */
}

.category-image:nth-child(6){
    grid-column: span 2; /* 50% */
}
/* =============================
   RESPONSIVE
============================= */
@media (max-width: 768px) {

  .product-card {
    flex: 0 0 170px;
  }

  .product-title {
    font-size: 12px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .category-images {
    grid-template-columns: repeat(2, 1fr);
  }

  #sales-title h3 {
    font-size: 14px;
  }

  #sales-svg {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {

  .product-card {
    flex: 0 0 145px;
  }

  .product-title {
    font-size: 11.5px;
  }

  .sale-price {
    font-size: 13px;
  }

  .old-price {
    font-size: 10px;
  }

  .category-image {
    height: 130px;
  }
}