:root {
  --brand: #b48c5a;
  --brand-dark: #a07a4a;
  --bg: #f8fafc;
  --text: #222;
  --muted: #666;
  --card: #fff;
  --border: #dfe6e9;
  --shadow: 0 8px 26px rgba(180, 140, 90, 0.2);
}

* { box-sizing: border-box; }

body {
  font-family: 'Cairo', Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, #f3e7e9 100%);
  margin: 0 auto;
  max-width: 1440px;
  color: var(--text);
}

.page-header {
  background: #fff;
  box-shadow: 0 2px 8px #eee;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-link {
  color: var(--brand);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-word {
  white-space: nowrap;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  object-fit: cover;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.page-nav a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 700;
}

.page-nav a.active,
.page-nav a:hover { color: var(--brand); }

.cart-section {
  padding: 40px 20px;
  min-height: 60vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.page-title {
  margin: 0 0 20px 0;
  color: var(--brand);
}

.cart-table {
  display: grid;
  gap: 12px;
}

.cart-item {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 16px;
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.cart-item-info h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
}

.cart-item-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.offer-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3e6;
  border: 1px solid #f2caa6;
  color: #a15a1a;
  font-size: 0.85rem;
  font-weight: 700;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.qty-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
}

.remove-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.cart-summary {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.summary-row.total {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.summary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.promo-section {
  margin: 12px 0 6px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fffaf3;
}

.promo-section label {
  font-weight: 700;
  color: var(--brand);
  display: block;
  margin-bottom: 8px;
}

.promo-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.promo-controls input {
  flex: 1 1 200px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Cairo', Arial, sans-serif;
}

.promo-message {
  margin-top: 8px;
  font-weight: 700;
  color: #2c3e50;
}

.checkout-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.checkout-card h2 {
  margin: 0 0 12px 0;
  color: var(--brand);
}

#checkoutForm {
  display: grid;
  gap: 12px;
}

#checkoutForm label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

#checkoutForm input,
#checkoutForm textarea {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Cairo', Arial, sans-serif;
}

.checkout-result {
  margin-top: 10px;
  color: #27ae60;
  font-weight: 700;
}

.btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.btn.secondary {
  background: #bdc3c7;
  color: #222;
}

.empty-state {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 30px;
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-footer {
  background: #fff;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  box-shadow: 0 -2px 8px #eee;
}

.order-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.order-modal-content {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}

.order-modal-content h3 {
  margin: 0 0 10px 0;
  color: var(--brand);
}

.order-modal-message {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 70px 1fr;
  }
  .cart-item-actions {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
  }
}
