:root {
  --surface: rgba(255, 250, 241, 0.9);
  --surface-strong: #fffaf1;
  --panel: #14342d;
  --panel-soft: #204a40;
  --text: #1d221e;
  --muted: #58645c;
  --line: rgba(20, 52, 45, 0.12);
  --accent: #b96b2f;
  --accent-deep: #8c4d1d;
  --shadow: 0 24px 60px rgba(20, 52, 45, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(185, 107, 47, 0.18), transparent 34%),
    linear-gradient(180deg, #efe7d5 0%, #f8f4eb 35%, #eef2eb 100%);
}

body > * {
  width: 85%;
  margin-inline: auto;
}

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

button,
select,
input,
textarea {
  font: inherit;
}

.site-shell,
.admin-shell {
  min-height: 100vh;
}

.hero,
.admin-shell {
  padding: 24px clamp(20px, 4vw, 56px) 56px;
}

.topbar,
.order-summary,
.admin-header,
.admin-heading,
.admin-actions,
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand > div {
  display: grid;
  gap: 6px;
}

.brand span,
.section-copy,
.product-description,
.checkout-text,
.payment-note,
.empty-state p,
.value-grid p,
.timeline-item span,
.timeline-item small,
.order-detail p,
.field-hint {
  color: var(--muted);
}

.brand span {
  margin: 0;
  font-size: 0.92rem;
  padding-left: 10px;
}

.brand-logo {
  width: min(460px, 62vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(20, 52, 45, 0.08));
}

.hero-grid,
.admin-grid,
.orders-layout,
.product-grid,
.value-grid,
.checkout-form {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: 1.3fr 0.9fr;
  gap: 28px;
  margin-top: 44px;
}

.hero-copy,
.hero-panel,
.section,
.cart-drawer,
.card {
  backdrop-filter: blur(14px);
}

.hero-copy,
.section,
.card {
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(28px, 4vw, 52px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", serif;
  line-height: 1.04;
}

h1 {
  margin-bottom: 16px;
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 5rem);
}

.admin-header h1,
.admin-login h1 {
  max-width: none;
}

.hero-text,
.section-copy,
.value-grid p,
.checkout-text {
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.hero-stats div,
.value-grid article,
.admin-list-item,
.existing-image-card,
.timeline-item,
.order-item-row,
.order-detail,
.empty-state,
.checkout-box,
.cart-row {
  padding: 16px;
  border-radius: 20px;
  background: rgba(20, 52, 45, 0.05);
  border: 1px solid var(--line);
}

.hero-panel {
  position: relative;
  min-height: 100%;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(20, 52, 45, 0.12), rgba(20, 52, 45, 0.48)),
    url("/assets/images/hero-texture.svg") center/cover;
  box-shadow: var(--shadow);
}

.featured-card {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: #f7f1e4;
  border-radius: 32px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.featured-label {
  margin: 0 0 10px;
  color: #e7c39b;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.featured-meta,
.section-heading,
.admin-form-actions,
.order-meta,
.order-columns {
  display: flex;
  gap: 12px;
}

.featured-meta {
  flex-wrap: wrap;
  margin-top: 18px;
}

.featured-meta span {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(247, 241, 228, 0.12);
}

.featured-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.featured-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 250, 241, 0.36);
  cursor: pointer;
}

.featured-dot.active {
  background: #f7f1e4;
}

.section {
  margin: 0 clamp(20px, 4vw, 56px) 28px;
}

.section-heading {
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading h2 {
  max-width: 18ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-chip {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(20, 52, 45, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--panel);
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active {
  background: linear-gradient(145deg, var(--panel-soft), var(--panel));
  color: #f7f1e4;
  border-color: transparent;
}

.value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.product-media {
  position: relative;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #dae1db;
}

.product-media-actions {
  position: absolute;
  inset: auto 14px 14px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.media-control {
  min-height: 40px;
  min-width: 40px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 52, 45, 0.74);
  color: #f7f1e4;
  font-weight: 800;
  cursor: pointer;
}

.media-control.zoom {
  justify-self: center;
}

.gallery-strip,
.image-preview-grid,
.timeline,
.admin-list,
.cart-items {
  display: grid;
  gap: 12px;
}

.gallery-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compact-gallery {
  gap: 8px;
}

.gallery-thumb-button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
}

.gallery-thumb-button.active {
  border-color: rgba(20, 52, 45, 0.36);
}

.gallery-thumb,
.existing-image-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
}

.product-body,
.admin-form,
.cart-footer,
.totals {
  display: grid;
  gap: 14px;
}

.product-card .product-body {
  gap: 10px;
  padding: 16px;
}

.product-card .product-heading h3 {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.product-card .product-description {
  font-size: 0.92rem;
}

.listing-actions {
  display: grid;
  gap: 8px;
}

.product-link,
.product-title-link {
  color: inherit;
  text-decoration: none;
}

.product-title-link:hover {
  text-decoration: underline;
}

.product-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.product-badge {
  margin: 0 0 6px;
  color: var(--accent-deep);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(20, 52, 45, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fffdfa;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.button,
.cart-button,
.icon-button,
.remove-button,
.admin-list-item {
  border: 0;
  cursor: pointer;
}

.button,
.cart-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.button:hover,
.cart-button:hover,
.icon-button:hover,
.remove-button:hover,
.admin-list-item:hover {
  transform: translateY(-1px);
}

.button.primary,
.cart-button {
  background: linear-gradient(145deg, var(--panel-soft), var(--panel));
  color: #f7f1e4;
}

.button.secondary {
  background: rgba(20, 52, 45, 0.08);
  color: var(--panel);
}

.button.ghost {
  background: transparent;
  color: var(--panel);
  border: 1px solid rgba(20, 52, 45, 0.18);
}

.header-link {
  min-height: 42px;
}

.full {
  width: 100%;
}

.cart-button {
  gap: 12px;
}

.cart-button span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.16);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(460px, 100%);
  height: 100vh;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  background: rgba(255, 250, 241, 0.96);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(20, 52, 45, 0.14);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(20, 52, 45, 0.08);
  font-size: 1.6rem;
  line-height: 1;
}

.cart-items {
  overflow: auto;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.cart-controls {
  display: grid;
  gap: 10px;
  min-width: 96px;
}

.remove-button {
  min-height: 40px;
  border-radius: 14px;
  background: rgba(185, 107, 47, 0.12);
  color: var(--accent-deep);
  font-weight: 800;
}

.checkout-box,
.empty-state,
.order-detail {
  padding: 20px;
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.grand-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 1.08rem;
}

.checkout-form {
  grid-template-columns: 1fr;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(14, 22, 19, 0.4);
}

.image-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(8, 13, 11, 0.78);
}

.image-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  width: min(92vw, 980px);
  max-height: 90vh;
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 250, 241, 0.98);
  box-shadow: var(--shadow);
}

.image-modal img {
  width: 100%;
  max-height: calc(90vh - 40px);
  object-fit: contain;
  border-radius: 18px;
}

.image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 52, 45, 0.9);
  color: #f7f1e4;
  font-size: 1.5rem;
  cursor: pointer;
}

.detail-section {
  padding: clamp(30px, 4vw, 48px);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}

.detail-image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #f2ecdf;
}

.detail-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-media-actions {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.detail-copy {
  display: grid;
  gap: 16px;
}

.detail-title {
  max-width: none;
  margin-bottom: 0;
}

.detail-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--panel);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-thumbs {
  margin-top: 14px;
}

.admin-body {
  min-height: 100vh;
}

.admin-login {
  max-width: 560px;
  margin: 48px auto;
}

.admin-grid,
.orders-layout {
  grid-template-columns: 0.9fr 1.1fr;
  margin-top: 24px;
}

.admin-list-item {
  display: grid;
  gap: 6px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
}

.admin-list-item.selected {
  border: 1px solid rgba(32, 74, 64, 0.32);
  background: rgba(20, 52, 45, 0.08);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle input {
  width: auto;
}

.existing-image-card {
  display: grid;
  gap: 10px;
}

.existing-image-card input {
  width: auto;
}

.orders-layout {
  align-items: start;
}

.order-detail {
  min-height: 420px;
}

.order-columns {
  align-items: start;
  justify-content: stretch;
}

.order-columns > div {
  flex: 1;
}

.order-item-row {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.timeline-item {
  display: grid;
  gap: 4px;
}

@media (max-width: 1080px) {
  .hero-grid,
  .admin-grid,
  .orders-layout,
  .product-grid,
  .detail-layout,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body > * {
    width: calc(100% - 24px);
  }

  .hero,
  .admin-shell {
    padding-inline: 16px;
  }

  .section {
    margin-inline: 16px;
  }

  .topbar,
  .topbar-actions,
  .section-heading,
  .admin-header,
  .admin-actions,
  .product-heading,
  .detail-actions,
  .cart-row,
  .order-summary,
  .order-columns {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-logo {
    width: min(340px, 82vw);
  }
}
