:root {
  --bg: #efe3d3;
  --bg-soft: #f7f1e8;
  --panel: rgba(255, 251, 245, 0.78);
  --panel-solid: #fffaf2;
  --text: #2d221a;
  --muted: #6d5949;
  --line: rgba(76, 54, 37, 0.16);
  --accent: #8b5e3c;
  --accent-deep: #613d23;
  --shadow: 0 18px 50px rgba(74, 45, 19, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 244, 219, 0.75), transparent 35%),
    linear-gradient(180deg, #e7d6c0 0%, #f4ede3 48%, #fbf8f2 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.hero {
  min-height: 100vh;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(rgba(46, 29, 16, 0.35), rgba(46, 29, 16, 0.35)),
    url("https://images.unsplash.com/photo-1517705008128-361805f42e86?auto=format&fit=crop&w=1600&q=80")
      center/cover;
  color: #fff8ef;
}

.topbar,
.hero-inner,
.section,
.footer,
.admin-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 600;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 239, 0.45);
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.12);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  overflow: hidden;
}

.brand-mark-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name,
.admin-link {
  backdrop-filter: blur(8px);
}

.admin-link,
.hero-cta,
.button {
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.admin-link,
.hero-cta {
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(255, 248, 239, 0.4);
  background: rgba(255, 248, 239, 0.12);
}

.admin-link:hover,
.hero-cta:hover,
.button:hover {
  transform: translateY(-1px);
}

.hero-inner {
  padding: 4rem 0 6rem;
}

.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  opacity: 0.85;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.95;
}

h1 {
  max-width: 8ch;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
}

h3 {
  font-size: 2rem;
  font-weight: 600;
}

.hero-subtitle,
.panel-copy,
.about-bio,
.status-message {
  line-height: 1.7;
  color: inherit;
}

.hero-subtitle {
  max-width: 38rem;
  margin: 1.25rem 0 2rem;
  font-size: 1.05rem;
}

.hero-cta {
  display: inline-flex;
  width: fit-content;
  color: #fff8ef;
}

.section {
  padding: 5rem 0;
}

.section-heading {
  margin-bottom: 2.2rem;
}

.about-card,
.admin-panel,
.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.about-card {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 2rem;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
}

.about-photo-wrap {
  min-height: 360px;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 8px);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 0.6rem 1.25rem 0;
}

.about-name {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-family: "Cormorant Garamond", serif;
}

.gallery-status {
  margin-bottom: 1rem;
  color: var(--muted);
}

.tag-filter-bar,
.tag-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-filter-bar {
  margin-bottom: 1.2rem;
}

.tag-button {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(45, 34, 26, 0.72);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.tag-button:hover {
  transform: translateY(-1px);
}

.tag-button.is-active {
  background: var(--text);
  color: #fff8ef;
  border-color: var(--text);
}

.tag-choice {
  position: relative;
}

.tag-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gallery-grid {
  column-count: 3;
  column-gap: 1.25rem;
}

.gallery-item {
  position: relative;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  break-inside: avoid;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: auto;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45rem;
  padding: 1.25rem;
  color: #fff8ef;
  background: linear-gradient(180deg, rgba(38, 26, 19, 0.05), rgba(38, 26, 19, 0.82));
  opacity: 0;
  transition: opacity 180ms ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-within .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  font-size: 2rem;
}

.gallery-overlay p {
  margin: 0;
  line-height: 1.55;
}

.footer {
  padding: 0 0 3rem;
  color: var(--muted);
}

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(219, 191, 145, 0.3), transparent 30%),
    linear-gradient(180deg, #f1e4d2 0%, #f8f2eb 100%);
}

.admin-shell {
  padding: 3rem 0 5rem;
}

.admin-panel,
.admin-card {
  border-radius: var(--radius-lg);
}

.admin-panel {
  padding: 2rem;
}

.admin-card {
  padding: 1.5rem;
}

.tabset {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
}

.tab-button {
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(97, 61, 35, 0.22);
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.tab-button:hover {
  transform: translateY(-1px);
}

.tab-button.is-active {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff8ef;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.admin-header,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.95rem;
  color: var(--muted);
}

.tag-button-group {
  margin-top: 0.45rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(76, 54, 37, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
}

.button {
  width: fit-content;
  padding: 0.9rem 1.35rem;
  background: var(--accent);
  color: #fff8ef;
  cursor: pointer;
}

.button-secondary {
  background: transparent;
  color: var(--accent-deep);
  border: 1px solid rgba(97, 61, 35, 0.2);
}

.status-message {
  min-height: 1.6rem;
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

.hidden-by-filter {
  display: none !important;
}

.products-list {
  display: grid;
  gap: 1rem;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 1rem;
  align-items: end;
}

.upload-field {
  min-width: 0;
}

.product-image-preview {
  width: 140px;
  height: 140px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.66);
}

.product-row img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
}

.product-row h4,
.product-row p {
  margin: 0;
}

.product-row p {
  color: var(--muted);
}

.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.product-tag-pill {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(97, 61, 35, 0.1);
  color: var(--accent-deep);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .gallery-grid {
    column-count: 2;
  }

  .about-card {
    grid-template-columns: 1fr;
  }

  .about-photo-wrap {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
  }

  .topbar,
  .admin-header,
  .button-row,
  .product-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-grid {
    column-count: 1;
  }

  .upload-row {
    grid-template-columns: 1fr;
  }

  .product-row {
    grid-template-columns: 1fr;
  }
}
