:root {
  --bg: #f6f3ec;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #171717;
  --muted: #6e6a63;
  --line: rgba(23, 23, 23, 0.08);
  --shadow: 0 24px 60px rgba(26, 22, 16, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
  color: var(--text);
}

body.auth-body,
body.admin-body {
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(23, 23, 23, 0.22);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.announcement-bar {
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(251, 250, 247, 0.75);
  border-bottom: 1px solid rgba(23, 23, 23, 0.04);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand.large {
  font-size: 3rem;
}

.brand span {
  color: #7b6b4e;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a,
.text-link,
.auth-links a {
  color: var(--muted);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ghost-btn,
.secondary-btn,
.small-btn,
.filter-pill,
.icon-button,
.icon-circle,
.qty-btn {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-btn,
.cart-button {
  background: #171717;
  color: #fff;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.cart-button,
.small-btn {
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.cart-button:hover,
.small-btn:hover,
.icon-circle:hover,
.filter-pill:hover {
  transform: translateY(-1px);
}

.cart-button span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero-copy h1,
.auth-brand-panel h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0.5rem 0 1rem;
}

.hero-text,
.feature-card p,
.auth-brand-panel p,
.auth-form label span,
.helper-text,
.upload-box span,
.faq-list p,
.product-content p,
.modal-copy p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-card,
.card-surface,
.product-card,
.feature-card,
.stat-card,
.upload-box,
.modal-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(24px);
}

.hero-card {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.paper-stack {
  position: relative;
  width: min(420px, 100%);
  height: 300px;
}

.paper {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 180px;
  height: 240px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f2ee 100%);
  box-shadow: 0 24px 40px rgba(26, 22, 16, 0.08);
}

.paper.back {
  transform: rotate(10deg) translateX(70px);
}

.paper.middle {
  transform: rotate(-10deg) translateX(10px);
}

.paper.front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
}

.paper-mark {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.paper.front p {
  margin: 0.25rem 0 0;
  letter-spacing: 0.35em;
  font-size: 0.78rem;
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  color: #8c7d60;
  font-weight: 700;
}

.controls-section,
.product-section,
.feature-section,
.faq-section {
  padding: 2rem 0 4rem;
}

.controls-grid,
.section-heading,
.summary-row,
.cart-item,
.cart-header,
.row,
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.controls-grid {
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
}

.filter-pill.active {
  background: #171717;
  color: #fff;
}

.search-box {
  margin-left: auto;
  min-width: 280px;
}

.search-box span,
.auth-form label span,
.admin-form label span {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.section-heading h2,
.modal-copy h3,
.admin-topbar h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.section-heading.narrow {
  justify-content: flex-start;
}

.section-heading.compact h2 {
  font-size: 1.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.product-card {
  overflow: hidden;
}

.product-visual {
  position: relative;
  min-height: 260px;
  padding: 1rem;
  background: linear-gradient(180deg, #f4f1ea 0%, #efebe3 100%);
}

.product-visual.large {
  min-height: 360px;
}

.product-visual.image-visual {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

.product-cover-image,
.detail-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-sheet {
  width: 150px;
  height: 185px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f4f0 100%);
  border-radius: 18px;
  margin: 1.25rem auto 0;
  padding: 1.25rem;
  box-shadow: 0 18px 32px rgba(26, 22, 16, 0.08);
}

.sheet-notch {
  width: 48px;
  height: 8px;
  border-radius: 999px;
  background: #171717;
  margin-bottom: 1.5rem;
}

.product-sheet strong {
  font-size: 2rem;
}

.product-sheet p,
.product-category {
  color: #b1a691;
  font-size: 0.82rem;
}

.product-content {
  padding: 1.25rem;
}

.product-content h3,
.cart-item h4,
.feature-card h3,
.modal-copy h4 {
  margin: 0.35rem 0 0.6rem;
  letter-spacing: -0.03em;
}

.product-footer,
.product-actions,
.cart-item-actions,
.auth-links,
.admin-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.icon-circle,
.qty-btn,
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.stat-card,
.upload-box,
.tracking-surface {
  padding: 1.5rem;
}

.product-detail-page {
  padding: 3rem 0 5rem;
}

.detail-page-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
}

.detail-media,
.detail-copy {
  padding: 1.5rem;
}

.detail-media {
  min-height: 520px;
}

.detail-visual-fallback {
  min-height: 480px;
}

.detail-copy h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-price {
  display: inline-block;
  margin: 1rem 0 1.5rem;
  font-size: 2rem;
}

.detail-action-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.detail-block {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-list details {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.cart-drawer.open {
  pointer-events: auto;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  background: rgba(248, 246, 241, 0.97);
  border-left: 1px solid var(--line);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer.open .cart-overlay {
  opacity: 1;
}

.cart-drawer.open .cart-panel {
  transform: translateX(0);
}

.cart-items {
  flex: 1;
  overflow: auto;
  display: grid;
  gap: 0.85rem;
}

.cart-item {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
}

.full-width,
.full-span {
  width: 100%;
}

.hidden {
  display: none !important;
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 920px;
  width: calc(100% - 24px);
}

.modal::backdrop {
  background: rgba(17, 17, 17, 0.36);
}

.modal-card {
  position: relative;
  padding: 1.25rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.modal-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.25rem;
}

.modal-copy {
  padding: 1.5rem 1rem 1.5rem 0;
}

.modal-price {
  display: inline-block;
  margin: 1rem 0 1.5rem;
  font-size: 1.6rem;
}

.content-list {
  padding-left: 1.1rem;
  color: var(--muted);
}

.empty-state {
  padding: 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed rgba(23, 23, 23, 0.12);
  color: var(--muted);
}

.empty-state.small {
  padding: 1rem;
}

.checkout-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-form,
.checkout-result,
.payment-notify-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.result-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.bank-box {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

.auth-brand-panel,
.auth-form-panel {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand-panel {
  background: linear-gradient(180deg, #f7f3ea 0%, #f0e8d9 100%);
}

.auth-form {
  display: grid;
  gap: 1rem;
  padding: 2rem;
}

.auth-form.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  border-right: 1px solid var(--line);
  padding: 2rem 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(18px);
}

.admin-nav {
  display: grid;
  gap: 0.5rem;
  margin-top: 2rem;
}

.admin-nav a {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}

.admin-main {
  padding: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.stat-card strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 2rem;
}

.admin-content-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.sticky-card {
  position: sticky;
  top: 2rem;
  padding: 1.5rem;
}

.admin-form,
.admin-list-column,
.admin-products-list {
  display: grid;
  gap: 1rem;
}

.admin-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.admin-product-row p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.admin-product-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.delete-tone {
  color: #8a2e2e;
}

.success-text {
  color: #276749;
}

.error-text {
  color: #9b2c2c;
}

.table-like {
  display: grid;
  gap: 0.5rem;
}

.row {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.row-5 {
  display: grid;
  grid-template-columns: 1fr 1fr 120px 140px auto;
  align-items: center;
  gap: 0.75rem;
}

.row-6 {
  display: grid;
  grid-template-columns: 1fr 1fr 120px 140px 140px auto;
  align-items: center;
  gap: 0.75rem;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.inline-actions select {
  min-width: 160px;
}

.row.header {
  background: transparent;
  font-weight: 700;
}

.upload-box {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(23, 23, 23, 0.16);
}

.order-detail-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.order-detail-header {
  margin-bottom: 1rem;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.detail-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.detail-items {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.detail-item-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(246, 243, 236, 0.75);
}

.image-preview-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.image-preview-card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

@media (max-width: 1080px) {
  .product-grid,
  .stats-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .modal-layout,
  .auth-layout,
  .admin-content-grid,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }
}

.stacked-links {
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 720px) {
  .desktop-nav,
  .text-link {
    display: none;
  }

  .header-inner,
  .controls-grid,
  .product-footer,
  .section-heading,
  .cart-header,
  .summary-row,
  .admin-topbar,
  .admin-product-row,
  .row-5,
  .row-6,
  .detail-item-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-copy h1,
  .auth-brand-panel h1 {
    font-size: 2.8rem;
  }

  .product-grid,
  .feature-grid,
  .stats-grid,
  .auth-form.two-columns,
  .checkout-grid,
  .order-detail-grid,
  .detail-page-grid {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel,
  .auth-form-panel,
  .admin-main {
    padding: 1.25rem;
  }

  .search-box {
    min-width: 100%;
  }

  .cart-panel {
    width: 100%;
  }
}