/* ========================================
   متجر الخاوة - ملف التنسيقات الرئيسي
   ======================================== */

/* إعادة تعيين الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    padding-bottom: 80px; /* مساحة للشريط السفلي */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header - الرأسية
   ======================================== */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo i {
    font-size: 2.2rem;
    color: #ff6b35;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

.logo span {
    font-size: 2rem;
    color: #000000;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:hover i {
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 10px 40px 10px 15px;
    border: 2px solid #f0f0f0;
    border-radius: 25px;
    font-size: 0.95rem;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #999;
}

.cart-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
}

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

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #000000;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* ========================================
   Main Content - المحتوى الرئيسي
   ======================================== */
.main-content {
    padding: 30px 0 20px;
    min-height: calc(100vh - 200px);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 40px;
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.feature p {
    font-size: 1rem;
    margin: 0;
}

/* Products Section */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    color: #000000;
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
    border-color: #ff6b35;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 10px;
    background-color: #f9f9f9;
}

.product-info {
    text-align: center;
}

.product-name {
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 40px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.product-price {
    font-size: 1.4rem;
    color: #ff6b35;
    font-weight: bold;
}

.add-to-cart-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add-to-cart-btn:hover {
    background-color: #ff5722;
    transform: scale(1.05);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.loading i {
    font-size: 3rem;
    color: #ff6b35;
    margin-bottom: 15px;
}

.loading p {
    color: #666;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state p {
    color: #999;
    font-size: 1.2rem;
}

/* ========================================
   Bottom Navigation - الشريط السفلي
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 5px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 70px;
    flex: 1;
}

.nav-item i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background-color: #fff5f0;
}

.nav-item.active {
    color: #ff6b35;
    background-color: #fff5f0;
}

.nav-item.active i {
    transform: scale(1.1);
}

/* ========================================
   Modal - النافذة المنبثقة
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

.modal-header h2 {
    color: #000000;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #ff6b35;
    transform: rotate(90deg);
}

/* Cart Items */
.cart-items {
    padding: 20px;
    min-height: 200px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    color: #000000;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #ff6b35;
    font-size: 1rem;
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f0f0f0;
    border-radius: 25px;
    padding: 5px;
}

.quantity-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: #ff5722;
    transform: scale(1.1);
}

.quantity-value {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.remove-item-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    background-color: #cc0000;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
}

.empty-cart i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-cart p {
    color: #999;
    font-size: 1.1rem;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    position: sticky;
    bottom: 0;
    background-color: white;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.cart-total span:last-child {
    color: #ff6b35;
}

.checkout-btn {
    width: 100%;
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    background-color: #ff5722;
    transform: scale(1.02);
}

/* Checkout Form */
.checkout-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #000000;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.order-summary {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: #000000;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ff6b35;
}

.order-total span:last-child {
    color: #ff6b35;
}

.submit-btn {
    width: 100%;
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background-color: #ff5722;
    transform: scale(1.02);
}

/* Success Message */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 3000;
    transition: all 0.3s ease;
}

.success-message.show {
    transform: translate(-50%, -50%) scale(1);
}

.success-message i {
    font-size: 4rem;
    color: #4caf50;
    margin-bottom: 20px;
}

.success-message p {
    font-size: 1.2rem;
    color: #000000;
}

/* ========================================
   Responsive Design - التصميم المتجاوب
   ======================================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .search-box input {
        width: 100%;
    }

    .logo i {
        font-size: 1.8rem;
    }
    
    .logo span {
        font-size: 1.5rem;
    }

    .welcome-section h2 {
        font-size: 1.8rem;
    }

    .welcome-section p {
        font-size: 1rem;
    }

    .welcome-features {
        gap: 20px;
    }

    .feature i {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-card {
        padding: 15px;
    }

    .product-image {
        height: 150px;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-description {
        font-size: 0.85rem;
        min-height: 35px;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .add-to-cart-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .bottom-nav {
        padding: 5px 2px;
    }

    .nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }

    .nav-item i {
        font-size: 1.3rem;
    }

    .nav-item span {
        font-size: 0.65rem;
    }

    .modal-content {
        max-width: 95%;
        margin: 10px;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
    }

    .cart-item-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .nav-item span {
        font-size: 0.6rem;
    }
}