:root {
  --pink: #e8a0ac;
  --pink-dark: #d1717f;
  --cream: #fbf3ee;
  --text: #3a2c2e;
  --muted: #8a7679;
  --white: #ffffff;
  --border: #eee0dc;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(58, 44, 46, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

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

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 900;
  color: var(--pink-dark);
}

.logo-icon { flex-shrink: 0; }

.cart-btn {
  position: relative;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.cart-count {
  background: white;
  color: var(--pink-dark);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 13px;
  margin-inline-start: 6px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #f6d9de, #fbf3ee);
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 34px;
  margin: 0 0 12px;
  color: var(--pink-dark);
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}

/* Products */
.section-title {
  font-size: 24px;
  margin: 40px 0 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}

.loading { color: var(--muted); }

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover { transform: translateY(-4px); }

.product-thumb {
  aspect-ratio: 1 / 1;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-info h3 {
  font-size: 16px;
  margin: 0;
}

.product-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.product-price {
  font-weight: 700;
  color: var(--pink-dark);
  font-size: 16px;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--pink-dark);
  color: white;
}

.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-block { width: 100%; }

.btn-outline {
  background: white;
  border: 1px solid var(--pink-dark);
  color: var(--pink-dark);
}

/* Overlay / modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 44, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.overlay[hidden] { display: none; }

.modal {
  background: white;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--cream);
  border: none;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 15px;
}

/* Product modal */
.product-modal .product-modal-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--cream);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  margin-bottom: 16px;
  overflow: hidden;
}

.product-modal-thumb img { width: 100%; height: 100%; object-fit: cover; }

.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.qty-row button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  font-size: 18px;
  cursor: pointer;
}

/* Cart */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-name { font-weight: 700; font-size: 14px; }
.cart-item-meta { font-size: 13px; color: var(--muted); }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
}

.cart-empty { color: var(--muted); padding: 20px 0; text-align: center; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  margin: 16px 0;
}

/* Checkout form */
#checkoutForm { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }

#checkoutForm label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

#checkoutForm input,
#checkoutForm select,
#checkoutForm textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  background: white;
  color: var(--text);
}

.shipping-hint {
  font-size: 12px;
  margin: -8px 0 0;
  text-align: center;
}

.checkout-summary {
  background: var(--cream);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.summary-total {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 6px;
  margin-top: 2px;
}

.cod-note {
  background: var(--cream);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: center;
}

.form-error {
  color: #b3261e;
  font-size: 14px;
  margin: 0;
}

/* Thank you */
.thankyou-modal { text-align: center; max-width: 380px; }
.thankyou-icon { font-size: 48px; margin-bottom: 10px; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 30px 0 50px;
  color: var(--muted);
  font-size: 14px;
}

.muted { color: var(--muted); }

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .modal { padding: 20px; }
}
