/**
 * WooCommerce Product Showcase - Apple-Inspired Styles
 * Clean, minimal design with smooth interactions
 */

/* ============================================
   GLOBAL STYLES & RESETS
   ============================================ */

.wps-grid-container,
.wps-carousel-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0 auto;
    padding: 40px 0;
    max-width: 1400px;
}

.wps-no-products {
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
    font-size: 18px;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.wps-grid {
    display: grid;
    gap: 30px;
    padding: 0 20px;
}

.wps-grid-cols-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.wps-grid-cols-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wps-grid-cols-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.wps-grid-cols-5 {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.wps-grid-cols-6 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

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

@media (max-width: 768px) {
    .wps-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .wps-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

/* ============================================
   PRODUCT CARD
   ============================================ */

.wps-product-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wps-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* ============================================
   PRODUCT IMAGE
   ============================================ */

.wps-product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f5f5f7;
    width: 100%;
}

/* Image Ratio Options */
.wps-ratio-1-1 {
    padding-bottom: 100%;
}

.wps-ratio-4-3 {
    padding-bottom: 75%;
}

.wps-ratio-16-9 {
    padding-bottom: 56.25%;
}

.wps-product-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.wps-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.wps-product-card:hover .wps-product-image {
    transform: scale(1.08);
}

/* Sale Badge */
.wps-sale-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #ff3b30;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

/* Quick View Overlay */
.wps-quick-view-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wps-product-card:hover .wps-quick-view-overlay {
    transform: translateY(0);
}

.wps-quick-view-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ============================================
   PRODUCT INFO
   ============================================ */

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

.wps-product-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: #1d1d1f;
}

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

.wps-product-title a:hover {
    color: #0071e3;
}

/* Product Rating */
.wps-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.wps-product-rating .star-rating {
    font-size: 14px;
}

/* Product Price */
.wps-product-price {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 4px 0;
}

.wps-product-price del {
    font-size: 16px;
    color: #86868b;
    margin-right: 8px;
    font-weight: 400;
}

.wps-product-price ins {
    text-decoration: none;
    color: #ff3b30;
}

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

/* ============================================
   PRODUCT ACTIONS
   ============================================ */

.wps-product-actions {
    margin-top: auto;
    padding-top: 12px;
}

.wps-add-to-cart,
.wps-view-product {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    background: #0071e3;
    color: #ffffff !important;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
}

.wps-add-to-cart:hover,
.wps-view-product:hover {
    background: #0077ed;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

.wps-add-to-cart:active,
.wps-view-product:active {
    transform: scale(0.98);
}

/* ============================================
   CAROUSEL STYLES
   ============================================ */

.wps-carousel-container {
    position: relative;
    padding: 0 60px;
}

.wps-carousel {
    overflow: hidden;
    padding: 10px 0 50px;
}

.wps-carousel .swiper-slide {
    height: auto;
    display: flex;
}

.wps-carousel .wps-product-card {
    width: 100%;
}

/* Carousel Navigation Buttons */
.wps-carousel-button-prev,
.wps-carousel-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    color: #1d1d1f;
}

.wps-carousel-button-prev {
    left: 0;
}

.wps-carousel-button-next {
    right: 0;
}

.wps-carousel-button-prev:hover,
.wps-carousel-button-next:hover {
    background: #f5f5f7;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

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

/* Carousel Pagination */
.wps-carousel-pagination {
    text-align: center;
    margin-top: 24px;
}

.wps-carousel-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d2d2d7;
    opacity: 1;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.wps-carousel-pagination .swiper-pagination-bullet-active {
    background: #0071e3;
    width: 24px;
    border-radius: 4px;
}

/* Mobile Carousel Adjustments */
@media (max-width: 768px) {
    .wps-carousel-container {
        padding: 0 50px;
    }
    
    .wps-carousel-button-prev,
    .wps-carousel-button-next {
        width: 36px;
        height: 36px;
    }
    
    .wps-carousel-button-prev svg,
    .wps-carousel-button-next svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .wps-carousel-container {
        padding: 0 20px;
    }
    
    .wps-carousel-button-prev,
    .wps-carousel-button-next {
        display: none;
    }
}

/* ============================================
   LOADING STATE
   ============================================ */

.wps-product-card.loading {
    pointer-events: none;
}

.wps-product-card.loading .wps-product-image {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.wps-product-card:focus-within {
    outline: 2px solid #0071e3;
    outline-offset: 4px;
}

.wps-add-to-cart:focus,
.wps-view-product:focus,
.wps-product-title a:focus {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .wps-product-card {
        background: #1d1d1f;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .wps-product-card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    }
    
    .wps-product-image-wrapper {
        background: #2d2d2f;
    }
    
    .wps-product-title,
    .wps-product-price {
        color: #f5f5f7;
    }
    
    .wps-carousel-button-prev,
    .wps-carousel-button-next {
        background: #2d2d2f;
        color: #f5f5f7;
    }
    
    .wps-carousel-button-prev:hover,
    .wps-carousel-button-next:hover {
        background: #3d3d3f;
    }
}
