* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #f7f7f9;
  color: #222;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: #111827;
  color: white;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.link-button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  text-decoration: underline;
}

.site-header .link-button {
  text-decoration: none;
  color: white;
}

.cart-link {
  position: relative;
}

.cart-badge {
  background: #ef4444;
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 2px 7px;
  margin-left: 6px;
}

.main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 120px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.product-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-emoji {
  font-size: 3rem;
}

.product-emoji-large {
  font-size: 6rem;
}

.product-name {
  font-weight: 600;
  margin-top: 8px;
}

.product-category {
  color: #6b7280;
  font-size: 0.85rem;
  margin: 4px 0;
}

.product-price {
  font-weight: 700;
  margin: 6px 0 12px;
}

.product-price-large {
  font-size: 1.5rem;
}

.btn {
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-small {
  padding: 4px 10px;
  background: #e5e7eb;
}

.product-detail-main {
  display: flex;
  gap: 32px;
  margin-top: 16px;
  background: white;
  padding: 24px;
  border-radius: 10px;
}

.back-link {
  color: #2563eb;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.qty-row input {
  width: 64px;
  padding: 6px;
}

.added-msg {
  color: #16a34a;
  margin-top: 12px;
}

.cart-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cart-emoji {
  font-size: 2rem;
}

.cart-info {
  flex: 1;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-line-total {
  min-width: 70px;
  text-align: right;
  font-weight: 600;
}

.remove-link {
  color: #ef4444;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  margin: 18px 0;
  font-size: 1.05rem;
}

.cart-total {
  font-weight: 700;
}

.checkout-steps {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 16px 0 24px;
}

.checkout-steps li {
  color: #9ca3af;
  font-weight: 600;
}

.checkout-steps li.active {
  color: #111827;
}

.checkout-steps li.done {
  color: #16a34a;
}

.checkout-form {
  background: white;
  padding: 24px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #374151;
}

.checkout-form input[type="text"] {
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.radio-row {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}

fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.review {
  background: white;
  padding: 24px;
  border-radius: 10px;
  max-width: 480px;
}

/* On-page Data Layer Log panel, for visually verifying GTM/GA4 pushes */
.datalayer-panel {
  position: fixed;
  bottom: 0;
  right: 16px;
  width: 380px;
  max-height: 60vh;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
  font-family: Consolas, Menlo, monospace;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.datalayer-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
}

.datalayer-body {
  padding: 0 14px 14px;
  overflow-y: auto;
}

.datalayer-body .link-button {
  color: #93c5fd;
  margin-bottom: 8px;
}

.datalayer-empty {
  color: #94a3b8;
}

.datalayer-entry {
  border-top: 1px solid #1e293b;
  padding: 8px 0;
}

.datalayer-entry-title {
  margin-bottom: 4px;
}

.datalayer-entry pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  background: #1e293b;
  padding: 8px;
  border-radius: 6px;
}
