* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Kufi Arabic', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem;
  direction: rtl;
}

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

h1 {
  text-align: center;
  color: white;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.store-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.product-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.product-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 1rem;
}

.product-card h3 {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.product-card .description {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.product-card .price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #4CAF50;
  margin-bottom: 1rem;
}

.add-to-cart-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-to-cart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.add-to-cart-btn:active {
  transform: scale(0.98);
}

/* Floating Cart */
.floating-cart {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E72 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.floating-cart:hover {
  transform: scale(1.1);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #FFC107;
  color: #333;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  border: 3px solid white;
}

/* Cart Modal */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.cart-modal.active {
  display: flex;
}

.cart-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.cart-header h2 {
  font-size: 1.8rem;
  color: #333;
}

.close-cart {
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.close-cart:hover {
  color: #333;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.empty-cart {
  text-align: center;
  color: #999;
  font-size: 1.2rem;
  padding: 3rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
}

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

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

.cart-item-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: #4CAF50;
  font-weight: 700;
}

.remove-item {
  background: #ff4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

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

.cart-footer {
  padding: 1.5rem;
  border-top: 2px solid #f0f0f0;
  background: #f9f9f9;
  border-radius: 0 0 20px 20px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E72 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.checkout-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cart Notifications */
.cart-notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
}

.cart-notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* Cart Item Details */
.cart-item img {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

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

.cart-item-details h4 {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: linear-gradient(135deg, #9333EA 0%, #C084FC 100%);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.qty-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(147, 51, 234, 0.3);
}

.cart-item-quantity span {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.remove-btn {
  background: #ff4444;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  line-height: 1;
}

.remove-btn:hover {
  background: #cc0000;
  transform: scale(1.1);
}

/* Mobile */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .floating-cart {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    bottom: 1rem;
    left: 1rem;
  }

  .cart-content {
    width: 95%;
    max-height: 90vh;
  }
}
