/* home.css — externalized from templates/index.html inline <style> (perf: browser-cacheable across pages) */
/* OneCard Products - تصميم محسن ومناسب للموبايل */
.recently-added-section {
    padding: 30px 15px;
    background-color: #222222;
    margin: 20px 0;
    position: relative;
}

/* .recently-added-section .section-title {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
} */

.recently-added-section .section-title::after {
    /* content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px; */
}

.onecard-products-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.onecard-products-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 30px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.onecard-products-wrapper::-webkit-scrollbar {
    display: none;
}

.onecard-product-card {
    flex: 0 0 23% !important;
    background: #111111;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    border: 2px solid transparent;
}

.onecard-product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    /* border-color: #007bff; */
}

.onecard-product-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #1a1a1a;
}

.onecard-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: brightness(1.05) contrast(1.05);
}

.onecard-product-image:hover img {
    transform: scale(1.1);
}
.fresh-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 3;
    background: linear-gradient(135deg, #872838, #a04258);
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fresh-badge i {
    font-size: 10px;
}

.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 3;
    font-size: 14px;
    text-align: center;
}

.out-of-stock-overlay i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #dc3545;
}

.onecard-product-info {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.onecard-product-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.4;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onecard-product-category {
    font-size: 12px;
    color: #6c757d;
    margin: 0 0 15px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onecard-price-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
}

.onecard-price {
    font-size: 16px;
    font-weight: 700;
    color: #f1f3f4;
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.1);
}

.onecard-provider {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
}

.onecard-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.onecard-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.4;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.onecard-product-category {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.onecard-price-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.onecard-price {
    font-size: 18px;
    font-weight: 700;
    color: #f1f3f4;
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.1);
}

.onecard-provider {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.onecard-product-actions {
    padding: 10px 15px 15px 15px;
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: space-around;
}

.onecard-btn {
    /* flex: 1; */
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 38px;
}

.onecard-btn i {
    font-size: 14px;
}

.onecard-btn-cart {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
}

.onecard-btn-cart:hover {
    background: linear-gradient(135deg, #b74058, #ff0040);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.onecard-btn-buy {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
}

.onecard-btn-buy:hover {
    background: linear-gradient(45deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.onecard-btn-view {
    background: linear-gradient(45deg, #6f42c1, #5a32a3);
    color: white;
}

.onecard-btn-view:hover {
    background: linear-gradient(45deg, #5a32a3, #4e2a8e);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.onecard-btn-unavailable {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.onecard-btn-login {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
    flex: 1;
}

.onecard-btn-login:hover {
    background: linear-gradient(135deg, #872838, #ff0040);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.onecard-scroll-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.scroll-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff1a4a 0%, #d9003d 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
        background: linear-gradient(135deg, #ff0b40 0%, #d9003d 100%);

}

.scroll-btn:active {
    transform: translateY(0);
}

/* تأثيرات متحركة */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* تصميم للموبايل */
@media (max-width: 768px) {
    .recently-added-section {
        padding: 30px 15px;
    }
    
    .onecard-product-card {
        flex: 0 0 250px;
        min-height: 380px;
    }
    
    .onecard-product-image {
        height: 160px;
    }
    
    .onecard-product-title {
        font-size: 15px;
        min-height: 40px;
    }
    
    .onecard-price {
        font-size: 16px;
    }
    
    .onecard-btn {
        padding: 8px;
        font-size: 11px;
        min-height: 35px;
    }
    
    .scroll-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .onecard-product-card {
        flex: 0 0 220px;
        min-height: 360px;
    }
    
    .onecard-product-image {
        height: 140px;
    }
    
    .onecard-product-info {
        padding: 12px;
    }
    
    .onecard-product-actions {
        padding: 8px 12px 12px 12px;
        gap: 6px;
    }
    
    .onecard-products-wrapper {
        gap: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* الأيقونات المتحركة للصفحة الرئيسية */
.home-page {
    position: relative;
    overflow: hidden;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    opacity: 0.7;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.floating-icon img {
    width: 100%;
    height: 100%;
    filter: brightness(2) contrast(1) invert(1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    transition: all 0.3s ease;
}

.floating-icon:hover img {
    filter: brightness(2.5) contrast(1.2) invert(1) drop-shadow(0 0 25px rgba(255, 255, 255, 0.8));
    transform: scale(1.2);
}

/* أحجام مختلفة للأيقونات */
.icon-small {
    width: 30px;
    height: 30px;
}

.icon-medium {
    width: 50px;
    height: 50px;
}

.icon-large {
    width: 70px;
    height: 70px;
}

/* حركات مختلفة للأيقونات */
.float-up {
    animation-name: floatUp;
}

.float-diagonal {
    animation-name: floatDiagonal;
}

.float-horizontal {
    animation-name: floatHorizontal;
}

.float-rotate {
    animation-name: floatRotate;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translateY(50vh) rotate(180deg);
        opacity: 0.9;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-50px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes floatDiagonal {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translate(50vw, 50vh) rotate(180deg);
        opacity: 0.9;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translate(100vw, -50px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes floatHorizontal {
    0% {
        transform: translateX(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translateX(50vw) rotate(180deg);
        opacity: 0.9;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(100vw) rotate(360deg);
        opacity: 0;
    }
}

@keyframes floatRotate {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    25% {
        transform: translate(25vw, 25vh) rotate(90deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(50vw, 50vh) rotate(180deg) scale(1.2);
        opacity: 1;
    }
    75% {
        transform: translate(75vw, 25vh) rotate(270deg) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(100vw, 0) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* النافذة المنبثقة لتفاصيل المنتج */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.product-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.product-modal .modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.product-modal .modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.product-modal .modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.product-modal .close-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal .close-btn:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

.product-modal .modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.product-modal .loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.product-modal .loading-spinner i {
    font-size: 30px;
    margin-bottom: 15px;
    color: #007bff;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.product-image-section img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-info-section h4 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.product-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 15px;
}

.product-meta {
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
}

.meta-item i {
    width: 20px;
    color: #007bff;
    margin-left: 10px;
}

.meta-item strong {
    color: #2c3e50;
    margin-left: 8px;
    min-width: 60px;
}

.status.available {
    color: #28a745;
    font-weight: bold;
}

.status.unavailable {
    color: #dc3545;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-cart {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.modal-btn-cart:hover {
    background: linear-gradient(45deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.modal-btn-buy {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
}

.modal-btn-buy:hover {
    background: linear-gradient(45deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.modal-btn-unavailable {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.error-message i {
    font-size: 40px;
    margin-bottom: 15px;
}

.error-details {
    color: #6c757d;
    margin-top: 10px;
    font-size: 14px;
}

/* تأثيرات الحركة */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تصميم للموبايل - النافذة المنبثقة */
@media (max-width: 768px) {
    .product-modal .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-modal .modal-header {
        padding: 15px 20px;
    }

    .product-modal .modal-header h3 {
        font-size: 18px;
    }

    .product-modal .modal-body {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-btn {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .product-modal .modal-content {
        width: 98%;
        max-height: 90vh;
    }

    .product-modal .modal-header {
        padding: 12px 15px;
    }

    .product-modal .modal-body {
        padding: 15px;
    }

    .product-info-section h4 {
        font-size: 20px;
    }

    .meta-item {
        font-size: 14px;
    }
}
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translate(-50vw, -50vh) rotate(180deg);
        opacity: 0.9;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(-100vw, -100vh) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes floatHorizontal {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        transform: translateX(50vw) rotate(90deg);
        opacity: 0.9;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(100vw) rotate(180deg);
        opacity: 0;
    }
}

@keyframes floatRotate {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    25% {
        transform: translate(-20vw, -20vh) rotate(90deg) scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: translate(-40vw, 0) rotate(180deg) scale(1);
        opacity: 0.9;
    }
    75% {
        transform: translate(-60vw, 20vh) rotate(270deg) scale(0.8);
        opacity: 0.7;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translate(-80vw, 40vh) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* التأكد من أن المحتوى في المقدمة */
.home-swiper,
.icon-slider {
    position: relative;
    z-index: 10;
}

/* تثبيت أبعاد كارت بطاقات الهدايا */
.gift-card {
    width: 180px;
    height: 240px;
    border-radius: 15px;
    overflow: hidden;
    background: #222;
    border: 2px solid #333;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gift-card:hover {
    transform: translateY(-5px);
    border-color: #872838;
    box-shadow: 0 10px 25px rgba(135, 40, 56, 0.3);
}

.gift-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
}

.gift-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.gift-card-info {
    padding: 12px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.gift-card-info h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* تحسين المظهر على الشاشات الصغيرة */
@media (max-width: 768px) {
    .gift-card {
        width: 100%;
        height: auto;
    }

    .gift-card-image {
        height: 230px;
    }

    .gift-card-info h4 {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .gift-card {
        width: 100%;
        height: auto;
    }

    .gift-card-image {
        height: 210px;
    }

    .gift-card-info {
        padding: 8px;
    }

    .gift-card-info h4 {
        font-size: 11px;
    }
}

/* تصميم بطاقات منتجات API */
.api-product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.api-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(135, 40, 56, 0.2);
}

.api-product-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
}

.api-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.fresh-badge, .new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.fresh-badge {
    background: linear-gradient(135deg, #872838, #a04258);
}

.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.api-product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #872838;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    background: #872838;
    color: #fff;
    transform: scale(1.1);
}

.api-product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.api-product-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.api-product-category {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.api-product-category i {
    margin-left: 5px;
    color: #872838;
}

.api-product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.api-product-price .price {
    font-size: 18px;
    font-weight: bold;
    color: #872838;
}

.api-product-price .provider {
    background: #f8f9fa;
    color: #666;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.api-product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.add-to-cart-btn, .buy-now-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.add-to-cart-btn {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
}

.add-to-cart-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.buy-now-btn {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
}

.buy-now-btn:hover {
    background: linear-gradient(135deg, #e6002e, #e62e5c);
    transform: translateY(-2px);
}

.out-of-stock-btn {
    width: 100%;
    padding: 10px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: not-allowed;
}

.login-required-btn {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    display: block;
    transition: all 0.3s ease;
}

.login-required-btn:hover {
    background: #0056b3;
    text-decoration: none;
    color: white;
}

/* تصميم النافذة المنبثقة */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.product-modal .modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.product-modal .modal-header {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.product-modal .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.product-modal .close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.product-modal .modal-body {
    padding: 20px;
}

.product-modal .product-info p {
    margin: 10px 0;
    color: #333;
}

.product-modal .product-info strong {
    color: #872838;
}

.product-modal .modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.product-modal .btn-primary, .product-modal .btn-secondary, .product-modal .btn-disabled {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-modal .btn-primary {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
}

.product-modal .btn-primary:hover {
    background: linear-gradient(135deg, #e6002e, #e62e5c);
}

.product-modal .btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
}

.product-modal .btn-secondary:hover {
    background: #e9ecef;
}

.product-modal .btn-disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
}

/* تصميم زر التحديث */
.refresh-products-btn {
    background: none;
    border: 2px solid #872838;
    color: #872838;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.refresh-products-btn:hover {
    background: #872838;
    color: white;
}

.refresh-products-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* تصميم responsive */
@media (max-width: 768px) {
    .api-product-card {
        min-height: 320px;
    }
    
    .api-product-image {
        height: 150px;
    }
    
    .api-product-content {
        padding: 15px;
    }
    
    .api-product-title {
        font-size: 14px;
    }
    
    .api-product-price .price {
        font-size: 16px;
    }
    
    .api-product-actions {
        flex-direction: column;
    }
    
    .product-modal .modal-content {
        width: 95%;
        margin: 20px;
    }

    .product-modal .modal-footer {
        flex-direction: column;
    }
}

/* زر الدعم الفني في صفحة الرئيسية */
.chat-support-btn {
    background: linear-gradient(135deg, #872838 0%, #5e1a26 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 3px 10px rgba(135, 40, 56, 0.3);
}

.chat-support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(135, 40, 56, 0.4);
    background: linear-gradient(135deg, #ff1a4a 0%, #d9003d 100%);
}

.chat-support-btn i {
    font-size: 14px;
}

/* تأثيرات للشاشات الصغيرة */
@media (max-width: 768px) {
    .chat-support-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .chat-support-btn i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .chat-support-btn {
        padding: 5px 10px;
        font-size: 10px;
    }
}

/* تصميم كارت المقالات */
.article-card {
    background: linear-gradient(145deg, #222 0%, #333 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: #872838;
    box-shadow: 0 10px 25px rgba(135, 40, 56, 0.3);
}

.article-link {
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(135, 40, 56, 0.1), rgba(135, 40, 56, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.article-overlay i {
    font-size: 30px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-excerpt {
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
    margin: 0 0 15px 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #444;
    padding-top: 10px;
    margin-top: auto;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-meta i {
    font-size: 11px;
    color: #872838;
}

/* تصميم سلايدر المقالات */
.articles-swiper-wrapper {
    padding: 20px 0;
    margin: 20px 0;
    display: grid;
    gap:10px;
    grid-template-columns: repeat(4,1fr);
}


.articles-swiper .custom-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.articles-swiper-prev,
.articles-swiper-next {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #872838 0%, #5e1a26 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    box-shadow: 0 4px 15px rgba(135, 40, 56, 0.3);
}

.articles-swiper-prev:hover,
.articles-swiper-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 40, 56, 0.4);
    background: linear-gradient(135deg, #ff1a4a 0%, #d9003d 100%);
}

.articles-swiper-prev i,
.articles-swiper-next i {
    font-size: 18px;
}

/* تحسينات للشاشات الصغيرة */

@media (max-width:900px){
      .articles-swiper-wrapper {
    padding: 20px 0;
    margin: 20px 0;
    display: grid;
    gap:10px;
    grid-template-columns: repeat(2,1fr);
}
}
@media (max-width: 768px) {
    .article-image {
        height: 150px;
    }
    
    .article-content {
        padding: 15px;
    }
    
    .article-title {
        font-size: 12px;
    }
    
    .article-excerpt {
        font-size: 13px;
    }
    
    .article-meta {
        font-size: 11px;
    }
    
    .articles-swiper-prev,
    .articles-swiper-next {
        width: 40px;
        height: 40px;
    }
    
    .articles-swiper-prev i,
    .articles-swiper-next i {
        font-size: 14px;
    }
}
@media (max-width: 480px) {
    .articles-swiper-wrapper {
        grid-template-columns: 1fr;
    }
    .article-image {
        height: 120px;
    }
    
    .article-content {
        padding: 12px;
    }
    
    .article-title {
        font-size: 13px;
    }
    
    .article-excerpt {
        font-size: 12px;
    }
    
    .article-meta {
        font-size: 10px;
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .article-overlay i {
        font-size: 24px;
    }
    
    .articles-swiper {
        padding: 10px 0;
        margin: 10px 0;
    }
    
    .articles-swiper .custom-navigation {
        gap: 10px;
        margin-top: 20px;
    }
    
    .articles-swiper-prev,
    .articles-swiper-next {
        width: 35px;
        height: 35px;
    }
    
    .articles-swiper-prev i,
    .articles-swiper-next i {
        font-size: 12px;
    }
}

/* تصميم سلايدر المنتجات المضافة حديثاً */
.recently-added, .recently-added-section {
    padding: 30px 20px;
    margin: 30px 0;
    border-radius: 10px;
}

.recently-added .section-title, .recently-added-section .section-title {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.recently-added-swiper {
    overflow: hidden;
    padding: 10px 0;
}

/* تصميم منتجات OneCard ليتطابق مع باقي الصفحة */
.onecard-product {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 15px;
}

.onecard-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.onecard-product img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.onecard-product:hover img {
    transform: scale(1.05);
}

.fresh-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.out-of-stock-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.onecard-bottom-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.onecard-bottom-text h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.onecard-bottom-text p {
    color: #ccc;
    font-size: 12px;
    margin: 0 0 8px 0;
}

.onecard-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.onecard-price-box .price {
    color: #872838;
    font-size: 16px;
    font-weight: bold;
}

.onecard-price-box .provider {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.onecard-actions {
    display: flex;
    gap: 8px;
}

.cart-action-btn, .quick-buy-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cart-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cart-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.quick-buy-btn {
    background: linear-gradient(135deg, #872838, #a04258);
    color: white;
}

.quick-buy-btn:hover {
    background: linear-gradient(135deg, #e6002e, #e62e5c);
    transform: translateY(-2px);
}

.unavailable-btn {
    width: 100%;
    background: rgba(108, 117, 125, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.auth-required-btn {
    width: 100%;
    background: rgba(0, 123, 255, 0.8);
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.auth-required-btn:hover {
    background: rgba(0, 123, 255, 1);
    color: white;
    text-decoration: none;
}

.api-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    height: 300px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.api-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.api-product-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #1a1a1a;
}

.api-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc3545;
    color: white;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.out-of-stock-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #6c757d;
    color: white;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.api-product-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.api-product-title {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.api-product-category {
    color: #666;
    font-size: 11px;
    margin: 0 0 8px 0;
}

.api-product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.api-product-price .price {
    color: #dc3545;
    font-size: 16px;
    font-weight: 700;
}

.api-product-price .provider {
    background: #e9ecef;
    color: #666;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 500;
}

.api-product-actions {
    margin-top: auto;
}

.add-to-cart-btn {
    width: 100%;
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.add-to-cart-btn:hover {
    background: #c82333;
}

.buy-now-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
}

.buy-now-btn:hover {
    background: #218838;
}

.out-of-stock-btn {
    width: 100%;
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.login-required-btn {
    width: 100%;
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.login-required-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .recently-added {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .api-product-card {
        height: 280px;
    }
    
    .api-product-image {
        height: 140px;
    }
}
    
    .recently-added .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .recently-added .section-title {
        font-size: 22px;
        justify-content: center;
    }
    
    .refresh-products-btn {
        padding: 8px 12px;
        font-size: 12px;
        align-self: center;
    }
    
    .api-product-card {
        height: 350px;
    }
    
    .api-product-image {
        height: 160px;
    }
    
    .api-product-title {
        font-size: 14px;
    }
    
    .api-product-price .price {
        font-size: 16px;
    }
    
    .add-to-cart-btn,
    .out-of-stock-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .recently-next,
    .recently-prev {
        width: 40px;
        height: 40px;
    }
    
    .recently-next::after,
    .recently-prev::after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .recently-added {
        padding: 15px 10px;
        margin: 15px 0;
        border-radius: 10px;
    }
    
    .recently-added .section-title {
        font-size: 18px;
    }
    
    .refresh-products-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .api-product-card {
        height: 320px;
    }
    
    .api-product-image {
        height: 140px;
    }
    
    .api-product-content {
        padding: 12px;
    }
    
    .api-product-title {
        font-size: 13px;
    }
    
    .api-product-category {
        font-size: 11px;
    }
    
    .api-product-price .price {
        font-size: 14px;
    }
    
    .add-to-cart-btn,
    .out-of-stock-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .quick-view-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .recently-next,
    .recently-prev {
        width: 35px;
        height: 35px;
        display: none; /* إخفاء الأسهم في الشاشات الصغيرة جداً */
    }
    
    .more-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* تصميم النافذة المنبثقة لتفاصيل المنتجات */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.product-modal .modal-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, #222, #333);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid #444;
}

.product-modal .modal-header {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px 55px 16px 20px;
    border-bottom: 2px solid #444;
    background: linear-gradient(135deg, #872838, #5e1a26);
}

.product-modal .modal-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.product-modal .close-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.product-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.product-modal .modal-body {
    padding: 20px;
}

.product-modal .loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #ccc;
}

.product-modal .loading-spinner i {
    font-size: 30px;
    color: #872838;
    margin-bottom: 15px;
}

.product-modal .loading-spinner p {
    margin: 0;
    font-size: 14px;
}

.product-details {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.product-modal .product-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    background: #444;
}

.product-modal .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-modal .product-info {
    flex: 1;
}

.product-modal .product-info h4 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.product-modal .product-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.product-modal .product-meta {
    margin-bottom: 20px;
}

.product-modal .meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #444;
    font-size: 14px;
}

.product-modal .meta-item:last-child {
    border-bottom: none;
}

.product-modal .meta-item strong {
    color: #fff;
}

.product-modal .meta-item span {
    color: #ccc;
}

.product-modal .status.available {
    color: #28a745;
    font-weight: 600;
}

.product-modal .status.unavailable {
    color: #dc3545;
    font-weight: 600;
}

.modal-add-to-cart {
    width: 100%;
    background: linear-gradient(135deg, #872838 0%, #5e1a26 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
}

.modal-add-to-cart:hover {
    background: linear-gradient(135deg, #ff1a4a 0%, #d9003d 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(135, 40, 56, 0.4);
}

.modal-out-of-stock {
    width: 100%;
    background: #666;
    color: #ccc;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
}

.product-modal .error-message {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.product-modal .error-message i {
    font-size: 30px;
    margin-bottom: 15px;
}

.product-modal .error-message p {
    margin: 5px 0;
    font-size: 14px;
}

.product-modal .error-details {
    color: #999 !important;
    font-size: 12px !important;
}

/* تحسينات للشاشات الصغيرة للنافذة المنبثقة */
@media (max-width: 768px) {
    .product-modal {
        padding: 10px;
    }

    .product-modal .modal-content {
        max-height: 90vh;
    }

    .product-modal .modal-header {
        padding: 15px;
    }

    .product-modal .modal-header h3 {
        font-size: 16px;
    }

    .product-modal .modal-body {
        padding: 15px;
    }

    .product-modal .product-details {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .product-modal .product-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .product-modal .product-info h4 {
        font-size: 18px;
    }

    .product-modal .meta-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* تحسينات responsive للمنتجات الجديدة من OneCard */
@media (max-width: 768px) {
    .recently-added-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .recently-added-section .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .onecard-product img {
        height: 150px;
    }
    
    .onecard-bottom-text {
        padding: 15px;
    }
    
    .onecard-bottom-text h4 {
        font-size: 14px;
    }
    
    .onecard-price-box .price {
        font-size: 14px;
    }
    
    .cart-action-btn, .quick-buy-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .recently-added-section {
        padding: 15px 10px;
        margin: 15px 0;
    }
    
    .recently-added-section .section-title {
        font-size: 18px;
    }
    
    .onecard-product img {
        height: 120px;
    }
    
    .onecard-bottom-text {
        padding: 12px;
    }
    
    .onecard-bottom-text h4 {
        font-size: 13px;
    }
    
    .onecard-bottom-text p {
        font-size: 11px;
    }
    
    .onecard-price-box .price {
        font-size: 13px;
    }
    
    .onecard-price-box .provider {
        font-size: 9px;
    }
    
    .onecard-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .cart-action-btn, .quick-buy-btn, .unavailable-btn, .auth-required-btn {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .fresh-badge, .out-of-stock-overlay {
        font-size: 10px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .product-modal {
        padding: 5px;
    }

    .product-modal .modal-header {
        padding: 12px;
    }

    .product-modal .modal-header h3 {
        font-size: 14px;
    }

    .product-modal .close-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .product-modal .modal-body {
        padding: 12px;
    }

    .product-modal .product-image {
        width: 100px;
        height: 100px;
    }

    .product-modal .product-info h4 {
        font-size: 16px;
    }

    .product-modal .product-description {
        font-size: 13px;
    }

    .product-modal .meta-item {
        font-size: 12px;
    }

    .product-modal .modal-add-to-cart,
    .product-modal .modal-out-of-stock {
        padding: 10px 15px;
        font-size: 12px;
    }
}
    align-items: center;
    margin-bottom: 15px;
}

.api-product-price .price {
    color: #872838;
    font-size: 18px;
    font-weight: 700;
}

.api-product-price .provider {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
}

.api-product-actions {
    margin-top: auto;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #872838 0%, #5e1a26 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Cairo', sans-serif;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(135, 40, 56, 0.4);
    background: linear-gradient(135deg, #ff1a4a 0%, #d9003d 100%);
}

.out-of-stock-btn {
    width: 100%;
    background: #666;
    color: #ccc;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Cairo', sans-serif;
}

/* تحسينات للشاشات الصغيرة للمنتجات المضافة حديثاً */
@media (max-width: 768px) {
    .recently-added {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .recently-added .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .api-product-card {
        height: 320px;
    }
    
    .api-product-image {
        height: 150px;
    }
    
    .api-product-title {
        font-size: 14px;
    }
    
    .api-product-price .price {
        font-size: 16px;
    }
    
    .add-to-cart-btn,
    .out-of-stock-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .recently-added {
        padding: 15px 10px;
        margin: 15px 0;
    }
    
    .recently-added .section-title {
        font-size: 18px;
    }
    
    .api-product-card {
        height: 280px;
    }
    
    .api-product-image {
        height: 120px;
    }
    
    .api-product-content {
        padding: 12px;
    }
    
    .api-product-title {
        font-size: 13px;
    }
    
    .api-product-category {
        font-size: 11px;
    }
    
    .api-product-price .price {
        font-size: 14px;
    }
    
    .api-product-price .provider {
        font-size: 9px;
    }
    
    .new-badge,
    .out-of-stock-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* تصميم سلايدر العروض المحدودة */
.limited-offers-swiper {
    /* overflow: hidden; */
    padding: 20px 0;
    margin: 20px 0;
}

.limited-offers-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.limited-offers-swiper .limited-offers-item {
    width: 100%;
    height: 100%;
}

.limited-offers-swiper .custom-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.limited-offers-swiper-prev,
.limited-offers-swiper-next {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #872838 0%, #5e1a26 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    box-shadow: 0 4px 15px rgba(135, 40, 56, 0.3);
}

.limited-offers-swiper-prev:hover,
.limited-offers-swiper-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 40, 56, 0.4);
    background: linear-gradient(135deg, #ff1a4a 0%, #d9003d 100%);
}

.limited-offers-swiper-prev i,
.limited-offers-swiper-next i {
    font-size: 18px;
}

/* تحسينات للشاشات الصغيرة للعروض المحدودة */
@media (max-width: 768px) {
    .limited-offers-swiper-prev,
    .limited-offers-swiper-next {
        width: 40px;
        height: 40px;
    }
    
    .limited-offers-swiper-prev i,
    .limited-offers-swiper-next i {
        font-size: 14px;
    }
    
    .limited-offers-swiper .limited-offers-item img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .limited-offers-swiper {
        padding: 10px 0;
        margin: 10px 0;
    }
    
    .limited-offers-swiper .custom-navigation {
        gap: 10px;
        margin-top: 20px;
    }
    
    .limited-offers-swiper-prev,
    .limited-offers-swiper-next {
        width: 35px;
        height: 35px;
    }
    
    .limited-offers-swiper-prev i,
    .limited-offers-swiper-next i {
        font-size: 12px;
    }
    
    .limited-offers-swiper .limited-offers-item img {
        height: 180px;
    }
    
    .limited-offers-swiper .limited-bottom-text {
        padding: 20px 15px 15px;
    }
    
    .limited-offers-swiper .limited-bottom-text h4 {
        font-size: 14px;
    }
    
    .limited-offers-swiper .limited-bottom-text p {
        font-size: 12px;
    }
}
.onecard-products-wrapper {
    overflow-x: auto;
    scroll-behavior: smooth;
  }

  .onecard-product-card {
    min-width: 250px; /* أو حسب عرض البطاقة الفعلي */
    flex: 0 0 auto;
    margin-left: 10px;
    margin-right: 10px;
  }
