:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f4f7fb;
  color: #111827;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, #d7f3ff 0%, transparent 40%),
    radial-gradient(circle at bottom right, #ffedd5 0%, transparent 35%),
    #f4f7fb;
}

.site-header {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.site-header p {
  margin: 0.2rem 0 0;
  color: #475569;
}

.cart-button,
.checkout-button,
.text-button {
  border: none;
  cursor: pointer;
  font: inherit;
}

.cart-button {
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  background: #0ea5e9;
  color: white;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.18);
}

.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.catalog,
.cart-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  padding: 1.5rem;
}

.section-header h2,
.cart-header h2 {
  margin: 0 0 0.4rem;
}

.section-header p {
  margin: 0;
  color: #64748b;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 24px;
  padding: 1.25rem;
  background: #f8fbff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: #eef2ff;
  display: grid;
  place-items: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-title {
  margin: 0;
  font-size: 1.15rem;
}

.product-desc {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.product-size,
.product-stock {
  margin: 0.75rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.product-price {
  font-weight: 700;
  color: #0f172a;
}

.add-button {
  margin-top: auto;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  font-weight: 700;
  background: #14b8a6;
  color: white;
}

.cart-panel {
  position: sticky;
  top: 1rem;
  min-height: 340px;
}

.hidden {
  display: none;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.text-button {
  color: #64748b;
  background: transparent;
}

.cart-items {
  display: grid;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  border-radius: 20px;
  background: #eef2ff;
}

.cart-item-image {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.cart-item-info {
  display: grid;
  gap: 0.35rem;
}

.cart-item-title {
  margin: 0;
  font-weight: 700;
}

.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  color: #334155;
}

.qty-button,
.remove-button {
  border-radius: 999px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.35);
  width: 36px;
  height: 36px;
}

.cart-summary {
  margin-top: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.checkout-button {
  width: 100%;
  padding: 1rem;
  font-weight: 700;
  border-radius: 18px;
  background: #0ea5e9;
  color: white;
}

@media (min-width: 900px) {
  .page-grid {
    grid-template-columns: minmax(0, 2fr) 360px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .page-grid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
