:root {
    --primary-blue: #0D2B45;
    --primary-orange: #FF6B00;
    --orange-hover: #e55f00;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --danger: #dc3545;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Cairo', sans-serif; background-color: var(--bg-color); color: var(--text-main); }

/* Typography */
h1, h2, h3 { color: var(--primary-blue); margin-bottom: 0.5rem; }

/* Navbar */
.navbar { background-color: var(--card-bg); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.logo { height: 60px; object-fit: contain; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.cart-icon-container { position: relative; cursor: pointer; padding: 0.5rem; color: var(--primary-blue); }
.cart-count { position: absolute; top: 0; right: 0; background-color: var(--primary-orange); color: white; font-size: 0.75rem; font-weight: bold; padding: 2px 6px; border-radius: 10px; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.hero { text-align: center; margin-bottom: 4rem; padding: 2rem; background: var(--card-bg); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.exchange-rate-badge { display: inline-block; background-color: #e9ecef; color: var(--primary-blue); padding: 0.5rem 1rem; border-radius: 20px; font-weight: bold; margin-bottom: 1.5rem; font-size: 0.9rem;}

/* Inputs & Buttons */
.input-group { display: flex; max-width: 600px; margin: 0 auto; gap: 0.5rem; }
input[type="text"], input[type="number"], input[type="tel"], select { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: 4px; font-family: inherit; font-size: 1rem; }
input:focus, select:focus { outline: none; border-color: var(--primary-orange); }

.btn-primary { background-color: var(--primary-orange); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 4px; font-weight: bold; cursor: pointer; transition: background 0.2s; font-family: inherit; font-size: 1rem; }
.btn-primary:hover { background-color: var(--orange-hover); }
.btn-outline { background-color: transparent; color: var(--primary-blue); border: 1px solid var(--primary-blue); padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; font-family: inherit; font-weight: 600; }
.btn-outline:hover { background-color: var(--primary-blue); color: white; }
.full-width { width: 100%; }

/* Pricing Display */
.price-display { display: flex; flex-direction: column; align-items: flex-end; }
html[dir="ltr"] .price-display { align-items: flex-start; }
.price-usd { font-size: 1.25rem; font-weight: bold; color: var(--primary-orange); }
.price-dzd { font-size: 0.9rem; color: var(--text-muted); }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.product-card { background: var(--card-bg); border-radius: 8px; padding: 1rem; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; flex-direction: column; }
.product-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; margin-bottom: 1rem; }
.product-card h3 { font-size: 1.1rem; flex: 1; }

/* Drawer & Modals */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; }
.cart-drawer { position: fixed; top: 0; right: 0; width: 400px; max-width: 100%; height: 100%; background: var(--card-bg); z-index: 1001; box-shadow: -2px 0 10px rgba(0,0,0,0.1); display: flex; flex-direction: column; transition: transform 0.3s ease; }
html[dir="ltr"] .cart-drawer { right: auto; left: 0; transform: translateX(-100%); }
html[dir="rtl"] .cart-drawer { transform: translateX(100%); }
.cart-drawer.open { transform: translateX(0); }
.hidden { display: none !important; }

.cart-header, .cart-footer { padding: 1.5rem; border-bottom: 1px solid var(--border-color); }
.cart-footer { border-top: 1px solid var(--border-color); border-bottom: none; margin-top: auto; }
.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.cart-header { display: flex; justify-content: space-between; align-items: center; }

.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; }
.cart-item-details { flex: 1; }
.cart-item-details h4 { margin-bottom: 0.25rem; font-size: 0.95rem; }
.item-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.qty-btn { background: #eee; border: none; padding: 2px 8px; cursor: pointer; border-radius: 4px; }
.remove-btn { color: var(--danger); background: none; border: none; cursor: pointer; font-size: 0.85rem; }

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

/* Modals */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1002; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.6); }
.modal-content { background: var(--card-bg); width: 90%; max-width: 500px; padding: 2rem; border-radius: 8px; max-height: 90vh; overflow-y: auto; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; }
.delivery-warning { background: #fff3cd; color: #856404; padding: 0.75rem; border-radius: 4px; margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: bold; border: 1px solid #ffeeba; }
.status-message { margin-top: 0.5rem; font-size: 0.9rem; color: var(--primary-orange); }

@media (max-width: 768px) { .input-group { flex-direction: column; } }