:root {
  --pink: #d9a5ab;
  --pink-dark: #c48890;
  --purple: #cbb3c9;
  --bg: #fdf6f2;
  --card-bg: #fffbf9;
  --text: #5c4a4d;
  --muted: #a8938f;
  --border: #f0dede;
  --shadow: 0 4px 18px rgba(196, 136, 144, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Quicksand", "Segoe UI", system-ui, sans-serif;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cdefs%3E%3Cg id='b1'%3E%3Cpath d='M20 16 C19 12 14 4 7 4 C0 4 -3 12 2 17 C6 21 15 21 20 17 C25 21 34 21 38 17 C43 12 40 4 33 4 C26 4 21 12 20 16 Z'/%3E%3Cpath d='M20 16 C19 14 15 9 10 9 C6 9 4 13 7 16 C10 18 16 18 20 16 Z' fill='%23ffffff' opacity='0.4'/%3E%3Cpath d='M20 16 C21 14 25 9 30 9 C34 9 36 13 33 16 C30 18 24 18 20 16 Z' fill='%23ffffff' opacity='0.4'/%3E%3Ccircle cx='20' cy='16' r='4'/%3E%3Cpath d='M17 19 L10 34 L14 31 L17 36 L20 31 Z'/%3E%3Cpath d='M23 19 L30 34 L26 31 L23 36 L20 31 Z'/%3E%3C/g%3E%3Cg id='b2'%3E%3Cpath d='M20 16 C18 9 9 1 3 4 C-3 7 -2 18 6 19 C12 20 18 18 20 16 Z'/%3E%3Cpath d='M20 16 C22 9 31 1 37 4 C43 7 42 18 34 19 C28 20 22 18 20 16 Z'/%3E%3Ccircle cx='20' cy='16' r='3'/%3E%3Cpath d='M18 19 L11 41 L15 37 L18 44 L21 37 Z'/%3E%3Cpath d='M22 19 L29 41 L25 37 L22 44 L19 37 Z'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23b1' fill='%23f0d8dd' transform='translate(18,30) rotate(-15) scale(0.9)'/%3E%3Cuse href='%23b2' fill='%23e6b9c2' transform='translate(150,50) rotate(20) scale(0.6)'/%3E%3Cuse href='%23b1' fill='%23eccdd3' transform='translate(60,105) rotate(-25) scale(0.7)'/%3E%3Cuse href='%23b2' fill='%23dba3ac' transform='translate(195,135) rotate(10) scale(0.5)'/%3E%3Cuse href='%23b1' fill='%23f3dde2' transform='translate(28,175) rotate(15) scale(0.55)'/%3E%3Cuse href='%23b2' fill='%23eccdd3' transform='translate(125,195) rotate(-10) scale(0.65)'/%3E%3Cuse href='%23b1' fill='%23e6b9c2' transform='translate(0,85) rotate(30) scale(0.45)'/%3E%3Cuse href='%23b2' fill='%23f0d8dd' transform='translate(175,10) rotate(-8) scale(0.5)'/%3E%3Cuse href='%23b1' fill='%23dba3ac' transform='translate(100,10) rotate(25) scale(0.4)'/%3E%3Cuse href='%23b2' fill='%23f3dde2' transform='translate(215,195) rotate(18) scale(0.5)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  color: var(--text);
}

header.site-header {
  text-align: center;
  padding: 3rem 1rem 1.8rem;
  background: linear-gradient(135deg, #f6e3e6, #ecdbe8);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

header.site-header h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2.8rem;
  letter-spacing: 0.5px;
  color: var(--pink-dark);
}

header.site-header p {
  margin: 0.5rem 0 0;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.3px;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.2rem 4rem;
}

.bracelet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f8e9e6, #f1e3ee);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .thumb svg {
  width: 55%;
  height: 55%;
  opacity: 0.65;
}

.card-body {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card-body h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--pink-dark);
}

.card-body .desc {
  color: var(--muted);
  font-size: 0.88rem;
  flex: 1;
}

.card-body .price {
  font-weight: 700;
  color: var(--pink-dark);
  font-size: 1.1rem;
}

button, .btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--pink);
  color: white;
  transition: transform 0.1s ease, background 0.15s ease;
}

button:hover, .btn:hover { background: var(--pink-dark); }
button:active { transform: scale(0.97); }

button.secondary {
  background: transparent;
  color: var(--pink-dark);
  border: 1.5px solid var(--pink-dark);
}

.empty-state, .loading-state {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

/* How-to-buy modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 46, 57, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal {
  background: white;
  border-radius: 16px;
  max-width: 380px;
  width: 100%;
  padding: 1.6rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.modal h2 { margin-top: 0; }

.modal .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.modal .row code { color: var(--purple); }

.modal .copy-btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  background: var(--purple);
}

.modal-close {
  margin-top: 1rem;
  width: 100%;
  background: var(--border);
  color: var(--text);
}
.modal-close:hover { background: #e6cede; }

footer.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer.site-footer a { color: var(--pink-dark); }

/* Admin page */
.admin-wrap {
  max-width: 480px;
  margin: 3rem auto;
  padding: 0 1.2rem;
}

.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.admin-card h2 {
  margin-top: 0;
}

.field {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.field input, .field textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.field textarea { resize: vertical; min-height: 60px; }

.error-msg {
  color: #c0392b;
  font-size: 0.85rem;
  min-height: 1.1em;
}

.success-msg {
  color: #1e8a4c;
  font-size: 0.85rem;
  min-height: 1.1em;
}

.admin-list {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 1.2rem;
}

.admin-list-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.6rem;
}

.admin-list-row img, .admin-list-row .thumb-sm {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1e5ef;
  flex-shrink: 0;
}

.admin-list-row .info { flex: 1; }
.admin-list-row .info .name { font-weight: 600; }
.admin-list-row .info .price { color: var(--pink-dark); font-size: 0.85rem; }

.admin-list-row button.danger {
  background: #e74c3c;
}
.admin-list-row button.danger:hover { background: #c0392b; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 1.5rem auto 0;
  padding: 0 1.2rem;
}

.top-bar a { color: white; text-decoration: none; font-size: 0.85rem; }

.hidden { display: none !important; }
