.collection {
  padding: 100px 0;
  background-color: var(--color-background);
  position: relative;
}



.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
  }
}

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

@media (max-width: 360px) {
  .products-grid {
    gap: 8px;
  }
}

.product-card {
  background-color: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px -20px rgba(138, 21, 81, 0.1), 0 2px 4px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(138, 21, 81, 0.08);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  max-width: 360px;
  width: 100%;
}

@media (max-width: 600px) {
  .product-card {
    max-width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(138, 21, 81, 0.1);
    box-shadow: 0 4px 16px rgba(138, 21, 81, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  }
}

.card-main-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  text-decoration: none;
  cursor: pointer;
  border-radius: 20px;
}

.product-card .add-to-cart-wrapper,
.product-card .quantity-control,
.product-card .qty-btn,
.product-card .btn-add-to-cart,
.product-card .btn-view-details {
  position: relative;
  z-index: 5;
}

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 50px -15px rgba(138, 21, 81, 0.2), 0 4px 12px rgba(138, 21, 81, 0.05);
  border-color: rgba(138, 21, 81, 0.15);
}

.product-image-container {
  height: 270px;
  width: 100%;
  background: radial-gradient(circle at center, #FFFFFF 0%, #F5EFF2 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  transition: all 0.5s ease;
}

/* ─── Ultra-Modern Luxury Image Skeleton & Dual-Ring Spinner ─── */
.luxury-img-skeleton,
.img-loader-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #FFFFFF 0%, #F5EFF2 100%) !important;
  z-index: 15 !important;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-luxury-spinner {
  position: relative !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.modern-luxury-spinner .spinner-ring {
  position: absolute !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
}

.modern-luxury-spinner .outer-ring {
  top: 0 !important;
  left: 0 !important;
  width: 48px !important;
  height: 48px !important;
  border: 3px solid transparent !important;
  border-top-color: #8A1551 !important;
  border-right-color: rgba(138, 21, 81, 0.45) !important;
  -webkit-animation: modernSpinClockwise 0.85s linear infinite !important;
  animation: modernSpinClockwise 0.85s linear infinite !important;
  filter: drop-shadow(0 0 6px rgba(138, 21, 81, 0.25));
  will-change: transform;
}

.modern-luxury-spinner .inner-ring {
  top: 9px !important;
  left: 9px !important;
  width: 30px !important;
  height: 30px !important;
  border: 2.5px solid transparent !important;
  border-bottom-color: #D4AF37 !important;
  border-left-color: rgba(212, 175, 55, 0.6) !important;
  -webkit-animation: modernSpinCounter 0.65s linear infinite !important;
  animation: modernSpinCounter 0.65s linear infinite !important;
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.35));
  will-change: transform;
}

.modern-luxury-spinner .spinner-center-dot {
  position: absolute !important;
  top: 20px !important;
  left: 20px !important;
  width: 8px !important;
  height: 8px !important;
  background: #D4AF37 !important;
  border-radius: 50% !important;
  box-shadow: 0 0 10px #D4AF37 !important;
  -webkit-animation: modernPulseDot 1.2s ease-in-out infinite alternate !important;
  animation: modernPulseDot 1.2s ease-in-out infinite alternate !important;
}

@-webkit-keyframes modernSpinClockwise {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes modernSpinClockwise {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@-webkit-keyframes modernSpinCounter {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); }
}
@keyframes modernSpinCounter {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); }
}

@-webkit-keyframes modernPulseDot {
  0% { -webkit-transform: scale(0.65); transform: scale(0.65); opacity: 0.4; }
  100% { -webkit-transform: scale(1.3); transform: scale(1.3); opacity: 1; }
}
@keyframes modernPulseDot {
  0% { -webkit-transform: scale(0.65); transform: scale(0.65); opacity: 0.4; }
  100% { -webkit-transform: scale(1.3); transform: scale(1.3); opacity: 1; }
}

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  left: auto;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 30px;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(138, 21, 81, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-badge-gold {
  background: linear-gradient(135deg, var(--color-gold), #B59410);
  color: var(--color-white);
  box-shadow: 0 4px 10px rgba(181, 148, 16, 0.35);
}

.product-image-container img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transform: scale(1.0) !important;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 2;
  opacity: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.06));
}

.product-image-container img.img-loaded {
  opacity: 1 !important;
}

.product-card:hover .product-image-container img {
  transform: scale(1.06) !important;
  filter: drop-shadow(0 10px 20px rgba(138, 21, 81, 0.12));
}

.product-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(138, 21, 81, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

.product-card:hover .product-glow {
  background: radial-gradient(circle, rgba(138, 21, 81, 0.2) 0%, transparent 70%);
  width: 220px;
  height: 220px;
}

.product-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-item {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background-color: rgba(138, 21, 81, 0.05);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(138, 21, 81, 0.08);
}

.product-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-dark-bg);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
  transition: var(--transition-fast);
}

.product-card:hover .product-title {
  color: var(--color-primary);
}

.product-desc {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 40px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.rating-stars {
  display: flex;
  color: var(--color-gold);
  gap: 2px;
}

.rating-stars svg {
  width: 14px;
  height: 14px;
}

.rating-text {
  font-size: 11px;
  color: #8c98a5;
  font-weight: 500;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid rgba(138, 21, 81, 0.06);
  padding-top: 16px;
}

.price-box {
  display: flex;
  flex-direction: column;
}

.original-price {
  font-size: 13px;
  text-decoration: line-through;
  color: #adb5bd;
  margin-bottom: 2px;
  font-weight: 500;
}

.current-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1.5px solid rgba(138, 21, 81, 0.18);
  border-radius: 30px;
  overflow: hidden;
  background-color: #FAFAFA;
  padding: 3px;
  gap: 0;
}

.qty-btn {
  background-color: transparent;
  border: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.qty-btn:hover {
  background-color: rgba(138, 21, 81, 0.09);
}

.qty-val {
  min-width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-dark-bg);
  user-select: none;
  flex-shrink: 0;
}

.add-to-cart-wrapper {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-add-to-cart {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  border-radius: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(138, 21, 81, 0.2);
}

.btn-add-to-cart svg {
  width: 16px;
  height: 16px;
  color: var(--color-white);
  stroke: var(--color-white);
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.btn-add-to-cart:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-add-to-cart:hover svg {
  transform: scale(1.1) translateX(-2px);
}

.scent-notes-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(24, 10, 18, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 8;
  pointer-events: none;
  padding: 16px;
}

.product-card:hover .scent-notes-overlay,
.product-image-container:hover .scent-notes-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scent-note-item {
  text-align: center;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .scent-note-item,
.product-image-container:hover .scent-note-item {
  transform: translateY(0);
  opacity: 1;
}

.note-type {
  display: block;
  font-size: 10.5px;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
  font-weight: 700;
}

.note-val {
  display: block;
  font-size: 14.5px;
  color: var(--color-white);
  font-weight: 600;
}

/* ─── Mobile 2-Column Product Cards (Original Full Proportions & Clean Layout) ─── */
@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .product-card {
    border-radius: 18px !important;
    border: 1px solid rgba(138, 21, 81, 0.09) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .product-image-container {
    height: 165px !important;
    min-height: 165px !important;
    max-height: 165px !important;
    border-radius: 17px 17px 0 0 !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .product-image-container img {
    object-fit: cover !important;
    transform: scale(1.0) !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* Mobile Product Badge - Smaller, Sleek & Harmonious */
  .product-badge {
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 6px rgba(138, 21, 81, 0.2) !important;
    letter-spacing: 0.2px !important;
    line-height: 1.15 !important;
  }

  /* Mobile In-Cart Badge - Compact & Harmonious */
  .in-cart-count-badge {
    top: 8px !important;
    left: 8px !important;
    padding: 3px 8px !important;
    font-size: 9.5px !important;
    font-weight: 750 !important;
    border-radius: 12px !important;
    gap: 3px !important;
    box-shadow: 0 2px 8px rgba(170, 124, 17, 0.3) !important;
    line-height: 1.15 !important;
  }

  .in-cart-count-badge svg {
    width: 11px !important;
    height: 11px !important;
  }

  /* Mobile Scent Notes Overlay (قمة العطر، قلب العطر، قاعدة العطر) */
  .scent-notes-overlay {
    padding: 8px 10px !important;
    gap: 6px !important;
    background: rgba(28, 14, 21, 0.92) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border-radius: 17px 17px 0 0 !important;
  }

  .scent-note-item {
    text-align: center !important;
    margin-bottom: 0 !important;
  }

  .note-type {
    font-size: 9px !important;
    margin-bottom: 1px !important;
    letter-spacing: 0.4px !important;
    line-height: 1.1 !important;
  }

  .note-val {
    font-size: 11px !important;
    line-height: 1.25 !important;
    max-width: 140px !important;
    margin: 0 auto !important;
    word-break: break-word !important;
  }

  .product-info {
    padding: 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
  }

  .product-tags {
    margin-bottom: 4px !important;
    gap: 4px !important;
    display: flex !important;
  }

  .tag-item {
    font-size: 10px !important;
    padding: 2px 7px !important;
    border-radius: 12px !important;
  }

  .product-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }

  .product-desc {
    display: none !important;
  }

  .product-rating {
    margin-bottom: 6px !important;
    gap: 4px !important;
  }

  .rating-stars svg {
    width: 12px !important;
    height: 12px !important;
  }

  .rating-text {
    font-size: 10px !important;
  }

  .product-price-row {
    margin-top: auto !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(138, 21, 81, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }

  .price-box {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  .current-price {
    font-size: 15px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  .original-price {
    font-size: 11px !important;
    margin-bottom: 0 !important;
  }

  /* Well-proportioned, clean quantity counter */
  .quantity-control {
    display: inline-flex !important;
    align-items: center !important;
    border: 1.2px solid rgba(138, 21, 81, 0.18) !important;
    border-radius: 18px !important;
    background-color: #F8F8F8 !important;
    padding: 2px 3px !important;
    gap: 0 !important;
    flex-shrink: 0 !important;
    height: 26px !important;
  }

  .qty-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    font-size: 14px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    line-height: 1 !important;
    color: var(--color-primary) !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
  }

  .qty-val {
    min-width: 18px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 0 2px !important;
    color: #1A1A1A !important;
    line-height: 1 !important;
  }

  .add-to-cart-wrapper {
    margin-top: 8px !important;
    gap: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  .btn-add-to-cart {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    min-height: 34px !important;
    height: 34px !important;
    border-radius: 20px !important;
    gap: 5px !important;
    width: 100% !important;
    font-weight: 700 !important;
  }

  .btn-add-to-cart svg {
    width: 14px !important;
    height: 14px !important;
  }

  .btn-view-details {
    padding: 6px 10px !important;
    font-size: 11px !important;
    min-height: 30px !important;
    height: 30px !important;
    border-radius: 20px !important;
    width: 100% !important;
  }

  .btn-notify-card {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    min-height: 34px !important;
    height: 34px !important;
    border-radius: 20px !important;
    width: 100% !important;
  }
}

@media (max-width: 360px) {
  .products-grid {
    gap: 8px !important;
  }

  .product-image-container {
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
  }

  .product-badge {
    top: 6px !important;
    right: 6px !important;
    font-size: 8px !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
  }

  .in-cart-count-badge {
    top: 6px !important;
    left: 6px !important;
    padding: 2px 6px !important;
    font-size: 8.5px !important;
    border-radius: 10px !important;
    gap: 2.5px !important;
  }

  .in-cart-count-badge svg {
    width: 10px !important;
    height: 10px !important;
  }

  .scent-notes-overlay {
    padding: 6px 6px !important;
    gap: 4px !important;
  }

  .note-type {
    font-size: 8px !important;
  }

  .note-val {
    font-size: 9.5px !important;
    max-width: 120px !important;
  }

  .product-info {
    padding: 10px 8px !important;
  }

  .product-title {
    font-size: 12px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
  }

  .current-price {
    font-size: 13.5px !important;
  }

  .quantity-control {
    height: 24px !important;
    padding: 1px 2px !important;
  }

  .qty-btn {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    font-size: 13px !important;
  }

  .qty-val {
    min-width: 16px !important;
    font-size: 11px !important;
  }

  .btn-add-to-cart {
    font-size: 10.5px !important;
    padding: 6px 6px !important;
    min-height: 32px !important;
    height: 32px !important;
  }

  .btn-view-details {
    font-size: 10px !important;
    padding: 5px 6px !important;
    min-height: 28px !important;
    height: 28px !important;
  }
}
