:root {
  --background: #f8fafc;
  --foreground: #0f172a;
  --primary: #10b981;
  --primary-light: #34d399;
  --primary-dark: #059669;
}

html {
  scroll-behavior: smooth;
}

body {
  antialiased: true;
}

::selection {
  background: rgba(16, 185, 129, 0.2);
  color: #064e3b;
}

.site-container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1680px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 640px) {
  .site-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (min-width: 1024px) {
  .site-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}

.admin-shell {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.admin-sidebar {
  flex-shrink: 0;
  width: 256px;
  transition: width 0.2s ease;
}

.admin-sidebar--collapsed {
  width: 72px;
}

.admin-main {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  background-color: #10b981;
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: background-color 0.15s;
}
.btn-primary:hover {
  background-color: #34d399;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #10b981;
  background: transparent;
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 0.75rem;
  transition: all 0.15s;
}
.btn-outline:hover {
  background-color: rgba(16, 185, 129, 0.1);
}

.admin-input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: #f8fafc;
  background-color: #020617;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  outline: none;
}
.admin-input:focus {
  border-color: rgba(16, 185, 129, 0.5);
}

.store-input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: #0f172a;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  outline: none;
}
.store-input:focus {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in {
  animation: fade-in 0.2s ease-out;
}

.mega-overlay {
  position: fixed;
  inset: 0;
  top: calc(72px + 36px);
  background: rgba(0, 0, 0, 0.25);
  z-index: 30;
}

@media (min-width: 1024px) {
  .mega-overlay {
    top: calc(80px + 36px);
  }
}

/* Rich text (product description) — Tailwind preflight resets lists/headings/margins */
.rich-content {
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }
.rich-content p,
.rich-content div { margin: 0 0 0.75rem; }
.rich-content h1,
.rich-content h2 { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 1.5rem 0 0.75rem; line-height: 1.4; }
.rich-content h3 { font-size: 1.0625rem; font-weight: 600; color: #0f172a; margin: 1.25rem 0 0.5rem; }
.rich-content h4,
.rich-content h5,
.rich-content h6 { font-size: 0.9375rem; font-weight: 600; color: #1e293b; margin: 1rem 0 0.5rem; }
.rich-content ul,
.rich-content ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin: 0.25rem 0; }
.rich-content li > p { margin: 0; }
.rich-content strong,
.rich-content b { font-weight: 600; color: #1e293b; }
.rich-content em,
.rich-content i { font-style: italic; }
.rich-content u { text-decoration: underline; }
.rich-content a { color: #059669; text-decoration: underline; }
.rich-content a:hover { color: #10b981; }
.rich-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  border-radius: 0.75rem;
}
.rich-content figure { margin: 1rem 0; }
.rich-content figcaption { font-size: 0.8125rem; color: #64748b; text-align: center; margin-top: 0.5rem; }
.rich-content blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid #10b981;
  background: #f8fafc;
  color: #475569;
}
.rich-content pre {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background: #f1f5f9;
  border-radius: 0.5rem;
  white-space: pre-wrap;
}
.rich-content hr { margin: 1.25rem 0; border-color: #e2e8f0; }
.rich-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 1rem;
}
.rich-content th,
.rich-content td { border: 1px solid #e2e8f0; padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.rich-content th { background: #f8fafc; font-weight: 600; color: #0f172a; }
.rich-content .ql-align-center { text-align: center; }
.rich-content .ql-align-right { text-align: right; }
.rich-content .ql-align-justify { text-align: justify; }
.rich-content .ql-indent-1 { padding-left: 2rem; }
.rich-content .ql-indent-2 { padding-left: 4rem; }
.rich-content .ql-indent-3 { padding-left: 6rem; }
