/* تهيئة عامة وتصفير الهوامش لراحة العين */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: linear-gradient(135deg, #fff5f6 0%, #fffbfb 100%);
    color: #4a4a4a;
}

/* هيدر المتجر الأنيق والثابت في الأعلى */
.store-header {
    background: linear-gradient(45deg, #ff758c, #ff7eb3);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(255, 117, 140, 0.2);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-icon-box {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.25);
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.cart-icon-box:hover {
    background: white;
    color: #ff758c;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* شبكة توزيع المنتجات بشكل متناسق وتلقائي */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* تصميم كروت المنتجات المخملية والجذابة للفتيات */
.product-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(255, 182, 193, 0.2);
    border: 1px solid rgba(255, 182, 193, 0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(255, 117, 140, 0.25);
}

.featured-card {
    border: 2px dashed #ff758c;
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.product-price {
    color: #ff758c;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 15px;
}

/* أزرار الإضافة الوردية الخلابة */
.btn-add-to-cart {
    width: 100%;
    padding: 12px;
    background: #fff0f2;
    border: 2px solid #ff758c;
    color: #ff758c;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    background: linear-gradient(90deg, #ff758c, #ff7eb3);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 117, 140, 0.3);
}
/* منتقي الألوان للمنتج متعدد الدرجات */
.color-selector-box {
    margin: 15px 0;
    text-align: right;
}
.color-selector-box label {
    font-size: 0.85rem;
    color: #6a6a6a;
    display: block;
    margin-bottom: 6px;
}
.color-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #fff0f2;
    border-radius: 10px;
    background-color: #fff;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

/* 🛍️ تنسيق حقيبة المشتريات الجانبية الفاخرة والمخفية تلقائياً */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -420px; /* لتختفي السلة في اليسار تلقائياً */
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 5px 0 30px rgba(0,0,0,0.15);
    transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 25px;
    backdrop-filter: blur(10px);
}

/* يظهر السلة فقط عند تفعيل زر الضغط عليها */
.cart-sidebar.active {
    left: 0; 
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #fff0f2;
    padding-bottom: 15px;
}

.cart-header h3 {
    color: #ff758c;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
    transition: 0.2s;
}
.close-btn:hover {
    color: #ff758c;
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff8f9;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #ffe3e3;
}

.item-name-style {
    font-weight: 600;
    font-size: 0.95rem;
}
.item-price-style {
    color: #ff758c;
    font-weight: 700;
    font-size: 0.85rem;
}

.delete-item-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
}
.delete-item-btn:hover {
    color: #ff758c;
}

.empty-msg {
    text-align: center;
    color: #aaa;
    margin-top: 40px;
    font-size: 0.95rem;
}

/* استمارات التوصيل والدفع بالداخل */
.cart-footer {
    border-top: 2px solid #fff0f2;
    padding-top: 15px;
}
.total-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}
.total-price span {
    color: #ff758c;
}

.checkout-form h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #555;
    border-right: 3px solid #ff758c;
    padding-right: 8px;
}
.checkout-form input, .checkout-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #ffe3e3;
    border-radius: 12px;
    outline: none;
    background: #fffafb;
    font-size: 0.9rem;
}
.checkout-form input:focus, .checkout-form select:focus {
    border-color: #ff758c;
    background: white;
}

.upload-section {
    background: #fff5f6;
    padding: 12px;
    border: 1px dashed #ff758c;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 14px;
}

.btn-submit-order {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #ff758c, #ff7eb3);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.05rem;
    box-shadow: 0 5px 15px rgba(255, 117, 140, 0.3);
    transition: 0.3s;
}
.btn-submit-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 117, 140, 0.45);
}

/* ملاءمة شاشات الموبايل والتابلت */
@media (max-width: 768px) {
    .products-container {
        padding: 25px 15px;
        gap: 20px;
    }
    .store-header {
        padding: 15px 20px;
    }
    .logo {
        font-size: 1.4rem;
    }
    .cart-sidebar {
        width: 100%;
    }
}
