/* Category Product Slider Styles - Ganesha Ayurveda */

/* Import Roboto Font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Container */
.cps-container {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 30px;
    font-family: 'Roboto', sans-serif;
}

.cps-wrapper {
    width: 100%;
}

/* Card Styles */
.cps-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cps-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cps-card-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.cps-card-image img {
    width: 100%;
    height: 300px !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cps-card:hover .cps-card-image img {
    transform: scale(1.05);
}

.cps-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cps-card-title {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cps-card-description {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Limit to 2 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cps-learn-more {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #E0A100;
    text-decoration: none;
    border-bottom: 2px solid #E0A100;
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
    align-self: flex-start;
}

.cps-learn-more:hover {
    color: #E0A100;
    border-color: #E0A100;
}

/* Grid Mode (3 or less products) */
.cps-grid-mode .cps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cps-grid-mode .cps-card-wrapper {
    display: flex;
}

/* Slider Mode (more than 3 products) - Splide */
.cps-slider-mode {
    position: relative;
}

.cps-splide {
    padding: 0 60px;
}

.splide__slide {
    display: flex;
}

.splide__slide .cps-card {
    width: 100%;
}

/* Custom Arrow Buttons - Ganesha Ayurveda Style */

.slider-arrow {
    background: #E0A100 !important;
    color: #ffffff !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(246, 220, 205, 0.3) !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
    border-radius: 50% !important;
    opacity: 1 !important;
}
.splide__arrow svg{
    fill:none;
}

.slider-arrow:hover {
    background: #E0A100 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(178, 118, 126, 0.4) !important;
    transform: scale(1.1);
}

.slider-arrow:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.slider-arrow svg {
    width: 16px;
    height: 16px;
}

/* Position arrows */
.splide__arrow--prev {
    left: 0 !important;
}

.splide__arrow--next {
    right: 0 !important;
}

/* Hide default Splide styles */
.splide__arrow:not(.slider-arrow) {
    display: none !important;
}

/* Tablet Responsive */
@media screen and (max-width: 1024px) {
    .cps-container {
        max-width: 100%;
        padding-top: 20px;
    }
    
    .cps-grid-mode .cps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cps-card-title {
        font-size: 20px;
    }
    
    .cps-card-description {
        font-size: 14px;
    }
    
    .cps-splide {
        padding: 0 50px;
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .cps-container {
        padding-top: 0px;
    }
    
    .cps-wrapper {
        padding: 10px;
    }
    .cps-card-image img{
    height:250px !important;
}
    /* Grid mode on mobile - check for single vs multiple products */
    .cps-grid-mode .cps-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide scrollbar */
    .cps-grid-mode .cps-grid::-webkit-scrollbar {
        display: none;
    }
    
    .cps-grid-mode .cps-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* Default: Multiple products - 80% width with scroll */
    .cps-grid-mode .cps-grid > * {
        flex: 0 0 80%;
    }
    
    /* Single product - Full width, centered, no scroll */
    .cps-grid-mode .cps-grid.single-product {
        display: block;
        overflow: visible;
    }
    
    .cps-grid-mode .cps-grid.single-product > * {
        flex: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Multiple products - horizontal scroll WITHOUT scrollbar */
    .cps-slider-mode .cps-splide {
        padding: 0 !important;
    }
    
    .cps-slider-mode .splide__track {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    /* Hide scrollbar for Chrome, Safari and Opera */
    .cps-slider-mode .splide__track::-webkit-scrollbar {
        display: none !important;
    }
    
    .cps-slider-mode .splide__list {
        display: flex !important;
        flex-wrap: nowrap !important;
        padding: 0 !important;
    }
    
    .cps-slider-mode .splide__slide {
        flex-shrink: 0 !important;
        width: 85% !important;
        margin-right: 15px !important;
    }
    
    .cps-slider-mode .splide__slide:first-child {
        margin-left: 10px !important;
    }
    
    .cps-slider-mode .splide__slide:last-child {
        margin-right: 10px !important;
    }
    
    /* Hide navigation arrows on mobile */
    .slider-arrow {
        display: none !important;
    }
    
    .cps-card-image {
        height: 250px;
    }
    
    .cps-card-content {
        padding: 20px;
    }
    
    .cps-card-title {
        font-size: 18px;
    }
    
    .cps-card-description {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .cps-learn-more {
        font-size: 15px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .cps-slider-mode .splide__slide {
        width: 90% !important;
    }
    
    .cps-card-image {
        height: 220px;
    }
    
    .cps-card-title {
        font-size: 17px;
    }
    
    .cps-card-description {
        font-size: 13px;
    }
}

/* Accessibility */
.cps-card:focus-within {
    outline: 2px solid #E0A100;
    outline-offset: 2px;
}

.cps-learn-more:focus {
    outline: 2px solid #E0A100;
    outline-offset: 4px;
}

/* Loading State */
.cps-loading {
    text-align: center;
    padding: 60px 20px;
    font-family: 'Roboto', sans-serif;
    color: #666666;
}

/* Empty State */
.cps-empty {
    text-align: center;
    padding: 60px 20px;
    font-family: 'Roboto', sans-serif;
    color: #999999;
}

/* Splide specific overrides */
.splide__pagination {
    display: none;
}

.splide {
    visibility: visible !important;
}