/* 🎨 Product Modal - Clean Simple Design v3.3 - 2026-03-01 */
/* ✅ FIXED: option-details now ROW not COLUMN - name and price side by side */
/* ✅ FORCED: All !important added to prevent wrapping on mobile */
/* تصميم بسيط ونظيف يطابق الصورة المرجعية */

/* Modal Popup */
.product-modal-popup {
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
}

.product-modal-html-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* Close Button */
.product-modal-close {
    width: 36px !important;
    height: 36px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    transition: all 0.3s !important;
    top: 15px !important;
    left: 15px !important;
}

.product-modal-close:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: rotate(90deg) !important;
}

/* Container */
.product-modal-container {
    padding: 25px;
    text-align: center;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    max-height: 85vh;
    overflow-y: auto;
}

/* Product Name */
.product-name {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Product Image */
.product-image-wrapper {
    width: fit-content;
    max-width: 400px;
    margin: 0 auto 20px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f9fafb;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

/* Short Description */
.product-short-desc {
    color: #666;
    font-size: 0.95em;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

/* Product ID Badge */
.product-id-badge {
    display: inline-block;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.price-original {
    font-size: 1.1em;
    color: #999;
    text-decoration: line-through;
}

.price-final {
    font-size: 2em;
    font-weight: 700;
    color: #10b981;
}

/* Section Headers */
.section-headers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 5px;
}

.section-header {
    font-size: 0.95em;
    font-weight: 600;
    color: #10b981;
}

/* Quantity and Buy Row */
.quantity-and-buy-row {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    align-items: stretch;
}

/* Quantity Controls */
.quantity-controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border: 2px solid #10b981;
    border-radius: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.qty-minus {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.qty-plus {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.qty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.qty-display {
    font-size: 1.4em;
    font-weight: 700;
    min-width: 35px;
    text-align: center;
    color: #333;
    transition: all 0.2s;
    flex-shrink: 0;
}

/* Buy Button */
.btn-buy-product {
    flex: 1;
    padding: 12px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-buy-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

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

.btn-buy-product svg {
    flex-shrink: 0;
}

.btn-buy-product span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Payment Info Box */
.payment-info-box {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #e5e7eb;
    text-align: right;
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.payment-title {
    font-size: 1em;
    font-weight: 700;
    color: #333;
}

.payment-method {
    font-size: 1em;
    font-weight: 700;
    color: #10b981;
}

.payment-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
    font-size: 0.95em;
}

.action-btn-icon {
    flex: 0 0 auto;
    padding: 12px 18px;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

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

/* Policy Buttons */
.policy-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.policy-btn {
    flex: 1;
    min-width: 110px;
    padding: 10px 8px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
    font-size: 0.85em;
}

.policy-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Product Details Box */
.product-details-box {
    background: white;
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    text-align: right;
    margin-bottom: 15px;
}

.details-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
}

.details-content {
    color: #555;
    line-height: 1.8;
    white-space: normal;
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
    font-size: 0.95em;
    text-align: right;
}

/* Scrollbar */
.product-modal-container::-webkit-scrollbar {
    width: 6px;
}

.product-modal-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.product-modal-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.product-modal-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .product-modal-popup {
        width: 95% !important;
        max-width: 450px !important;
        margin: 10px auto !important;
    }
    
    .product-modal-container {
        padding: 18px;
    }
    
    .product-name {
        font-size: 1.25em;
    }
    
    .product-image-wrapper {
        width: fit-content;
        max-width: 100%;
        background: #f9fafb;
    }
    
    .product-image {
        max-width: 100%;
        max-height: 300px;
    }
    
    .price-final {
        font-size: 1.7em;
    }
    
    .section-header {
        font-size: 0.9em;
    }
    
    .quantity-and-buy-row {
        gap: 10px;
    }
    
    .quantity-controls {
        padding: 8px 14px;
        gap: 8px;
    }
    
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .qty-display {
        font-size: 1.3em;
        min-width: 32px;
    }
    
    .btn-buy-product {
        font-size: 0.95em;
        padding: 10px 14px;
        gap: 5px;
    }
    
    .btn-buy-product svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .product-modal-popup {
        width: 98% !important;
    }
    
    .product-modal-container {
        padding: 15px;
    }
    
    .product-name {
        font-size: 1.15em;
    }
    
    .product-image-wrapper {
        width: fit-content;
        max-width: 100%;
        background: #f9fafb;
    }
    
    .product-image {
        max-width: 100%;
        max-height: 280px;
    }
    
    .price-final {
        font-size: 1.5em;
    }
    
    .section-headers {
        margin-bottom: 8px;
    }
    
    .section-header {
        font-size: 0.85em;
    }
    
    .quantity-and-buy-row {
        gap: 8px;
    }
    
    .quantity-controls {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .qty-display {
        font-size: 1.2em;
        min-width: 30px;
    }
    
    .btn-buy-product {
        font-size: 0.9em;
        padding: 10px 12px;
        gap: 4px;
    }
    
    .btn-buy-product svg {
        width: 16px;
        height: 16px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .action-btn {
        font-size: 0.85em;
        padding: 10px;
    }
    
    .policy-btn {
        font-size: 0.75em;
        min-width: 95px;
        padding: 9px 6px;
    }
}


/* 🛒 Cart Modal Styles */

/* ✅ منع scroll على container الرئيسي */
.swal2-container {
    overflow-y: auto !important;
}

.cart-modal-popup {
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
}

.cart-modal-html-container {
    padding: 0 !important;
    margin: 0 !important;
}

.cart-modal-close {
    width: 36px !important;
    height: 36px !important;
    background: rgba(239, 68, 68, 0.9) !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    transition: all 0.3s !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 10 !important;
}

.cart-modal-close:hover {
    background: rgba(220, 38, 38, 1) !important;
    transform: rotate(90deg) !important;
}

.cart-modal-container {
    padding: 25px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    max-height: 85vh;
    overflow-y: auto;
}

/* Success Message */
.cart-success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    color: #065f46;
    font-weight: 600;
    font-size: 1em;
}

.cart-success-message svg {
    flex-shrink: 0;
    stroke: #059669;
}

/* Cart Title */
.cart-modal-title {
    font-size: 1.6em;
    font-weight: 700;
    color: white;
    background: #1f2937;
    padding: 16px;
    margin: 0 -25px 20px -25px;
    text-align: center;
}

/* Cart Items List */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* ✅ NEW: Cart Item Row - تصميم جديد بسطرين */
.cart-item-row-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.cart-item-row-new:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

/* السطر الأول: الصورة + الاسم + الرقم */
.cart-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-image-new {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: zoom-in;
    transition: all 0.3s;
    border: 2px solid #e5e7eb;
}

.cart-item-image-new:hover {
    transform: scale(1.05);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.cart-item-info-new {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name-new {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.cart-item-number-new {
    display: inline-block;
    font-size: 0.8em;
    color: #6b7280;
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    width: fit-content;
}

/* السطر الثاني: أزرار الكمية + السعر في الوسط + فارغ */
.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: nowrap !important;
    gap: 8px;
}

.cart-item-price-new {
    font-size: 1.2em;
    font-weight: 700;
    color: #10b981;
    white-space: nowrap;
    flex-shrink: 0;
}

.cart-qty-controls-new {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    background: white;
    padding: 4px 8px;
    border-radius: 25px;
    border: 2px solid #e5e7eb;
    flex-shrink: 0 !important;
}

.cart-qty-btn-new {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    border: none !important;
    color: white !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s;
    flex-shrink: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    aspect-ratio: 1 / 1 !important;
    line-height: 1 !important;
}

.cart-qty-minus-new {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.cart-qty-plus-new {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.cart-qty-btn-new:hover {
    transform: scale(1.1);
}

.cart-qty-btn-new:active {
    transform: scale(0.95);
}

.cart-qty-display-new {
    font-size: 1.1em;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
    color: #1f2937;
}

/* OLD Cart Item Row - keep for compatibility */
.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 12px;
    gap: 15px;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cart-item-name {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-number {
    font-size: 0.85em;
    color: #6b7280;
}

.cart-item-price {
    font-size: 0.95em;
    font-weight: 700;
    color: #10b981;
}

/* Cart Item Actions */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #6b7280;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-qty-btn:hover {
    background: #4b5563;
    transform: scale(1.05);
}

.cart-qty-display {
    font-size: 1.1em;
    font-weight: 700;
    min-width: 25px;
    text-align: center;
    color: #333;
}

.cart-delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-delete-btn:hover {
    background: #fecaca;
    transform: scale(1.05);
}

/* Cart Total Section */
.cart-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 12px;
    margin-bottom: 20px;
}

.cart-clear-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ef4444;
    border-radius: 8px;
    color: #ef4444;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
}

.cart-clear-btn:hover {
    background: #ef4444;
    color: white;
}

.cart-total-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.cart-total-label {
    font-size: 0.95em;
    color: #6b7280;
    font-weight: 600;
}

.cart-total-price {
    font-size: 1.4em;
    font-weight: 700;
    color: #10b981;
}

/* Cart Action Buttons */
.cart-action-buttons {
    display: flex;
    gap: 12px;
}

.cart-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cart-btn-secondary {
    background: #1f2937;
    color: white;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.3);
}

.cart-btn-secondary:hover {
    background: #111827;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 41, 55, 0.4);
}

.cart-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cart-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Scrollbar for Cart Items */
.cart-items-list::-webkit-scrollbar {
    width: 6px;
}

.cart-items-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.cart-items-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive - Cart Modal */
@media (max-width: 768px) {
    .cart-modal-popup {
        width: 95% !important;
        max-width: 500px !important;
    }
    
    .cart-modal-container {
        padding: 20px;
    }
    
    .cart-modal-title {
        font-size: 1.4em;
        margin: 0 -20px 15px -20px;
    }
    
    .cart-success-message {
        font-size: 0.95em;
        padding: 14px;
    }
    
    /* ✅ NEW: تصميم السطرين للموبايل */
    .cart-item-row-new {
        padding: 10px;
        gap: 8px;
    }
    
    .cart-item-header {
        gap: 8px;
    }
    
    .cart-item-footer {
        flex-wrap: nowrap !important;
        gap: 6px;
        padding-top: 6px;
    }
    
    .cart-item-image-new {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-name-new {
        font-size: 0.9em;
    }
    
    .cart-item-number-new {
        font-size: 0.75em;
    }
    
    .cart-item-price-new {
        font-size: 1em;
    }
    
    .cart-qty-controls-new {
        gap: 6px;
        padding: 3px 6px;
    }
    
    .cart-qty-btn-new {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
        font-size: 16px;
    }
    
    .cart-qty-display-new {
        font-size: 0.95em;
        min-width: 22px;
    }
    
    /* OLD styles */
    .cart-item-row {
        padding: 12px;
        gap: 10px;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-name {
        font-size: 0.95em;
    }
    
    .cart-total-section {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .cart-total-info {
        align-items: center;
    }
    
    .cart-action-buttons {
        flex-direction: column;
    }
    
    .cart-btn {
        width: 100%;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .cart-modal-popup {
        width: 98% !important;
    }
    
    .cart-modal-container {
        padding: 15px;
    }
    
    .cart-modal-title {
        font-size: 1.3em;
        margin: 0 -15px 15px -15px;
        padding: 14px;
    }
    
    .cart-success-message {
        font-size: 0.9em;
        padding: 12px;
        gap: 8px;
    }
    
    /* ✅ NEW: تصميم السطرين للموبايل الصغير */
    .cart-item-row-new {
        padding: 8px;
        gap: 6px;
    }
    
    .cart-item-header {
        gap: 6px;
    }
    
    .cart-item-footer {
        flex-wrap: nowrap !important;
        gap: 4px;
        padding-top: 5px;
    }
    
    .cart-item-image-new {
        width: 45px;
        height: 45px;
    }
    
    .cart-item-name-new {
        font-size: 0.8em;
    }
    
    .cart-item-number-new {
        font-size: 0.65em;
        padding: 1px 6px;
    }
    
    .cart-item-price-new {
        font-size: 0.9em;
    }
    
    .cart-qty-controls-new {
        gap: 4px;
        padding: 2px 5px;
    }
    
    .cart-qty-btn-new {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        font-size: 14px;
    }
    
    .cart-qty-display-new {
        font-size: 0.85em;
        min-width: 18px;
    }
    
    /* OLD styles */
    .cart-item-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-info {
        width: 100%;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .cart-btn {
        font-size: 0.9em;
        padding: 12px 16px;
    }
}


/* 🎯 تحسينات عرض عناصر السلة في الـ Modal - سطر واحد للموبايل (بدون صورة) */
@media (max-width: 768px) {
    .cart-item-row {
        flex-direction: row !important;
        align-items: center !important;
        padding: 10px !important;
        gap: 8px !important;
    }
    
    .cart-item-row h4 {
        font-size: 0.9em !important;
    }
    
    .cart-item-row .cart-qty-controls {
        padding: 4px 8px !important;
        gap: 6px !important;
    }
    
    .cart-item-row .cart-qty-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 14px !important;
    }
    
    .cart-item-row .cart-qty-display {
        font-size: 1em !important;
        min-width: 22px !important;
    }
    
    .cart-item-row span[style*="font-size: 1em"] {
        font-size: 0.9em !important;
    }
}

@media (max-width: 480px) {
    .cart-item-row {
        padding: 8px !important;
        gap: 6px !important;
    }
    
    .cart-item-row h4 {
        font-size: 0.85em !important;
    }
    
    .cart-item-row .cart-qty-controls {
        padding: 3px 6px !important;
        gap: 4px !important;
    }
    
    .cart-item-row .cart-qty-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 13px !important;
    }
    
    .cart-item-row .cart-qty-display {
        font-size: 0.95em !important;
        min-width: 20px !important;
    }
    
    .cart-item-row span[style*="font-size: 1em"] {
        font-size: 0.85em !important;
    }
}



/* ========================================
   Product Options Styles
   تصميم خيارات المنتجات للعملاء
   ======================================== */

.product-options-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.option-group {
    margin-bottom: 25px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.option-group-title span {
    margin-right: 4px;
}

.option-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.option-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-item::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ced4da;
    border-radius: 50%; /* افتراضي: دائري للـ radio */
    flex-shrink: 0;
    transition: all 0.3s;
}

/* ✅ تغيير الشكل للـ checkbox - استخدام attribute selector */
.option-item:has(input[type="checkbox"])::before {
    border-radius: 4px; /* مربع للـ checkbox */
}

.option-item.selected::before {
    border-color: #667eea;
    background: #667eea;
    box-shadow: inset 0 0 0 3px white;
}

.option-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    flex-shrink: 0;
    cursor: zoom-in;
    transition: all 0.3s ease;
    position: relative;
}

.option-image:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.option-details {
    flex: 1;
    min-width: 0;
}

.option-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.option-price {
    display: block;
    font-size: 1rem;
    color: #28a745;
    font-weight: 600;
}

/* Responsive للموبايل */
@media (max-width: 768px) {
    .product-options-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .option-items {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .option-group-title {
        font-size: 1.2rem;
    }
    
    .option-item {
        padding: 12px;
    }
    
    .option-image {
        width: 45px;
        height: 45px;
    }
    
    .option-name {
        font-size: 1.05rem;
    }
    
    .option-price {
        font-size: 0.95rem;
    }
}

/* Animation */
@keyframes optionSelect {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.option-item.selected {
    animation: optionSelect 0.3s ease-out;
}


/* ========================================
   Fullscreen Image Modal
   نافذة عرض الصورة بحجم كامل
   ======================================== */

.image-fullscreen-popup {
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    overflow: hidden !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
}

.image-fullscreen-container {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.image-fullscreen-close {
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    transition: all 0.3s !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.image-fullscreen-close:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: rotate(90deg) scale(1.1) !important;
}

/* Responsive للموبايل */
@media (max-width: 768px) {
    .image-fullscreen-popup {
        width: 100% !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .image-fullscreen-close {
        width: 36px !important;
        height: 36px !important;
        font-size: 20px !important;
        top: 10px !important;
        left: 10px !important;
    }
}

/* ✅ Option Quantity Controls - أزرار الكمية للخيارات */
.option-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    transition: all 0.3s !important;
}

.option-item.selected {
    border-color: #667eea !important;
    background: #f8f9ff !important;
}

.option-main-content {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.option-details {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.option-name {
    font-size: 0.95em !important;
    font-weight: 600 !important;
    color: #333 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 1 auto !important;
}

.option-price {
    font-size: 0.85em !important;
    color: #667eea !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex: 0 0 60px !important;
    text-align: center !important;
}

.option-quantity-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}

.option-qty-btn {
    width: 32px !important;
    height: 32px !important;
    border: 2px solid #667eea !important;
    background: white !important;
    color: #667eea !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.option-qty-btn:hover {
    background: #667eea !important;
    color: white !important;
    transform: scale(1.1) !important;
}

.option-qty-btn:active {
    transform: scale(0.95) !important;
}

.option-qty-btn:disabled {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.option-qty-btn:disabled:hover {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    transform: none !important;
}

.option-qty-display {
    font-size: 1.1em !important;
    font-weight: 700 !important;
    color: #333 !important;
    min-width: 28px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

/* Mobile responsive - ✅ كل خيار على سطر واحد بدون التفاف - FORCED */
@media (max-width: 768px) {
    .option-item {
        gap: 8px !important;
        padding: 10px !important;
    }
    
    .option-main-content {
        gap: 8px !important;
    }
    
    .option-details {
        gap: 6px !important;
    }
    
    .option-name {
        font-size: 0.9em !important;
    }
    
    .option-price {
        font-size: 0.8em !important;
        flex: 0 0 60px !important;
    }
    
    .option-quantity-controls {
        gap: 6px !important;
    }
    
    .option-qty-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
    }
    
    .option-qty-display {
        font-size: 1em !important;
        min-width: 24px !important;
    }
}

@media (max-width: 480px) {
    .option-item {
        gap: 6px !important;
        padding: 8px !important;
    }
    
    .option-main-content {
        gap: 6px !important;
    }
    
    .option-details {
        gap: 4px !important;
    }
    
    .option-name {
        font-size: 0.85em !important;
    }
    
    .option-price {
        font-size: 0.75em !important;
        flex: 0 0 55px !important;
    }
    
    .option-quantity-controls {
        gap: 5px !important;
    }
    
    .option-qty-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 14px !important;
    }
    
    .option-qty-display {
        font-size: 0.95em !important;
        min-width: 22px !important;
    }
}
