@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

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

:root {
  --color-bg: #f9f7f4;
  --color-surface: #ffffff;
  --color-primary: #f90072;
  --color-primary-dark: #d0005f;
  --color-text: #2c2c2c;
  --color-muted: #6b7280;
  --color-border: #e5e2dd;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

body {
  font-family: 'Lato', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Navigation ─────────────────────────────────── */

nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  padding: 8px 16px;
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  transition: background 0.15s, color 0.15s;
}

.nav-cart:hover {
  background: var(--color-primary);
  color: #fff;
}

.cart-badge {
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 0.15s;
}

.nav-cart:hover .cart-badge {
  background: #fff;
  color: var(--color-primary);
}

/* ── Hero ────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, #fde6f0 0%, #f5f0eb 100%);
  padding: 72px 24px;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Container ───────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Product Grid ────────────────────────────────── */

.products-section {
  padding: 56px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--color-text);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  flex: 1;
}

.product-img {
  background: linear-gradient(135deg, #fde6f0, #f9c9dd);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.product-link .product-name,
.product-link .product-desc {
  padding: 0 24px;
}

.product-link .product-name {
  margin-top: 24px;
}

.product-link .product-desc {
  margin-bottom: 8px;
}

.product-body {
  padding: 0 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.product-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  flex: 1;
  white-space: pre-line;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 8px;
}

/* ── Buttons ─────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  width: 100%;
  margin-top: 12px;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-danger {
  background: transparent;
  color: #dc3545;
  border: none;
  padding: 4px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
}

.btn-danger:hover {
  color: #a71d2a;
}

/* ── Product Detail Page ─────────────────────────── */

.product-detail-section {
  padding: 40px 24px 64px;
  max-width: 900px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--color-primary);
}

.product-detail {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.product-detail-img {
  background: linear-gradient(135deg, #fde6f0, #f9c9dd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.product-detail-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-detail-name {
  font-size: 1.8rem;
  font-weight: 700;
}

.product-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.product-detail-desc {
  font-size: 1.05rem;
  color: var(--color-text);
  white-space: pre-line;
}

.product-detail-long {
  color: var(--color-muted);
  line-height: 1.8;
  white-space: pre-line;
}

.product-detail .btn {
  align-self: flex-start;
  margin-top: 12px;
  width: auto;
  padding: 12px 32px;
}

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

  .product-detail-img {
    height: 220px;
  }
}

/* ── Cart Page ───────────────────────────────────── */

.cart-section {
  padding: 56px 24px;
  max-width: 720px;
  margin: 0 auto;
}

.cart-section h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.cart-empty {
  text-align: center;
  color: var(--color-muted);
  padding: 48px 0;
}

.cart-empty a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.cart-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

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

.cart-item-name {
  font-weight: 700;
  font-size: 1rem;
}

.cart-item-price {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}

.qty-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.qty-value {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 16px;
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-total-amount {
  color: var(--color-primary);
  font-size: 1.4rem;
}

.agb-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--color-text);
}

#paypal-button-container {
  margin-top: 24px;
}

#paypal-button-container.paypal-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Success / Cancel ────────────────────────────── */

.status-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 48px 24px;
}

.status-icon {
  font-size: 4rem;
  margin-bottom: 24px;
}

.status-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.status-page p {
  color: var(--color-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 440px;
}

/* ── Footer ──────────────────────────────────────── */

footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 24px;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-top: 48px;
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }

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