/* Cart Count Badge Styles */
.w-icon-cart {
    position: relative;
}

.w-icon-cart .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

/* Sticky Footer Cart Count */
.sticky-footer .w-icon-cart {
    position: relative;
    display: inline-block;
}

.sticky-footer .w-icon-cart .cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    padding: 0 4px;
}

/* Cart Table Responsive */
@media (max-width: 767px) {
    .shop-table.cart-table {
        font-size: 0.9rem;
    }

    .shop-table.cart-table .product-thumbnail img {
        width: 60px;
        height: auto;
    }
}

/* Category Dropdown Menu - Height Limit and Scroll */
.category-dropdown.show-dropdown .dropdown-box {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: visible !important; /* Allow submenu box to extend outside */
}

/* Hide Scrollbar for Category Dropdown */
.category-dropdown .dropdown-box::-webkit-scrollbar {
    display: none;
}

.category-dropdown .dropdown-box {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    scroll-behavior: smooth;
}

/* Hide default submenu */
.category-dropdown .submenu {
    display: none !important;
}

/* Allow overflow for parent containers */
.category-dropdown {
    overflow: visible !important;
}

.header-bottom {
    overflow: visible !important;
}

.container {
    overflow: visible !important;
}

/* Custom submenu box */
.custom-submenu-box {
    position: fixed !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    min-width: 280px !important;
    max-width: 400px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    z-index: 999999 !important;
    padding: 15px !important;
}

.custom-submenu-box h4 {
    margin: 0 0 15px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    border-bottom: 2px solid #f0f0f0 !important;
    padding-bottom: 10px !important;
}

.custom-submenu-box ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-submenu-box li {
    margin-bottom: 8px !important;
}

.custom-submenu-box a {
    display: block !important;
    padding: 8px 12px !important;
    color: #666 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.custom-submenu-box a:hover {
    background-color: #f8f8f8 !important;
    color: #336699 !important;
    padding-left: 18px !important;
}

/* Arrow indicator for items with submenu - will be added via JavaScript */
.category-dropdown .has-children > a::after {
    content: '›';
    float: right;
    color: #999;
    font-size: 16px;
}

/* Hover effect for parent items */
.category-dropdown .has-children:hover > a {
    background-color: #f8f8f8;
    color: #336699;
}



/* Product Media - Uniform Image Sizes */
.product-media {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-media img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.product-media:hover img {
    transform: scale(1.05);
}

/* Swiper product slides uniform sizing */
.swiper-slide.product-wrap .product-media img {
    height: 280px;
    object-fit: contain;
}

/* Product Detail Page - Main Gallery Image */
.product-gallery .product-single-swiper .product-image {
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 500px;
    overflow: hidden;
}

.product-gallery .product-single-swiper .product-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
}

/* Product Thumbnails */
.product-thumbs-wrap .product-thumb img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    object-position: center;
    background-color: #f5f5f5;
}



/* Product Media - Uniform Image Sizes */
.product-media {
  position: relative;
  overflow: hidden;
  background-color: #f5f5f5;
}

.product-media img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}

.product-media:hover img {
  transform: scale(1.05);
}

/* Swiper product slides uniform sizing */
.swiper-slide.product-wrap .product-media img {
  height: 280px;
  object-fit: contain;
}

/* Product Detail Page - Main Gallery Image */
.product-gallery .product-single-swiper .product-image {
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 500px;
  overflow: hidden;
}

.product-gallery .product-single-swiper .product-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  object-position: center;
}

/* Product Thumbnails */
.product-thumbs-wrap .product-thumb img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  object-position: center;
  background-color: #f5f5f5;
}

/* ============================================
 LAZY LOADING STYLES
 ============================================ */

/* Skeleton Loader Base Styles */
.skeleton-loader {
  padding: 10px 0;
}

.skeleton-product {
  padding: 10px;
  flex: 0 0 20%;
  max-width: 20%;
}

@media (max-width: 991px) {
  .skeleton-product {
      flex: 0 0 25%;
      max-width: 25%;
  }
}

@media (max-width: 767px) {
  .skeleton-product {
      flex: 0 0 33.333%;
      max-width: 33.333%;
  }
}

@media (max-width: 575px) {
  .skeleton-product {
      flex: 0 0 50%;
      max-width: 50%;
  }
}

.skeleton-image {
  width: 100%;
  height: 280px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  margin-bottom: 15px;
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 10px;
}

.skeleton-title {
  width: 80%;
}

.skeleton-price {
  width: 50%;
}

.skeleton-auction-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.skeleton-button {
  height: 38px;
  background: linear-gradient(90deg, #e8e8e8 25%, #d8d8d8 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% {
      background-position: -200% 0;
  }
  100% {
      background-position: 200% 0;
  }
}

/* Hide skeleton when content is loaded */
.lazy-load-section .lazy-content:not(:empty) + .skeleton-loader,
.lazy-load-section[data-lazy-loaded="true"] .skeleton-loader {
  display: none;
}

/* Error State */
.lazy-load-error {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.lazy-load-error i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 15px;
}

.lazy-load-error p {
  margin-bottom: 15px;
}

.lazy-load-error .btn-retry {
  padding: 8px 20px;
  background: #336699;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.lazy-load-error .btn-retry:hover {
  background: #254d73;
}