/* Shopino Carousel Styles */
.shopino-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    direction: rtl; /* RTL support */
}

.shopino-carousel-container {
    position: relative;
    width: 100%;
}

.shopino-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    /* Ensure smooth infinite loop */
    will-change: transform;
    /* Prevent gaps and ensure proper alignment */
    gap: 0;
    flex-wrap: nowrap;
    align-items: flex-start;
    direction: rtl; /* RTL support */
}

.shopino-carousel-item {
    flex: 0 0 calc(20% - 16px); /* 5 items visible (20% each) with adjusted gap */
    margin: 0 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    font-family: IRANSansX;
}

/* Navigation Arrows */
.shopino-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-8, 8px);
    background: var(--bg-strong-950, #0E121B);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 6px;
}

.shopino-carousel-arrow:hover {
    background: #2b5e02;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-50%) scale(1.1);
}

.shopino-carousel-arrow img {
    width: 20px;
    height: 20px;
}

.shopino-carousel-prev {
    right: 41px; /* RTL: prev arrow on the right */
}

.shopino-carousel-next {
    left: 41px; /* RTL: next arrow on the left */
}

/* Hide arrows when no navigation is available */
.shopino-carousel-arrow[style*="display: none"],
.shopino-carousel-arrow.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Dots Navigation */
.shopino-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
}

.shopino-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shopino-carousel-dot:hover {
    background: #bbb;
}

.shopino-carousel-dot.active {
    background: #0073aa;
    transform: scale(1.2);
}

/* Loading State */
.shopino-carousel.loading .shopino-carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.shopino-carousel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.shopino-carousel-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: shopino-spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.shopino-carousel-loading-text {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-family: inherit;
}

/* Error State */
.shopino-carousel-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
}

.shopino-carousel-error-icon {
    color: #dc3545;
    margin-bottom: 15px;
}

.shopino-carousel-error-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    font-family: inherit;
}

.shopino-carousel-error-message {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px 0;
    font-family: inherit;
    line-height: 1.5;
}

.shopino-carousel-error-retry {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background-color 0.3s ease;
}

.shopino-carousel-error-retry:hover {
    background: #005a87;
}

/* No Products State */
.shopino-carousel-no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
}

.shopino-carousel-no-products-icon {
    color: #6c757d;
    margin-bottom: 15px;
}

.shopino-carousel-no-products-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    font-family: inherit;
}

.shopino-carousel-no-products-message {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-family: inherit;
    line-height: 1.5;
}



/* Special styling for previous and next items */

.shopino-carousel-item.shopino-carousel-item-next,
.shopino-carousel-item.shopino-carousel-item-prev  {
    opacity: 0;
    transition: ease-out;
    transition-duration: 0.3s;
}

.shopino-carousel-item-special{
    opacity: 0.3;
    transition: ease-in;
    transition-duration: 0.3s;
}

.shopino-carousel-item-content{
    display: flex;
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    align-self: stretch;
}
.amazing-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    text-align: center;
    display: flex;
    padding: 4px 4px 4px 8px;
    justify-content: center;
    align-items: center;
    gap: 2px;
    border-radius: var(--radius-full, 999px);
    background: var(--state-success-base, #09B563);
    color: var(--static-static-white, #FFF);
    font-feature-settings: 'liga' off, 'calt' off;

    /* Subheading/2X Small */
    font-family: IRANSansX;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 12px; /* 109.091% */
}

.amazing-tag img{
    width: 12px!important;
    height: 12px!important;
}

.shopino-carousel-item-shop-profile-pic {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-4, 4px);
    background: var(--bg-soft-200, #E1E4EA);
}
.shopino-carousel-item-shop-name{
    color: var(--text-strong-950, #0E121B);
    text-align: right;
    font-feature-settings: 'liga' off, 'calt' off;

    /* Title/Label/X Small */
    font-family: IRANSansX;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 16px; /* 133.333% */

}
.shopino-carousel-item-content p{
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.shopino-carousel-item-content-shop{
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
}
.shopino-carousel-item-title{
    display: flex;
    align-items: center;
    gap: 1px;
    align-self: stretch;
    overflow: hidden;

    color: var(--text-strong-950, #0E121B);
    text-align: right;
    font-feature-settings: 'liga' off, 'calt' off;
    text-overflow: ellipsis;

    /* Title/Label/Small */
    font-family: IRANSansX;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px; /* 142.857% */
    letter-spacing: -0.084px;
    margin: 0px;
}

.shopino-carousel-item-bottom{
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-content: center;
    flex-direction: row;
    width: 100%;
}
.shopino-carousel-item-price-container{
    display: flex;
    gap: 4px;
    color: var(--text-strong-950, #0E121B);
    font-feature-settings: 'liga' off, 'calt' off;

    /* Subheading/X Small */
    font-family: IRANSansX;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 16px; /* 133.333% */
    text-transform: uppercase;
}

.shopino-carousel-item-discount-container{
    display: flex;
    padding: 4px 4px 4px 8px;
    justify-content: center;
    align-items: center;
    gap: 2px;

    border-radius: var(--radius-full, 999px);
    background: var(--state-error-base, #FB3748);

    
}

.shopino-carousel-item-discount{
    color: var(--static-static-white, #FFF);
    font-feature-settings: 'liga' off, 'calt' off;

    /* Subheading/2X Small */
    font-family: IRANSansX;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 12px; /* 109.091% */
    text-transform: uppercase;
    margin: 0px;   
}

.skiped-through-price{
    color: var(--text-soft-400, #99A0AE);
    font-feature-settings: 'liga' off, 'calt' off;
    /* Subheading/2X Small */
    font-family: IRANSansX;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 12px; /* 109.091% */
    text-transform: uppercase;
    text-decoration: line-through;
}
.shopino-carousel-item-image img{
    max-height: 216px!important;
    width: 100%!important;
    object-fit: cover;
    height: 216px!important;
}



/* Responsive Design */
@media (max-width: 1024px) {
    .shopino-carousel-item {
        flex: 0 0 calc(25% - 12px); /* 4 items visible on tablets */
        margin: 0 6px;
    }

    .shopino-carousel-item.shopino-carousel-item-next,
    .shopino-carousel-item.shopino-carousel-item-prev,
    .shopino-carousel-item-special  {
        opacity: 1;
    }

    .shopino-carousel-item-image img{
        max-height: 192px!important;
    }



}

@media (max-width: 768px) {

    .shopino-carousel-item-image img{
        max-height: 192px!important;
    }

    .shopino-carousel-item {
        flex: 0 0 calc(33.333% - 8px); /* 3 items visible on mobile */
        margin: 0 4px;
    }
    
    
    
    .shopino-carousel-arrow img {
        width: 20px;
        height: 20px;
    }
    
    .shopino-carousel-loading,
    .shopino-carousel-error,
    .shopino-carousel-no-products {
        padding: 30px 15px;
        min-height: 150px;
    }
    
    .shopino-carousel-loading-spinner {
        width: 35px;
        height: 35px;
    }
    
    .shopino-carousel-error-title,
    .shopino-carousel-no-products-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .shopino-carousel-item {
        flex: 0 0 calc(50% - 8px); /* 2 items visible on small mobile */
        margin: 0 4px;
    }
    
    
    .shopino-carousel-item-excerpt {
        font-size: 0.8em;
    }
    
    .shopino-carousel-loading,
    .shopino-carousel-error,
    .shopino-carousel-no-products {
        padding: 25px 10px;
        min-height: 120px;
    }
    
    .shopino-carousel-loading-spinner {
        width: 30px;
        height: 30px;
    }
    
    .shopino-carousel-error-title,
    .shopino-carousel-no-products-title {
        font-size: 15px;
    }
    
    .shopino-carousel-loading-text,
    .shopino-carousel-error-message,
    .shopino-carousel-no-products-message {
        font-size: 13px;
    }
}

/* Hide arrows on very small screens */
@media (max-width: 360px) {
    .shopino-carousel-arrow {
        display: none;
    }
}