/* Demo E-Shop Styles */
:root {
  --primary: #667eea;
  --secondary: #764ba2;
  --success: #22c55e;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 16px 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 10px rgba(102,126,234,0.3);
}
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 22px; font-weight: 700; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.9); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.cart-btn {
  background: rgba(255,255,255,0.2);
  border: none; color: #fff; padding: 8px 16px; border-radius: 8px;
  cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 6px;
}
.cart-btn:hover { background: rgba(255,255,255,0.3); }
.cart-count {
  background: #fff; color: var(--primary); font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff; padding: 60px 0 80px; text-align: center;
}
.hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; }
.hero p { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* Products */
.products-section { padding: 48px 0; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--card); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }
.product-img {
  height: 200px; background: linear-gradient(135deg, #e0e7ff 0%, #c7b8ff 100%);
  display: flex; align-items: center; justify-content: center; font-size: 64px;
}
.product-body { padding: 20px; }
.product-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.product-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.product-footer { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-size: 20px; font-weight: 700; color: var(--primary); }
.btn-add {
  background: var(--primary); color: #fff; border: none; padding: 8px 16px;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: opacity 0.2s;
}
.btn-add:hover { opacity: 0.9; }

/* Referral Banner */
.referral-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px dashed #f59e0b; border-radius: 16px;
  padding: 24px; margin: 32px 0; text-align: center;
}
.referral-banner h3 { font-size: 18px; margin-bottom: 8px; color: #92400e; }
.referral-banner p { font-size: 14px; color: #a16207; margin-bottom: 12px; }
.btn-referral {
  background: #f59e0b; color: #fff; border: none; padding: 10px 24px;
  border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-referral:hover { background: #d97706; }

/* Checkout */
.checkout-section { padding: 48px 0; }
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; }
.checkout-form { background: var(--card); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.order-summary {
  background: var(--card); border-radius: 16px; padding: 24px;
  box-shadow: var(--shadow); height: fit-content; position: sticky; top: 100px;
}
.order-summary h3 { font-size: 18px; margin-bottom: 16px; }
.order-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.order-item:last-child { border-bottom: none; }
.order-total { display: flex; justify-content: space-between; padding-top: 16px; margin-top: 8px; border-top: 2px solid var(--border); font-size: 18px; font-weight: 700; }

.btn-submit {
  width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; margin-top: 16px;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102,126,234,0.4); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Success Page */
.success-section {
  min-height: 80vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 48px 24px;
}
.success-card {
  background: var(--card); border-radius: 24px; padding: 48px; max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}
.success-icon { font-size: 80px; margin-bottom: 16px; }
.success-card h1 { font-size: 28px; margin-bottom: 12px; }
.success-card p { color: var(--text-secondary); margin-bottom: 24px; }
.order-details {
  background: var(--bg); border-radius: 12px; padding: 20px; margin: 24px 0; text-align: left;
}
.order-details h4 { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.detail-row.total { font-weight: 700; font-size: 16px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--text); color: #fff; padding: 14px 20px;
  border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transform: translateY(100px); opacity: 0; transition: all 0.3s; z-index: 200;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* Responsive */
@media (max-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .hero h1 { font-size: 28px; }
  .products-grid { grid-template-columns: 1fr; }
}
