/* Special Offers Section CSS */

.special-offers-section {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 48px;
    text-align: right;
    font-size: 45px;
    color: #000;
    font-family: Tajawal;
    direction: ltr;
    margin-top: 55px;
    padding-right: 45px;
    margin-bottom: 45px;
}


.special-offers-title {
    align-self: stretch;
    position: relative;
    letter-spacing: -0.41px;
    line-height: 70.5px;
    text-transform: capitalize;
    z-index: 0;
}

.special-offers-flash-icon {
    width: 45px;
    position: absolute;
    margin: 0 !important;
    top: 6px;
    right: 320px;
    height: 45px;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1;
}

.special-offers-main-container {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 30px;
    z-index: 2;
    text-align: center;
    font-size: 14px;
    color: #fff;
    font-family: Almarai;
    overflow: hidden; /* Prevent overflow */
}

.special-offers-products-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* Show 4.5 products: 4 full + 0.5 partial */
    width: calc(4.5 * 298px + 4 * 30px); /* 4.5 products + 4 gaps */
    max-width: calc(4.5 * 298px + 4 * 30px);
    /* Force RTL direction for proper scroll behavior */
    direction: rtl;
}

.special-offers-products-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.special-offers-products-grid.has-moved {
    pointer-events: none;
}

.special-offers-products-grid.has-moved * {
    pointer-events: none;
}

.special-offers-product-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0; /* Prevent items from shrinking */
    min-width: 298px; /* Ensure minimum width */
    /* Reset direction to LTR for proper product layout */
    direction: ltr;
}

.special-offers-product-container {
    width: 298px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 18px;
}

.special-offers-product-image-wrapper {
    align-self: stretch;
    position: relative;
    border-radius: 7px;
    height: 374px;
    overflow: hidden;
    flex-shrink: 0;
}

.special-offers-product-image {
    position: absolute;
    top: 0px;
    left: 0px;
    border-radius: 7px;
    width: 298px;
    height: 374px;
    overflow: hidden;
    object-fit: cover;
}

.special-offers-sale-badge {
    position: absolute;
    top: 0px;
    left: 0px;
    border-radius: 7px 0px 7px 0px;
    background-color: #c70032;
    width: 131px;
    height: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 7px 19px;
    box-sizing: border-box;
}

.special-offers-sale-text {
    position: relative;
}

.special-offers-wishlist-btn {
    position: absolute;
    top: calc(50% - 169px);
    left: calc(50% + 88px);
    border-radius: 28px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    border: none;
    background: transparent;
}

.special-offers-product-info {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 20px;
    text-align: right;
    font-size: 18px;
    color: #3b3b3b;
    font-family: Tajawal;
}

.special-offers-product-title {
    align-self: stretch;
    position: relative;
    line-height: 132%;
    display: -webkit-inline-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
}

.special-offers-price-cart-container {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 134px;
    text-align: center;
    font-size: 25px;
    color: #c70032;
    font-family: Poppins;
}

.special-offers-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 11px;
}

.special-offers-current-price-wrapper {
    width: 108px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.special-offers-current-price {
    position: relative;
    line-height: 100%;
}

.special-offers-old-price {
    width: 108px;
    position: relative;
    font-size: 16px;
    text-decoration: line-through;
    line-height: 100%;
    font-weight: 500;
    color: #757575;
    text-align: left;
    display: inline-block;
}

.special-offers-cart-form {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.special-offers-section .special-offers-add-to-cart.action.tocart.primary {
    width: 56px !important;
    border-radius: 28px !important;
    height: 56px !important;
    cursor: pointer;
    border: none !important;
    background-color: #E3E8EE !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    color: inherit !important;
    font-weight: normal !important;
    min-width: auto !important;
    max-width: 56px !important;
}

.special-offers-section .special-offers-add-to-cart.action.tocart.primary:hover {
    background-color: rgba(227, 232, 238, 0.8) !important;
    transform: scale(1.05);
    color: inherit !important;
}

.special-offers-section .special-offers-add-to-cart img {
    width: auto;
    height: auto;
    max-width: 24px;
    max-height: 24px;
}

.special-offers-banner {
    width: 473px;
    position: relative;
    height: 516px;
    text-align: right;
    font-size: 35px;
    font-family: Tajawal;
}

.special-offers-banner-image {
    position: absolute;
    top: 0px;
    left: 0px;
    border-radius: 7px;
    width: 473px;
    height: 516px;
    object-fit: cover;
}

.special-offers-banner-overlay {
    position: absolute;
    top: 416px;
    left: 0px;
    border-radius: 0px 0px 7px 7px;
    background-color: #c70032;
    width: 473px;
    height: 103px;
    overflow: hidden;
}

.special-offers-banner-text {
    position: absolute;
    top: 25px;
    left: 249px;
    line-height: 150%;
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .special-offers-section {
        padding: 40px 15px;
    }
    
    .special-offers-main-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .special-offers-products-grid {
        /* Show 3.5 products on medium screens */
        width: calc(3.5 * 298px + 3 * 20px);
        max-width: calc(3.5 * 298px + 3 * 20px);
        gap: 20px;
    }
    
    .special-offers-banner {
        width: 100%;
        max-width: 473px;
    }
    
    .special-offers-banner-image {
        width: 100%;
    }
    
    .special-offers-banner-overlay {
        width: 100%;
    }
    
    .special-offers-flash-icon {
        left: 20px;
    }
}

@media screen and (max-width: 768px) {
    .special-offers-section {
        padding: 30px 10px;
        font-size: 32px;
    }
    
    .special-offers-title {
        font-size: 32px;
        line-height: 50px;
    }
    
    .special-offers-products-grid {
        /* Show 2.5 products on mobile */
        width: calc(2.5 * 280px + 2 * 15px);
        max-width: calc(2.5 * 280px + 2 * 15px);
        gap: 15px;
        flex-direction: row; /* Keep horizontal scroll on mobile */
    }
    
    .special-offers-product-container {
        width: 100%;
        max-width: 300px;
    }
    
    .special-offers-product-image {
        width: 100%;
    }
    
    .special-offers-price-cart-container {
        gap: 20px;
    }
    
    .special-offers-flash-icon {
        width: 35px;
        height: 35px;
        top: 10px;
        left: 10px;
    }
}

@media screen and (max-width: 480px) {
    .special-offers-section {
        padding: 20px 5px;
        font-size: 24px;
    }
    
    .special-offers-title {
        font-size: 24px;
        line-height: 40px;
    }
    
    .special-offers-product-image-wrapper {
        height: 250px;
    }
    
    .special-offers-product-image {
        height: 250px;
    }
    
    .special-offers-banner {
        height: 300px;
    }
    
    .special-offers-banner-image {
        height: 300px;
    }
    
    .special-offers-banner-overlay {
        top: 220px;
        height: 80px;
    }
    
    .special-offers-banner-text {
        font-size: 24px;
        left: 20px;
        top: 15px;
    }
} 