:root {
  /* Warm, homely palette: cream paper, turmeric yellow, terracotta. */
  --bg: #fbf6ee;
  --bg-soft: #f5ecdd;
  --surface: #ffffff;
  --text: #3b2a20;
  --muted: #8a7462;
  --border: #eadfcd;
  --accent: #c8553d;
  --accent-text: #ffffff;
  --sun: #f2b33d;
  --sun-soft: #fde9bf;
  --danger: #b3261e;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(59 42 32 / 6%), 0 8px 24px rgb(59 42 32 / 7%);
  --font-display: 'Baloo Tamma 2', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}
h1,
h2 {
  font-family: var(--font-display);
  line-height: 1.15;
}
img {
  max-width: 100%;
  display: block;
}
[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 48px;
}
.narrow {
  max-width: 640px;
}
.center {
  text-align: center;
  padding-top: 80px;
}
.muted {
  color: var(--muted);
  font-weight: normal;
}
.small {
  font-size: 0.85rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Public page */
.hero {
  text-align: center;
  padding: 36px 16px 24px;
  background:
    radial-gradient(circle at 15% 20%, var(--sun-soft) 0 90px, transparent 91px),
    radial-gradient(circle at 88% 70%, #f8dccf 0 70px, transparent 71px), var(--bg);
}
.avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--sun), var(--accent));
}
.avatar img,
.avatar span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg);
  object-fit: cover;
}
.avatar span {
  display: grid;
  place-items: center;
  background: var(--sun-soft);
  font: 700 2.4rem/1 var(--font-display);
  color: var(--accent);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 700;
}
.hero h1 a {
  color: inherit;
  text-decoration: none;
}
.tagline-kn {
  margin: 4px 0 0;
  font: 600 1.05rem/1.4 var(--font-display);
  color: var(--accent);
}
.tagline {
  color: var(--muted);
  margin: 6px auto 0;
  max-width: 460px;
}
.insta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.section-title {
  margin: 8px 0 12px;
  font-size: 1.4rem;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 12px;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.tab span {
  color: var(--muted);
  font-size: 0.85em;
  margin-left: 2px;
}
.tab.is-active {
  background: var(--sun);
  border-color: var(--sun);
}
.tab.is-active span {
  color: inherit;
  opacity: 0.7;
}

.search {
  position: relative;
  display: block;
  margin: 4px 0 10px;
}
.search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font: inherit;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.search input:focus {
  outline: 2px solid var(--sun);
  outline-offset: 1px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
}
.chips-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px dashed var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
}
.chip.is-active {
  background: var(--accent);
  border-style: solid;
  color: var(--accent-text);
}

.disclosure {
  margin: 4px 0 0;
  font-size: 0.75rem;
  opacity: 0.8;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgb(59 42 32 / 8%),
    0 14px 32px rgb(59 42 32 / 12%);
}
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.card-img {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
/* No image: a soft colour tile with the first letter, cycling through the palette. */
.card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font: 700 3.4rem/1 var(--font-display);
  color: var(--accent);
  background: var(--sun-soft);
}
.card:nth-child(4n + 2) .card-placeholder {
  background: #f8dccf;
  color: #9c3f2c;
}
.card:nth-child(4n + 3) .card-placeholder {
  background: #dcebd6;
  color: #4d6b3c;
}
.card:nth-child(4n + 4) .card-placeholder {
  background: #dfe6f2;
  color: #3f5a85;
}
.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-title {
  font-size: 1.02rem;
  margin: 0;
  font-weight: 600;
}
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.buy {
  margin-top: auto;
  align-self: stretch;
  text-align: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.88rem;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}
.badge-amazon {
  background: #ff9900;
  color: #111;
}
.badge-flipkart {
  background: #2874f0;
  color: #fff;
}
.badge-myntra {
  background: #ff3f6c;
  color: #fff;
}
.badge-meesho {
  background: #9f2089;
  color: #fff;
}
.badge-nykaa {
  background: #fc2779;
  color: #fff;
}
.badge-ajio {
  background: #2c4152;
  color: #fff;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 16px 32px;
}

/* Admin */
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.admin-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}
.admin-nav form {
  margin: 0;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.flash {
  max-width: 1048px;
  margin: 0 auto 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
@media (max-width: 1080px) {
  .flash {
    margin: 0 16px 16px;
  }
}

.admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-title h1 {
  margin: 0;
  font-size: 1.5rem;
}
.admin-title .muted {
  font-size: 0.9rem;
  margin-left: 6px;
}

.admin-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
}
.admin-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-item.is-hidden {
  opacity: 0.55;
}
.admin-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.admin-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-actions form {
  margin: 0;
}
@media (min-width: 720px) {
  .admin-item {
    grid-template-columns: 56px 1fr auto;
  }
  .admin-actions {
    grid-column: auto;
  }
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn-danger {
  color: var(--danger);
}

.form {
  display: grid;
  gap: 16px;
}
.form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.form input:not([type='checkbox']),
.form textarea {
  font: inherit;
  font-weight: normal;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.form .check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form .check input {
  width: 18px;
  height: 18px;
}
.hint {
  font-weight: normal;
  font-size: 0.85rem;
  color: var(--muted);
}
.error {
  font-weight: normal;
  font-size: 0.85rem;
  color: var(--danger);
  margin: 0;
}

.login {
  max-width: 360px;
  margin: 0 auto;
  padding: 80px 16px;
}
.login h1 {
  margin: 0;
}
.login .muted {
  margin: 4px 0 24px;
}
