.category_div {
    background: #fcfcfc no-repeat padding-box;
    border: 1px solid #e2f0ff;
    border-radius: 5px;
    opacity: 1;
    padding: 5px;
}

.seller-header-image {
    margin-top: 9px;
    border-radius: 4px;
    height: 220px;
    background: url("./img/seller.png") no-repeat center;
    background-size: cover;
}

.for-discount-value {
    color: white;
    border-radius: 5px 0;
    font-size: small;
}

html[dir="ltr"] .for-discount-value {
    padding: 3px 4px 2px 5px;
}

html[dir="rtl"] .for-discount-value {
    padding: 3px 5px 2px 4px;
}

.for-discount-value-null {
    color: white;
    border-radius: 0 5px;
    font-size: small;
    display: inline-block;
}

html[dir="ltr"] .for-discount-value-null {
    padding: 3px 4px 2px 5px;
}

html[dir="rtl"] .for-discount-value-null {
    padding: 3px 5px 2px 4px;
}

.for-discount-div {
    margin-top: -6%;
    margin-bottom: 6%;
}

html[dir="ltr"] .for-discount-div {
    margin-right: -9%;
}

html[dir="rtl"] .for-discount-div {
    margin-left: -9%;
}

@media (max-width: 375px) {
    .discount-hed {
        margin-top: -5%;
        margin-right: -5%;
        margin-bottom: 6%;
    }
}

.for-count-value {
    position: absolute;
    right: 0.6875rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    color: black;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.25rem;
}

@media (max-width: 600px) {
    .seller-header-image {
        height: 86px;
    }
}

.chat {
    float: right;
    margin-right: 5px;
    width: 100px;
}

.flower {
    float: right;
    width: 114px;
}

.cz-carousel [data-nav].tns-nav-active {
    background-color: #92c6ff !important;
}

.cz-carousel [data-nav] {
    background-color: #fff !important;
}

.cz-carousel .tns-nav {
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
    text-align: center;
    bottom: 25px;
}

.tns-outer {
    padding: 0 !important;
    margin-bottom: -20px;
}

.banner_card {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1019607843);
    border: 1px solid #e2f0ff;
    border-radius: 3px;
}

[data-simplebar] {
    overflow-y: auto;
    padding-right: 0 !important;
}

.simplebar-content {
    padding: 0 !important;
}

.footer_banner {
    padding-right: 4px;
    padding-left: 4px;
    margin-top: 5px;
}

.footer_banner:first-child {
    padding-right: unset;
    padding-left: 0;
}

html[dir="rtl"] .footer_banner:first-child {
    padding-right: 0;
}

.footer_banner:nth-child(5) {
    padding-left: unset;
    padding-right: 0;
}

html[dir="rtl"] .footer_banner:nth-child(5) {
    padding-left: 0;
}

.widget-product-title .ptr {
    position: relative;
    display: inline-block;
    word-wrap: break-word;
    overflow: hidden;
    max-height: 1.2em;
    line-height: 1.2em;
    font-weight: 600;
    font-size: 13px;
}

.widget .btn > i {
    margin-top: -1px;
    vertical-align: middle;
    font-size: 10px;
}

.widget .btn-outline-accent {
    border-radius: 3px;
    width: 80px;
    padding: 2px;
}

.widget-product-title {
    position: relative;
}

.text-accent {
    font-weight: 700;
    font-size: 17px;
}

.category_title {
    color: black !important;
    font-size: 16px;
    font-weight: 600;
}

.featured_deal_title {
    font-size: 30px;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.featured_deal_product {
    cursor: pointer;
    height: 97px;
}

.featured_product_details {
    padding: 5px;
}

.featured_product_pic .image_center img {
    vertical-align: middle;
}

.featured_deal_title {
    position: relative;
}

.featured_product-title .ptr {
    font-weight: 400;
    font-size: 19px !important;
    color: #000000 !important;
    position: relative;
    display: inline-block;
    word-wrap: break-word;
    overflow: hidden;
    max-height: 2.4em;
    line-height: 1.2em;
}

.featured_product-price {
    margin-top: -10px;
}

.featured_product-price .ptp {
    font-weight: 700;
    font-size: 19px !important;
}

.flash_deal {
    border-radius: 3px;
}

.flash_deal_title {
    color: black;
    font-weight: 700;
    font-size: 25px;
    text-transform: uppercase;
}

.cz-countdown .cz-countdown-value {
    font-size: 16px !important;
    font-weight: 700 !important;
}

.cz-countdown {
    flex-wrap: wrap;
    font-weight: normal;
    display: flex;
    justify-content: center;
    flex-direction: row;
}

.flash_deal_product {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.0509803922);
    background: white;
    border-radius: 5px;
}

.flash_deal_product_pic {
    height: 175px;
    background: #f9f9f9;
    border-radius: 3px;
    padding: 0 10px;
}

.flash_deal_product_pic img {
    height: 149px;
}

.flash_deal_product_details {
    position: relative;
}

.flash_deal_product_details .flash-product-title {
    position: relative;
    display: inline-block;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    line-height: 1.2em;
}

.flash_deal_product_details .flash-product-title a {
    font-weight: 600;
    font-size: 16px;
    color: black !important;
}

.flash_deal_product_details .flash-product-review {
    font-weight: 400;
    font-size: 11px;
}

.flash_deal_product_details .flash-product-review .review-count {
    color: #fea96e !important;
}

.flash_deal_product_details .flash-product-review .star-rating i {
    font-size: 16px !important;
}

.deal_of_the_day h1 {
    font-weight: 700;
    font-size: 29px;
    padding-top: 40px;
    text-align: center;
    text-transform: uppercase;
}

.buy_btn {
    font-weight: 700;
    font-size: 22px;
    width: 198px;
    height: 46px;
    background-color: white;
    border-radius: 3px;
    border: 1px solid white;
}

.deal_latest_product .product-card {
    box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.0784313725);
    border-radius: 5px;
    height: 284px;
}

.deal_latest_product .product-card .card-header {
    height: 200px;
    text-align: center;
    background: #f9f9f9 0 0 no-repeat padding-box;
    border-radius: 5px 5px 0 0;
}

.product-title1 {
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #000000 !important;
    position: relative;
    display: inline-block;
    word-wrap: break-word;
    overflow: hidden;
    max-height: 2.4em;
    line-height: 1.2em;
}

.deal_latest_product .product-title {
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #000000 !important;
}

.deal-title {
    font-weight: 400;
    font-size: 14px;
    text-align: center;
}

.order-summery-footer-image {
    width: auto;
}

.view_all {
    display: flex;
    justify-content: flex-end !important;
}

.view_border {
    margin-top: -53px;
    border-top: 2px solid #e3e9ef;
    margin-bottom: 53px;
}

@media (min-width: 1024px) {
    .main_banner_img {
        margin: 0;
    }

    .footer_banner_img {
        height: 165px;
    }

    .banner_product {
        height: 490px !important;
    }
}

@media (min-width: 992px) {
    .main_banner_img {
        margin: 0;
        height: 378px !important;
    }

    .footer_banner_img {
        height: 165px !important;
    }

    .banner_product {
        background: white;
        height: 526px !important;
    }
}

@media (max-width: 375px) {
    .for-discount-div {
        margin-top: -5%;
        margin-bottom: 6%;
    }

    html[dir="ltr"] .for-discount-div {
        margin-right: -5%;
    }

    html[dir="rtl"] .for-discount-div {
        margin-left: -5%;
    }
}

@media (min-width: 768px) {
    .main_banner_img {
        margin: 0;
        height: 260px;
    }

    .banner_product {
        height: 306px;
    }

    .flash_deal {
        height: 258px;
    }
}

@media (max-width: 768px) {
    .banner_card {
        box-shadow: none;
        border: none;
        border-radius: 0;
    }

    .deal-title {
        font-size: 20px !important;
    }

    .btn-sm,
    .btn-group-sm > .btn {
        padding: 5px 10px;
        font-size: 0.8125rem;
        line-height: 1.5;
        border-radius: 0.1875rem;
        margin-top: 3px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 14%;
        color: #fff;
        text-align: center;
        opacity: 0.5;
        transition: opacity 0.15s ease;
    }

    .featured_deal_carosel .carousel-inner {
        padding: 0;
    }

    .view_all {
        display: flex;
        justify-content: flex-start !important;
    }

    .flash_deal {
        box-shadow: none;
        border: none;
        border-radius: 0;
    }

    .fd {
        padding-bottom: 10px;
        border-bottom: 2px solid #e2f0ff !important;
    }

    .feature_header {
        margin-top: 0;
    }

    .feature_header span {
        padding-right: 0;
        padding-left: 0;
        font-weight: 700;
        font-size: 25px;
        text-transform: uppercase;
    }

    .view_border {
        margin: 16px 0;
        border-top: 2px solid #e2f0ff !important;
    }

    .flash-product-price,
    .text-accent {
        font-size: 14px !important;
    }
}

.featured_deal {
    min-height: 108px;
}

.btn-outline--info {
    border: 1px solid #1b7fed;
    color: #1b7fed !important;
}

.btn-outline--info:hover {
    border-color: #1b7fed;
    color: #fff !important;
    background-color: #1b7fed;
}

.qty_input {
    width: 50px;
    background-color: #f4f9fe;
    border: 1px solid #d5e8fc;
    border-radius: 5px;
    text-align: center;
    height: 40px;
}

.qty_minus,
.qty_plus {
    display: flex;
    align-items: center;
    color: #1455ac;
    cursor: pointer;
}

.__img-62 {
    min-width: 60px;
}

.fs-10 {
    font-size: 10px !important;
}

.outline-0 {
    outline: 0 !important;
}

.steps {
    max-width: 500px;
}

.steps .step-item:first-child .step-count {
    left: 12px;
}

[dir="rtl"] .steps .step-item:first-child .step-count {
    left: auto;
    right: 12px;
    margin-right: -0.8125rem;
}

.steps .step-item:first-child .step-label {
    text-align: start;
}

.steps .step-item:last-child .step-count {
    left: auto;
    right: 0;
}

[dir="rtl"] .steps .step-item:last-child .step-count {
    left: 0;
    right: auto;
    margin-left: 0;
}

.steps .step-item:last-child .step-label {
    text-align: end;
}

.saved-address-dropdown .dropdown-item {
    margin-inline: 10px;
    width: auto;
}

.saved-address-dropdown .dropdown-item.active {
    border-radius: 8px;
    border: 1px solid rgba(20, 85, 172, 0.3);
    background: rgba(20, 85, 172, 0.02);
    padding: 10px 14px;
}

.progress {
    height: 0.25rem;
    background-color: #dfedff;
    border-radius: 50rem;
}

.progress-bar {
    background-color: var(--primary-clr);
}

.border-primary-light {
    border: 1px solid rgba(27, 127, 237, 0.2) !important;
}

@media (max-width: 991px) {
    #shop-sidebar {
        position: fixed;
        right: 0;
        left: auto;
        top: 0;
        width: 320px;
        max-width: 100%;
        height: 100lvh;
        z-index: 9999;
        border-radius: 0.5rem 0 0 0.5rem;
        transform: translateX(100%);
        transition: transform 200ms ease;
        background-color: #fff !important;
    }

    #shop-sidebar.active {
        transform: translateX(0);
    }

    .profile-aside-overlay {
        position: fixed;
        left: 0;
        top: 0;
        width: calc(100vw - 320px);
        height: 100%;
        z-index: 9998;
        transform: translateX(2000%);
        transition: transform 200ms ease;
        background-color: rgba(0, 0, 0, 0.158) !important;
    }

    .profile-aside-overlay.active {
        transform: translateX(0);
    }

    #shop-sidebar .shop-sidebar-scroll {
        max-height: 90vh;
        overflow: auto;
    }

    #shop-sidebar .shop-sidebar-scroll::-webkit-scrollbar {
        width: 0;
    }
}

.profile-aside-close-btn {
    font-size: 1.5rem;
}

.flash_deal_product_details a.text-capitalize {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
}

.others-store-card .name-area .info h5,
.others-store-card .name-area .info .h5 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
}

.recommended-product-card img {
    border: 1px solid #eef1ff;
}

.cz-countdown-days {
    border: 1px solid var(--web-primary);
}

.btn-scroll-top {
    background: var(--web-primary);
}

.__best-selling:hover .ptr,
.flash_deal_product:hover .flash-product-title {
    color: var(--web-primary);
}

.cz-countdown-hours {
    border: 1px solid var(--web-primary);
}

.cz-countdown-minutes {
    border: 1px solid var(--web-primary);
}

.cz-countdown-seconds {
    border: 1px solid var(--web-primary);
}

.flash_deal_product_details .flash-product-price {
    color: var(--web-primary);
}

.featured_deal_left {
    background: var(--web-primary) 0 0 no-repeat padding-box;
}

.category_div:hover {
    color: var(--web-secondary);
}

.deal_of_the_day {
    background: var(--web-secondary);
}

.best-selling-image {
    background: var(--web-primary-10);
}

.top-rated-image {
    background: var(--web-primary-10);
}

@media (max-width: 800px) {
    [dir="rtl"] .categories-title {
        margin-right: 0;
    }

    [dir="ltr"] .categories-title {
        margin-left: 6px;
    }

    [dir="rtl"] .seller-list-title {
        margin-right: 0;
    }

    [dir="ltr"] .seller-list-title {
        margin-left: 10px;
    }

    [dir="rtl"] .seller-list-view-all {
        margin-left: 20px;
    }

    [dir="ltr"] .seller-list-view-all {
        margin-right: 10px;
    }

    [dir="rtl"] .category-product-view-title {
        margin-right: 16px;
    }

    [dir="ltr"] .category-product-view-title {
        margin-left: -8px;
    }

    [dir="rtl"] .category-product-view-all {
        margin-left: -7px;
    }

    [dir="ltr"] .category-product-view-all {
        margin-right: 5px;
    }
}

@media (min-width: 801px) {
    [dir="rtl"] .categories-title {
        margin-right: 25px;
    }

    [dir="ltr"] .categories-title {
        margin-left: 25px;
    }

    [dir="rtl"] .seller-list-title {
        margin-right: 6px;
    }

    [dir="ltr"] .seller-list-title {
        margin-left: 10px;
    }

    [dir="ltr"] .seller-list-view-all {
        margin-right: 10px;
    }

    [dir="rtl"] .seller-list-view-all {
        margin-left: 12px;
    }

    [dir="rtl"] .seller-card {
        padding-left: 0 !important;
    }

    [dir="ltr"] .seller-card {
        padding-right: 0 !important;
    }

    [dir="ltr"] .category-product-view-title {
        margin-left: -12px;
    }

    [dir="rtl"] .category-product-view-title {
        margin-right: 10px;
    }

    [dir="rtl"] .category-product-view-all {
        margin-left: -20px;
    }

    [dir="ltr"] .category-product-view-all {
        margin-right: 0;
    }
}

.countdown-card {
    background: var(--web-primary-10);
}

.flash-deal-text {
    color: var(--web-primary);
}

.countdown-background {
    background: var(--web-primary);
}

.czi-arrow-left {
    color: var(--web-primary);
    background: var(--web-primary-10);
}

.czi-arrow-right {
    color: var(--web-primary);
    background: var(--web-primary-10);
}

.flash-deals-background-image {
    background: var(--web-primary-10);
}

.view-all-text {
    color: var(--web-secondary) !important;
}

.feature-product .czi-arrow-left {
    color: var(--web-primary);
    background: var(--web-primary-10);
}

.feature-product .czi-arrow-right {
    color: var(--web-primary);
    background: var(--web-primary-10);
    font-size: 12px;
}

/* تنسيقات البنر بعرض الصفحة الكامل */
.hero-banner-full-width {
    width: 100%;
    position: relative;
}

.hero-banner-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
}

/* تنسيقات التصنيفات للكمبيوتر - صفين */
.categories-grid-desktop {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    padding: 10px 0;
}

.category-item-desktop {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.category-item-desktop:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #fff;
}

.category-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.category-icon-wrapper img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.category-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

/* تنسيقات التصنيفات للجوال - ثلاثة صفوف */
.categories-grid-mobile {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    padding: 10px 0;
}

.category-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.category-icon-wrapper-mobile {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.category-icon-wrapper-mobile img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.category-name-mobile {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* تنسيقات متجاوبة للبنر */
@media (max-width: 768px) {
    .hero-banner-img {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .hero-banner-img {
        height: 280px;
    }
}

/* تنسيقات متجاوبة للتصنيفات */
@media (max-width: 576px) {
    .categories-grid-mobile {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 10px;
    }
    
    .category-item-mobile {
        padding: 8px;
    }
    
    .category-icon-wrapper-mobile {
        width: 45px;
        height: 45px;
    }
    
    .category-icon-wrapper-mobile img {
        width: 30px;
        height: 30px;
    }
    
    .category-name-mobile {
        font-size: 10px;
    }
}

/* تحسينات إضافية للبنر */
.hero-banner-full-width .owl-carousel .owl-item {
    height: auto;
}

.hero-banner-full-width .owl-carousel .owl-stage-outer {
    overflow: hidden;
}

/* إزالة الحواف والمسافات من البنر */
.hero-banner-full-width {
    margin: 0;
    padding: 0;
}

/* تحسين تجربة المستخدم للتصنيفات */
.category-item-desktop a,
.category-item-mobile a {
    text-decoration: none;
    color: inherit;
}

.category-item-desktop a:hover,
.category-item-mobile a:hover {
    text-decoration: none;
    color: inherit;
}

/* تحسين المظهر العام */
.categories-grid-desktop .category-item-desktop:nth-child(odd) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.categories-grid-desktop .category-item-desktop:nth-child(even) {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
}

/* تحسينات إضافية للتصنيفات */
@media (min-width: 1200px) {
    .categories-grid-desktop {
        gap: 25px;
        padding: 15px 0;
    }
    
    .category-item-desktop {
        padding: 20px;
    }
    
    .category-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .category-icon-wrapper img {
        width: 45px;
        height: 45px;
    }
    
    .category-name {
        font-size: 14px;
    }
}

/* تحسين التباعد بين الأقسام */
.hero-banner-full-width + .container {
    margin-top: 0;
}

/* إزالة المسافات الزائدة */
.bg-transparent.py-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* تحسين الانتقالات */
.category-item-desktop,
.category-item-mobile {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item-desktop:hover {
    transform: translateY(-8px) scale(1.02);
}

.category-item-mobile:active {
    transform: scale(0.95);
}

/* معالجة الصور المكسورة في البنر */
.hero-banner-img.placeholder-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-banner-img.placeholder-banner::before {
    content: "صورة البنر غير متوفرة";
    position: absolute;
    color: #6c757d;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

/* تحسين تحميل الصور */
.hero-banner-img {
    transition: opacity 0.3s ease;
}

.hero-banner-img[loading="lazy"] {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* معالجة الصور المكسورة في التصنيفات */
.category-icon-wrapper img,
.category-icon-wrapper-mobile img {
    transition: opacity 0.3s ease;
}

.category-icon-wrapper img[src*="placeholder"],
.category-icon-wrapper-mobile img[src*="placeholder"] {
    opacity: 0.7;
    filter: grayscale(20%);
}

/* تحسينات إضافية لمعالجة الصور المكسورة */
.hero-banner-img {
    background: #f8f9fa;
    min-height: 280px;
}

.hero-banner-img.placeholder-banner::after {
    content: "🖼️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0.3;
}

/* تحسين عرض الصور البديلة */
.category-icon-wrapper img[src*="placeholder"]::before,
.category-icon-wrapper-mobile img[src*="placeholder"]::before {
    content: "📁";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    opacity: 0.5;
}

/* تحسين الأداء والتحميل */
.hero-banner-img,
.category-icon-wrapper img,
.category-icon-wrapper-mobile img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* إضافة تأثير تحميل */
.hero-banner-img:not([src]),
.category-icon-wrapper img:not([src]),
.category-icon-wrapper-mobile img:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* تحسينات إضافية للبنر */
.banner-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.banner-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.banner-image-container img:not(.placeholder-banner) + .banner-loading-overlay {
    opacity: 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* تحسين عرض الصور البديلة للبنر */
.hero-banner-img.placeholder-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    position: relative;
    min-height: 300px;
}

.hero-banner-img.placeholder-banner::before {
    content: "🖼️ صورة البنر غير متوفرة";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    background: rgba(255,255,255,0.9);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* تحسين الروابط */
.banner-link {
    text-decoration: none;
    display: block;
    position: relative;
}

.banner-link:hover {
    text-decoration: none;
}

/* تأثير hover للبنر */
.banner-image-container:hover .hero-banner-img:not(.placeholder-banner) {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* تحسين الاستجابة للصور */
@media (max-width: 768px) {
    .hero-banner-img.placeholder-banner::before {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .loading-spinner {
        width: 30px;
        height: 30px;
        border-width: 3px;
    }
}

@media (max-width: 576px) {
    .hero-banner-img.placeholder-banner {
        min-height: 280px;
    }
    
    .hero-banner-img.placeholder-banner::before {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ===== تصميم التصنيفات الدائرية الكبيرة ===== */

/* شبكة التصنيفات للكمبيوتر - 6 في الصف */
.categories-grid-desktop {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 10px 0;
}

/* عنصر التصنيف للكمبيوتر */
.category-item-desktop {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.category-item-desktop:hover {
    transform: translateY(-5px);
}

/* حاوي الأيقونة الدائرية للكمبيوتر */
.category-icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid #fff;
    position: relative;
}

.category-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #28a745, #ffc107, #dc3545);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-item-desktop:hover .category-icon-wrapper::before {
    opacity: 1;
}

.category-item-desktop:hover .category-icon-wrapper {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* صورة التصنيف */
.category-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-item-desktop:hover .category-icon-wrapper img {
    transform: scale(1.1);
}

/* اسم التصنيف للكمبيوتر */
.category-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.category-item-desktop:hover .category-name {
    color: #007bff;
}

/* شبكة التصنيفات للجوال - 4 في الصف */
.categories-grid-mobile {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 10px 0;
}

/* عنصر التصنيف للجوال */
.category-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.category-item-mobile:hover {
    transform: translateY(-3px);
}

/* حاوي الأيقونة الدائرية للجوال */
.category-icon-wrapper-mobile {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #fff;
    position: relative;
}

.category-icon-wrapper-mobile::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #28a745, #ffc107, #dc3545);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-item-mobile:hover .category-icon-wrapper-mobile::before {
    opacity: 1;
}

.category-item-mobile:hover .category-icon-wrapper-mobile {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* صورة التصنيف للجوال */
.category-icon-wrapper-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-item-mobile:hover .category-icon-wrapper-mobile img {
    transform: scale(1.1);
}

/* اسم التصنيف للجوال */
.category-name-mobile {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
    transition: color 0.3s ease;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-item-mobile:hover .category-name-mobile {
    color: #007bff;
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .categories-grid-mobile {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .category-icon-wrapper-mobile {
        width: 70px;
        height: 70px;
    }
    
    .category-name-mobile {
        font-size: 11px;
        max-width: 70px;
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1400px) {
    .categories-grid-desktop {
        gap: 25px;
    }
    
    .category-icon-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .category-name {
        font-size: 18px;
    }
}

/* تأثيرات إضافية للتفاعل */
.category-item-desktop a,
.category-item-mobile a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.category-item-desktop a:hover,
.category-item-mobile a:hover {
    text-decoration: none;
    color: inherit;
}

/* تحسين عنوان قسم التصنيفات */
.categories-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

/* تأثير loading للصور */
.category-icon-wrapper img[src=""],
.category-icon-wrapper-mobile img[src=""] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
