:root {
  font-family: Inter, Arial, sans-serif;
  color: #0f172a;
  background: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.site-header,
.shop-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.site-header,
.site-header nav,
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header .cart-button {
  color: #fff;
}

.site-header nav {
  justify-content: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.product-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}

.product-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}

.product-card h2,
.cart-item-details {
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-card-footer {
  flex-wrap: wrap;
}

.product-stock {
  color: #64748b;
  font-size: 13px;
}

.cart-item > .product-image {
  width: 112px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
}

.admin-table .product-image {
  float: left;
  width: 64px;
  margin-right: 12px;
}

.checkout-actions {
  display: flex;
  justify-content: flex-end;
}

.cart-notice:empty {
  display: none;
}

.product-category,
.eyebrow {
  color: #64748b;
  font-size: 12px;
}

.product-card button,
.cart-button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

.product-card button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cart-count {
  margin-left: 6px;
  font-weight: 700;
}

.cart-items {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.cart-item,
.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cart-item h2 {
  margin: 4px 0 12px;
}

.cart-item-actions input {
  width: 64px;
  margin-left: 8px;
  padding: 8px;
}

.cart-total {
  text-align: right;
  font-size: 18px;
}

.load-error {
  max-width: 600px;
  margin: 48px auto;
  padding: 24px;
}

.admin-page { padding-bottom: 56px; }
.admin-heading, .admin-panel-header, .admin-controls, .dialog-heading, .form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-heading { margin: 20px 0 28px; }
.admin-heading h1, .admin-panel h2, .product-form h2 { margin: 4px 0; }
.intro, .admin-panel-header p, .admin-stat small { color: #64748b; }
.admin-primary-button, .secondary-button, .text-button, .stock-control button, .dialog-close { border: 0; border-radius: 8px; cursor: pointer; font: inherit; }
.admin-primary-button { padding: 11px 15px; background: #2563eb; color: #fff; font-weight: 700; }
.secondary-button { padding: 11px 15px; background: #e2e8f0; color: #1e293b; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat, .admin-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
.admin-stat { padding: 18px; display: grid; gap: 5px; }.admin-stat span { color: #475569; font-size: 14px; }.admin-stat strong { font-size: 25px; }.admin-stat.attention { border-color: #fbbf24; background: #fffbeb; }
.admin-panel { overflow: hidden; }.admin-panel-header { padding: 20px 20px 12px; }.admin-controls { padding: 8px 20px 20px; align-items: end; }
.admin-controls label, .product-form label { display: grid; gap: 6px; color: #475569; font-size: 14px; font-weight: 600; }.search-field { flex: 1; }
.admin-controls input, .admin-controls select, .product-form input { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 11px; color: #0f172a; background: #fff; font: inherit; }.admin-controls select { min-width: 145px; }
.table-wrap { overflow-x: auto; }.admin-table { width: 100%; border-collapse: collapse; min-width: 690px; }.admin-table th, .admin-table td { padding: 15px 20px; text-align: left; border-top: 1px solid #e2e8f0; }.admin-table th { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }.admin-table td > strong, .admin-table td > span { display: block; }.admin-table td > span { margin-top: 3px; color: #64748b; font-size: 13px; }
.category-pill { display: inline-block !important; margin: 0 !important; padding: 4px 8px; color: #334155 !important; background: #f1f5f9; border-radius: 999px; font-size: 12px !important; }.stock-control { display: flex; align-items: center; gap: 7px; }.stock-control button { width: 26px; height: 26px; background: #e2e8f0; color: #334155; font-size: 18px; line-height: 1; }.stock-badge { min-width: 32px; text-align: center; font-weight: 700; color: #15803d; }.stock-badge.low { color: #b45309; }.stock-badge.out { color: #b91c1c; }.text-button { padding: 7px; color: #2563eb; background: transparent; font-weight: 700; }.empty-state { padding: 32px !important; text-align: center !important; color: #64748b; }.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.product-dialog { width: min(94vw, 500px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgb(15 23 42 / .25); }.product-dialog::backdrop { background: rgb(15 23 42 / .5); }.product-form { display: grid; gap: 16px; padding: 24px; }.dialog-close { width: 32px; height: 32px; font-size: 24px; line-height: 1; color: #475569; background: #f1f5f9; }.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.form-actions { justify-content: end; margin-top: 8px; }

@media (max-width: 560px) {
  .site-header,
  .shop-content {
    padding: 18px;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-header nav {
    order: 3;
    width: 100%;
  }

  .cart-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .cart-item-actions {
    flex-wrap: wrap;
  }

  .admin-heading, .admin-controls { align-items: stretch; flex-direction: column; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-controls select { min-width: 0; }
}
