/* WooCommerce Product Slider Styles */
.wps-slider-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 40px 0;
    position: relative;
}

.wps-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.wps-slider-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: #111;
    margin: 0;
    line-height: 1.2;
}

.wps-slider-nav {
    display: flex;
    gap: 8px;
}

.wps-button-prev,
.wps-button-next {
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: #fff;
    color: #666;
}

.wps-button-prev:hover,
.wps-button-next:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.wps-button-prev.swiper-button-disabled,
.wps-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wps-slider-container {
    overflow: hidden;
    padding: 10px 0;
    margin: 0 -10px;
}

.wps-product-slide {
    height: auto;
}

.wps-product-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f0f0f0;
}

.wps-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wps-product-image-link {
    display: block;
    position: relative;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 4px;
}

.wps-product-image-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: #f9f9f9;
    transition: transform 0.2s ease;
}

.wps-product-card:hover .wps-product-image-link img {
    transform: scale(1.05);
}

.wps-onsale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #d9534f;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wps-product-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.wps-product-brand {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.wps-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin: 0;
    line-height: 1.4;
    flex-grow: 1;
}

.wps-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wps-product-title a:hover {
    color: #0073aa;
}

.wps-product-price {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin-top: auto;
}

.wps-product-price .amount {
    font-weight: 600;
}

.wps-product-price ins {
    color: #d9534f;
    text-decoration: none;
    font-weight: 700;
}

.wps-product-price del {
    color: #999;
    font-weight: 400;
    margin-right: 8px;
}

.wps-view-all-wrapper {
    text-align: center;
    margin-top: 32px;
}

.wps-view-all-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #ccc;
    border-radius: 999px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: #fff;
}

.wps-view-all-button:hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: #111;
    text-decoration: none;
}

.wps-view-all-button svg {
    width: 15px;
    height: 15px;
}

/* Category (Collections) tiles */
.wps-category-slide { height: auto; }

.wps-category-card {
  display: block;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
  color: #111 !important; /* ensure link text inside the card uses dark color */
}

.wps-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.wps-category-image {
  position: relative;
  background: #f8f8f8;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.wps-category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.wps-category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff; /* keeps contrast consistent */
}

.wps-category-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #111 !important; /* make sure the title itself is always dark */
}

.wps-category-count {
  margin-left: 6px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.wps-category-arrow {
  font-size: 22px;
  line-height: 1;
  color: #9ca3af;
  transition: transform .2s ease, color .2s ease;
}

.wps-category-card:hover .wps-category-arrow {
  transform: translateX(4px);
  color: #111827;
}

/* Loading State */
.wps-slider-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
    min-height: 360px; /* tune if your cards are taller */
}

.wps-slider-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: wps-spin 1s linear infinite;
}

.wps-slider-container.wps-hidden { visibility: hidden; }

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

/* Responsive Design */
@media (max-width: 768px) {
    .wps-slider-title {
        font-size: 1.75rem;
    }
    
    .wps-slider-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .wps-slider-nav {
        align-self: flex-end;
    }
    
    .wps-product-card {
        padding: 12px;
    }
    
    .wps-product-title {
        font-size: 14px;
    }
    
    .wps-product-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wps-slider-title {
        font-size: 1.5rem;
    }
    
    .wps-button-prev,
    .wps-button-next {
        width: 36px;
        height: 36px;
    }
}

/* Ensure the category title (and its meta bar) is always visible */
.wps-category-card .wps-category-meta,
.wps-category-card .wps-category-title,
.wps-category-card .wps-category-count,
.wps-category-card .wps-category-arrow {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}
