/* =============================================================
   Plush Voice Shop — shared styles
   Warm, friendly, rounded — matches a plush-toy storefront.
   ============================================================= */

:root {
  --cream: #FFF8F0;
  --cream-deep: #FBEFE0;
  --ink: #4A3B34;
  --ink-soft: #7A6A61;
  --pink: #F6A8C4;
  --pink-deep: #E8628F;
  --peach: #F0955A;
  --peach-deep: #DE7A3C;
  --lavender: #B39DDB;
  --mint: #9FD8C6;
  --white: #FFFFFF;
  --border: #EEDFCB;
  --shadow: 0 10px 30px rgba(150, 100, 70, 0.12);
  --shadow-sm: 0 4px 14px rgba(150, 100, 70, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font: -apple-system, "Segoe UI", "Segoe UI Rounded", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--pink-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 800; }

/* ---------------- Header ---------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-emoji { font-size: 1.6rem; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
}
.main-nav a { color: var(--ink-soft); }
.main-nav a:hover { color: var(--pink-deep); text-decoration: none; }
.lang-switch {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--ink) !important;
}
.lang-switch:hover { border-color: var(--pink); background: var(--cream-deep); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-deep) 100%);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(232, 98, 143, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(232, 98, 143, 0.45); }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--pink); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 64px 0 48px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero-title {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 0.4em;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 1.8em;
  max-width: 46ch;
}
.hero-art {
  filter: drop-shadow(0 20px 25px rgba(150, 100, 70, 0.15));
}

/* ---------------- How it works ---------------- */
.how-section {
  padding: 40px 0 60px;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}
.how-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.how-card h3 { color: var(--pink-deep); font-size: 1.05rem; }
.how-card p { color: var(--ink-soft); margin: 0; }

/* ---------------- Products grid ---------------- */
.products-section { padding: 20px 0 70px; }
.section-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 36px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.product-thumb {
  aspect-ratio: 1 / 1;
  background: var(--cream-deep);
  padding: 18px;
  position: relative;
}
.product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.product-name { font-size: 1.2rem; margin: 0; }
.product-desc { color: var(--ink-soft); font-size: 0.94rem; margin: 0; flex: 1; }
.product-price { font-weight: 800; font-size: 1.15rem; color: var(--peach-deep); }
.product-price .from-label { font-weight: 500; font-size: 0.8rem; color: var(--ink-soft); margin-right: 4px; }

.product-card.is-sold-out { opacity: 0.65; }
.product-card.is-sold-out:hover { transform: none; box-shadow: var(--shadow-sm); }

.stock-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.stock-badge.stock-in { background: #E8F5E9; color: #2E7D32; }
.stock-badge.stock-low { background: #FFF3E0; color: #EF6C00; }
.stock-badge.stock-out { background: #FFEBEE; color: #C62828; }
.stock-badge.thumb-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.stock-note { font-size: 0.82rem; color: var(--ink-soft); }

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 0;
}

/* ---------------- Product detail page ---------------- */
.product-page { padding: 40px 0 80px; }
.breadcrumb { margin-bottom: 22px; font-weight: 600; }
.product-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: start;
}
.product-media {
  background: var(--cream-deep);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: sticky;
  top: 100px;
}
.product-info h1 { font-size: 2rem; }
.product-info .price-tag {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--peach-deep);
  margin-bottom: 14px;
}
.product-info .description { color: var(--ink-soft); margin-bottom: 26px; }
.product-info .stock-badge { display: block; width: fit-content; margin-bottom: 16px; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.card .hint {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

/* Quantity stepper */
.qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.qty-stepper button {
  background: var(--cream-deep);
  border: none;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.qty-stepper input {
  width: 44px;
  text-align: center;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Recorder widget */
.recorder-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 10px 0 4px;
}
.record-visual {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--pink) 0%, var(--pink-deep) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(232, 98, 143, 0.35);
  position: relative;
  transition: box-shadow 0.2s ease;
}
.record-visual.is-recording {
  animation: pulse 1.1s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 98, 143, 0.55); }
  70% { box-shadow: 0 0 0 22px rgba(232, 98, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 98, 143, 0); }
}
.record-timer {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  min-height: 1.4em;
}
.record-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.record-status {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
  min-height: 1.3em;
}
.record-status.error { color: var(--pink-deep); font-weight: 600; }
audio.record-playback { width: 100%; margin-top: 4px; }

/* Payment screenshot upload */
.upload-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.upload-filename {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.upload-preview {
  max-width: 220px;
  max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field input,
.field textarea,
.field select {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--pink);
}
.field textarea { resize: vertical; min-height: 80px; }

.form-error {
  background: #FDEDF2;
  border: 1px solid var(--pink);
  color: var(--pink-deep);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
}

.back-link { display: inline-block; margin-top: 18px; font-weight: 600; }

/* ---------------- Success page ---------------- */
.success-page { padding: 60px 0 90px; }
.success-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
}
.success-icon { font-size: 3.4rem; margin-bottom: 10px; }
.order-ref-box {
  display: inline-block;
  background: var(--cream-deep);
  border: 2px dashed var(--peach);
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 10px 0 22px;
  color: var(--peach-deep);
}
.bank-details {
  text-align: left;
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 24px 0;
}
.bank-details dl { margin: 0; }
.bank-details dt { font-weight: 700; color: var(--ink-soft); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 14px; }
.bank-details dt:first-child { margin-top: 0; }
.bank-details dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 700; }
.reference-note {
  background: #FFF3E0;
  border: 1px solid var(--peach);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--peach-deep);
  font-weight: 600;
  margin-bottom: 6px;
}

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------------- Admin ---------------- */
.admin-body { background: var(--cream); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 26px 18px;
  flex-shrink: 0;
}
.admin-sidebar .brand { margin-bottom: 30px; }
.admin-sidebar nav a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 4px;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: var(--cream-deep);
  color: var(--pink-deep);
  text-decoration: none;
}
.admin-main { flex: 1; padding: 30px 36px; max-width: 1100px; }
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
}
.admin-login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  text-align: center;
}

table.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
table.data-table th, table.data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
table.data-table th { background: var(--cream-deep); font-weight: 700; }
table.data-table tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; text-transform: capitalize; }
.badge-pending { background: #E3F2FD; color: #1565C0; }
.badge-paid { background: #E8F5E9; color: #2E7D32; }
.badge-recorded { background: #EDE7F6; color: #5E35B1; }
.badge-shipped { background: #FFF3E0; color: #EF6C00; }
.badge-cancelled { background: #FFEBEE; color: #C62828; }

.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-flash { background: #E8F5E9; border: 1px solid #A5D6A7; color: #2E7D32; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .how-grid { grid-template-columns: 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .product-media { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .admin-sidebar nav { display: flex; gap: 6px; }
  .main-nav { gap: 12px; font-size: 0.9rem; }
}
