/* ==========================================================================
   1. CONTAINER & MOBILE BACKGROUND FIX
   ========================================================================== */

.list-product.premium-swiper-bg,
.premium-swiper-bg {
  position: relative !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  isolation: isolate !important;
  padding: 70px 0 45px;
}

/* Background Card Overlay (z-index: 1 forces it above theme backgrounds) */
.premium-swiper-bg::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: -10px !important;
  left: -40px !important;
  right: -40px !important;
  height: 313px !important;
  background-color: #F9F5EE !important;
  border-radius: 35px !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

/* Section Title */
.collection-title {
  position: absolute !important;
  top: 10px !important;
  right: -10px !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #222222 !important;
  z-index: 10 !important;
}

/* Swiper Container Floating Above Background */
.premium-swiper-bg .swiper {
  position: relative !important;
  z-index: 5 !important;
  background: transparent !important;
}

/* Product Cards Styling */
.premium-swiper-bg .product-thumb {
  background: #ffffff !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06) !important;
}


/* ==========================================================================
   2. NAVIGATION & PAGINATION
   ========================================================================== */

.list-product.relative {
  position: relative;
}

.swiper-button-prev2,
.swiper-button-next2 {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border-radius: 50%;
}

.swiper-list-product .swiper-pagination {
  left: auto !important;
  right: 1rem !important;
  width: auto !important;
  transform: none !important;
  display: flex !important;
  direction: rtl !important;
  justify-content: flex-start !important;
  gap: 6px;
}

.swiper-pagination-bullet-active {
  background-color: #9ca3af !important;
  opacity: 1 !important;
}

.swiper-pagination-bullet:not(.swiper-pagination-bullet-active) {
  background-color: #e5e7eb !important;
  opacity: 0.6 !important;
}


/* ==========================================================================
   3. DESKTOP STYLES (> 1024px)
   ========================================================================== */

@media (min-width: 1025px) {

  .swiper-list-product .swiper-pagination {
    display: none !important;
  }

  /* Quick View Hover Transition */
  .quick-view-wrapper {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: opacity, transform;
    pointer-events: none;
  }

  .product-item:hover .quick-view-wrapper {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Price Transition on Hover */
  .product-item .product-price-block {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
  }

  .product-item:hover .product-price-block {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
  }

  /* Color Swatches Desktop */
  .product-item .color-item {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    margin: 2px;
    position: relative !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    background: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  .product-item .color-item:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
  }

  .product-item .color-item .tag-action {
    display: block !important;
    position: absolute !important;
    bottom: 135% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(4px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
    z-index: 50 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    padding: 5px 8px 3px 8px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .product-item .color-item:hover .tag-action {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
  }
}


/* ==========================================================================
   4. MOBILE & TABLET STYLES (≤ 1024px)
   ========================================================================== */

@media (max-width: 1024px) {

  /* Mobile Background Dimensions */
  .premium-swiper-bg {
    padding-top: 60px !important;
  }

  .premium-swiper-bg::before {
    top: 0px !important;
    left: -15px !important;
    right: -15px !important;
    height: 225px !important;
    border-radius: 28px !important;
  }

  .collection-title {
    top: 18px !important;
    right: 15px !important;
    font-size: 20px !important;
  }

  /* Mobile Product Card Context */
  .product-item,
  .product-item .product-infor {
    position: relative;
  }

  .product-item .product-infor {
    min-height: 80px;
  }

  .product-item .product-infor > * {
    transition: all 0.3s ease;
  }

  /* Mobile Quick View */
  .quick-view-wrapper {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 20;
  }

  .product-item.is-active .quick-view-wrapper {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  /* Mobile Card State Toggles */
  .product-item .product-name {
    opacity: 1;
    margin-bottom: 5px;
    transition: opacity 0.25s ease;
  }

  .product-item.is-active .product-name {
    opacity: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  .product-item .product-price-block {
    opacity: 1;
    max-height: 50px;
    transform: translateY(0);
    margin-bottom: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  .product-item.is-active .product-price-block {
    opacity: 0 !important;
    max-height: 0 !important;
    transform: translateY(20px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /* Mobile Swatches Panel Overlay */
  .product-item .mobile-interactive-panel {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 8px 0 !important;
    background: transparent !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
    pointer-events: none !important;
    z-index: 40 !important;
    display: block !important;
  }

  .product-item.is-active .mobile-interactive-panel {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  .product-item .mobile-interactive-panel .list-color {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    direction: rtl !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .product-item .color-item {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 2px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative !important;
    pointer-events: auto !important;
    cursor: default !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .product-item .color-item:active {
    transform: none !important;
  }

  /* Specific border treatment for white & bright color swatches */
  .product-item .color-item[style*="background-color: #ffffff"],
  .product-item .color-item[style*="background-color: #fff"],
  .product-item .color-item[style*="background-color: #f8f8f8"],
  .product-item .color-item[style*="background-color: #f9f9f9"],
  .product-item .color-item[style*="background-color: #fafafa"],
  .product-item .color-item[style*="background-color: white"] {
    border-color: #999999 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  }

  .product-item .color-item .tag-action {
    display: block !important;
    position: absolute !important;
    bottom: 130% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(4px) !important;
    z-index: 9999 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    padding: 5px 8px 3px 8px !important;
    line-height: 1.2 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
  }

  .product-item .color-item:hover .tag-action,
  .product-item .color-item:active .tag-action {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
  }

  .list-action-right {
    z-index: 30 !important;
    pointer-events: auto !important;
  }

  .list-action-right .tag-action {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
}


/* ==========================================================================
   5. BUTTON & HELPER UTILITIES
   ========================================================================== */

.product-main .list-action {
  bottom: 0.65rem !important;
  left: 0.45rem !important;
  right: 0.45rem !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.quick-view-btn {
  width: 100% !important;
  min-width: 100% !important;
  white-space: nowrap !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

@media (max-width: 767px) {
  .quick-view-btn {
    font-size: 0.75rem !important;
  }
}

