/* PetalShop florist demo — Instagram-inspired design system */
:root {
  --ink: #0a0a0a;
  --ink-soft: #737373;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --line: #dbdbdb;
  --line-soft: #efefef;
  --grad-start: #833ab4;
  --grad-mid: #fd1d1d;
  --grad-end: #fcb045;
  --danger: #ed4956;
  --success: #00a400;
  --radius-card: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--font); -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.ig-gradient-text {
  background: linear-gradient(45deg, var(--grad-start), var(--grad-mid) 50%, var(--grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ig-gradient-bg {
  background: linear-gradient(45deg, var(--grad-start), var(--grad-mid) 55%, var(--grad-end));
}

/* Layout shell */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 2rem 1rem; }
.main-narrow { max-width: 28rem; }

/* Navbar */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: #000; color: #fff;
  border-bottom: 1px solid #222;
}
.nav-inner {
  max-width: 72rem; margin: 0 auto; padding: 0.75rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-brand {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  background: linear-gradient(45deg, var(--grad-start), var(--grad-mid) 50%, var(--grad-end));
  background: #ffffff;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a, .nav-links button {
  color: #e5e5e5; font-size: 0.875rem; font-weight: 500;
  padding: 0.4rem 0.75rem; border-radius: 999px; border: none; background: transparent; cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover { background: #222; color: #fff; }
.nav-cta {
  background: linear-gradient(45deg, var(--grad-start), var(--grad-mid) 55%, var(--grad-end)) !important;
  color: #fff !important; font-weight: 600 !important;
  padding: 0.45rem 1rem !important;
}
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 0.25rem; }
.nav-mobile { display: none; flex-direction: column; gap: 0.25rem; padding: 0 1rem 1rem; }
.nav-mobile a, .nav-mobile button {
  color: #e5e5e5; font-size: 0.875rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem;
  border: none; background: transparent; text-align: left; cursor: pointer;
}
.nav-mobile.open { display: flex; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* Footer */
.footer {
  border-top: 1px solid var(--line-soft); margin-top: 4rem;
}
.footer-inner {
  max-width: 72rem; margin: 0 auto; padding: 2rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; font-size: 0.75rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: 0.75rem; color: var(--ink-soft); }

/* Cards & surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.card-pad { padding: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 600;
  border: none; cursor: pointer; transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262626; }
.btn-secondary { background: var(--surface-alt); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--line-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-pill { border-radius: 999px; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-grad {
  background: linear-gradient(45deg, var(--grad-start), var(--grad-mid) 55%, var(--grad-end));
  color: #fff; border: none;
}

/* Forms */
.label {
  display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 0.4rem;
}
.input {
  width: 100%; border-radius: 0.5rem; border: 1px solid var(--line);
  background: var(--surface-alt); padding: 0.55rem 0.75rem; font-size: 0.875rem;
  color: var(--ink);
}
.input:focus { outline: none; border-color: rgba(10,10,10,0.4); box-shadow: 0 0 0 3px rgba(10,10,10,0.08); }
.hint { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.35rem; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Typography helpers */
.h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 1rem; line-height: 1.15; }
.h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 0.75rem; }
.h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.5rem; }
.lead { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.5; margin: 0 0 1.5rem; }
.muted { color: var(--ink-soft); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }

/* Badges */
.badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; padding: 0.2rem 0.5rem; border-radius: 0.35rem;
}
.badge-ok { background: #dcfce7; color: #166534; }
.badge-out { background: #fee2e2; color: var(--danger); }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: var(--danger); }

/* Grid helpers */
.grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-products { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid-products { grid-template-columns: repeat(4, 1fr); } }

/* Product card (catalog) */
.product-card { text-align: left; background: none; border: none; padding: 0; cursor: pointer; width: 100%; }
.product-img {
  aspect-ratio: 3/4; background: var(--surface-alt); border-radius: 0.5rem;
  overflow: hidden; margin-bottom: 0.5rem; border: 1px solid var(--line-soft);
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-name { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.product-meta { font-size: 0.75rem; color: var(--ink-soft); }
.product-price-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; }
.product-price { font-weight: 700; font-size: 0.875rem; }
.product-strike { font-size: 0.75rem; color: var(--ink-soft); text-decoration: line-through; }

/* Dashboard stats */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 2rem; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-card { padding: 1.25rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.15rem; }

/* Onboarding steps */
.steps {
  display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.step {
  font-size: 0.7rem; font-weight: 600; padding: 0.35rem 0.75rem; border-radius: 999px;
  background: var(--surface-alt); color: var(--ink-soft); border: 1px solid var(--line);
}
.step.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.step.done { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

/* Sidebar layout (products page) */
.sidebar-layout { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .sidebar-layout { grid-template-columns: 12rem 1fr; }
  .sidebar { position: sticky; top: 5rem; align-self: start; }
}
.sidebar a {
  display: block; background: var(--ink); color: #fff; font-size: 0.875rem;
  padding: 0.5rem 1rem; border-radius: 0.35rem; margin-bottom: 0.25rem;
}
.sidebar a:hover { background: #262626; }

/* Enquiry list */
.enquiry-item {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  padding: 1rem 0; border-bottom: 1px solid var(--line-soft);
}
.enquiry-item:last-child { border-bottom: none; }

/* Alert */
.alert {
  padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; margin-bottom: 1rem;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-info { background: #f0f9ff; color: #075985; }
.alert-warn { background: #fef3c7; color: #92400e; }

/* Demo banner */
.demo-banner {
  background: #111; color: #a3a3a3; font-size: 0.7rem; text-align: center;
  padding: 0.35rem 1rem; letter-spacing: 0.02em;
}
.demo-banner strong { color: #fbbf24; }

/* Utility */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.w-full { width: 100%; }
.line-clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.section-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); margin-bottom: 1rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line-soft);
}

/* Plan cards */
.plan-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
.plan-card { padding: 1.5rem; display: flex; flex-direction: column; }
.plan-price { font-size: 2rem; font-weight: 800; margin: 1rem 0 1.5rem; }
.plan-card.selected { box-shadow: 0 0 0 2px var(--ink); }

/* Filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem;
  padding: 1rem; background: var(--surface-alt); border-radius: var(--radius-card);
  border: 1px solid var(--line-soft);
}
.filter-bar .input { max-width: 12rem; background: #fff; }

/* Table-ish rows for products admin list */
.prod-row {
  display: grid; grid-template-columns: 4rem 1fr auto; gap: 1rem; align-items: center;
  padding: 0.75rem 0; border-bottom: 1px solid var(--line-soft);
}
.prod-row img {
  width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 0.4rem;
  border: 1px solid var(--line-soft);
}
