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

:root {
  --parchment: #F5F0E8;
  --sage: #8B9D77;
  --terracotta: #C4704F;
  --text: #2C2C2C;
  --text-light: #6B6B6B;
  --border: #DDD8CE;
  --white: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--parchment);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
}

/* Nav */
nav {
  background: var(--parchment);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

/* Layout */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3.5rem 1rem 2rem;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 480px;
  margin: 0 auto;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s ease;
  display: block;
}

.product-card:hover {
  box-shadow: 0 4px 18px rgba(44, 44, 44, 0.1);
}

.product-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--border);
  display: block;
}

.product-card .card-body {
  padding: 1rem 1.25rem 1.4rem;
}

.product-card h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.product-card .price {
  font-size: 1rem;
  font-weight: 500;
  color: var(--terracotta);
}

.product-card .description {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  color: var(--text-light);
  margin-top: 0.6rem;
  margin-right: 0.25rem;
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  padding: 2rem 0;
  align-items: start;
}

@media (max-width: 680px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

.product-detail .preview-image {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

.detail-info h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.detail-price {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--terracotta);
  margin: 1rem 0;
}

.detail-description {
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.detail-tags {
  margin-bottom: 1.5rem;
}

/* Checkout */
.checkout-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.checkout-form input[type="email"] {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
  margin-bottom: 1.1rem;
}

.checkout-form input[type="email"]:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 2px rgba(139, 157, 119, 0.2);
}

#paypal-button-container {
  margin-top: 0.25rem;
}

.checkout-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}

/* Back link */
.back-link {
  display: inline-block;
  color: var(--sage);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* Success */
.success-page {
  text-align: center;
  padding: 5rem 1rem;
}

.success-page .checkmark {
  font-size: 3rem;
  margin-bottom: 1.25rem;
}

.success-page h1 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.success-page p {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 460px;
  margin: 0 auto 1.5rem;
}

.success-page .back-home {
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.success-page .back-home:hover {
  text-decoration: underline;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-light);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.78rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
