@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Montserrat, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #f3f4f6;
  color: #111827;
  min-height: 100vh;
}

.site-header {
  background: #4a1f28;
  padding: 18px 24px;
  text-align: center;
}

.site-header img { max-height: 52px; width: auto; }

.site-nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px 0;
  font-size: 13px;
  color: #6b7280;
}

.site-nav a {
  color: #4a1f28;
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover { text-decoration: underline; }

.site-nav .sep { margin: 0 8px; color: #9ca3af; }

.cart-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.cart-head h1 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cart-head .link-continue {
  color: #4a1f28;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 0;
}

.cart-head .link-continue:hover {
  text-decoration: underline;
}

.cart-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cart-empty {
  text-align: center;
  padding: 60px 24px;
}

.cart-empty p { color: #6b7280; margin: 0 0 20px; }

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px 20px;
  padding: 20px;
  border-bottom: 1px solid #f3f4f6;
  align-items: start;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item > a:first-child {
  display: block;
  line-height: 0;
}

.cart-item img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.cart-item-body {
  min-width: 0;
}

.cart-item-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 8px;
}

.cart-item-title a {
  color: #111827;
  text-decoration: none;
}

.cart-item-title a:hover { color: #4a1f28; }

.cart-item-variant {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
  line-height: 1.4;
}

.cart-item-price {
  font-weight: 700;
  font-size: 16px;
  color: #4a1f28;
  margin-top: 4px;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  align-self: center;
}

.qty-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.qty-input {
  width: 64px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  text-align: center;
  font-family: inherit;
}

.qty-input:focus {
  outline: none;
  border-color: #4a1f28;
  box-shadow: 0 0 0 3px rgba(74, 31, 40, 0.12);
}

.btn-remove {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  font-family: inherit;
}

.btn-remove:hover { color: #dc2626; }

.cart-summary {
  padding: 24px;
  background: #fafafa;
  border-top: 1px solid #e5e7eb;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 15px;
}

.summary-line span:last-child {
  font-weight: 700;
  color: #111827;
}

.free-ship {
  color: #16a34a;
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 20px;
}

.cart-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: block;
  text-align: center;
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.btn-primary {
  background: #4a1f28;
  color: #fff;
}

.btn-primary:hover { background: #3a1820; }

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

.btn-secondary {
  background: #fff;
  color: #4a1f28;
  border: 2px solid #4a1f28;
}

.btn-secondary:hover {
  background: #fdf2f4;
}

.site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .cart-item {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 16px;
  }

  .cart-item img {
    width: 80px;
    height: 80px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    padding-top: 4px;
    border-top: 1px solid #f3f4f6;
  }

  .qty-label {
    flex-direction: row;
    gap: 8px;
  }
}
