:root {
  --ink: #1f2933;
  --muted: #64717f;
  --line: #dce3e8;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --mint: #3aa987;
  --mint-dark: #24785f;
  --coral: #ef7b63;
  --gold: #d8a448;
  --shadow: 0 18px 45px rgba(31, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(251, 252, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.account-link.hidden {
  display: none;
}

.brand,
.header-actions,
.nav,
.hero-actions,
.filters,
.blog-meta {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
}

.nav {
  gap: 24px;
  color: var(--muted);
  font-weight: 600;
}

.header-actions,
.hero-actions {
  gap: 10px;
}

.ghost-btn,
.secondary-btn,
.cart-button,
.primary-btn,
.icon-btn {
  border: 0;
  cursor: pointer;
}

.ghost-btn,
.secondary-btn {
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-weight: 700;
}

.primary-btn,
.cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 8px;
  color: white;
  background: var(--mint-dark);
  font-weight: 800;
}

.cart-button strong {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background: #f9d86e;
  font-size: 13px;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(36px, 6vw, 78px) clamp(18px, 6vw, 86px);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-showcase {
  display: grid;
  gap: 16px;
  align-self: stretch;
  align-content: center;
}

.hero-showcase img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-showcase div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-left: 5px solid var(--gold);
  background: #fff7df;
  border-radius: 8px;
}

.section-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: #eef8f4;
}

.section-strip div {
  display: grid;
  gap: 4px;
  padding: 22px clamp(14px, 3vw, 34px);
  border-right: 1px solid var(--line);
}

.section-strip span,
.process-list span,
.product-card p,
.blog-card p,
.section-note,
.blog-detail-copy p,
.contact-section p,
.custom-section p {
  color: var(--muted);
  line-height: 1.6;
}

.page-section,
.products-section,
.blog-section,
.custom-section,
.contact-section {
  padding: 74px clamp(18px, 6vw, 86px);
}

.section-heading,
.custom-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.page-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.filters {
  gap: 10px;
  justify-content: flex-end;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(58, 169, 135, 0.16);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.blog-section {
  background: #eef8f4;
}

.section-note {
  margin: 0;
  max-width: 560px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.blog-list {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.blog-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.blog-row img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
}

.blog-row-body {
  display: grid;
  align-content: start;
  gap: 12px;
}

.blog-row-body h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.blog-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.blog-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.blog-card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.blog-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.blog-meta {
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.product-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.tag {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--mint-dark);
  background: #e7f5ef;
  font-size: 12px;
  font-weight: 800;
}

.price {
  color: var(--coral);
  font-size: 20px;
  font-weight: 800;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: auto;
}

.process-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.contact-section {
  background: #f7f0e4;
}

.contact-form,
.checkout,
.auth-form {
  display: grid;
  gap: 12px;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(460px, 100vw);
  padding: 22px;
  background: white;
  transform: translateX(100%);
  transition: transform 0.24s ease;
  box-shadow: var(--shadow);
}

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

.drawer-header,
.cart-row,
.cart-total,
.quantity-row,
.auth-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eef1f2;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.cart-items {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 4px;
}

.cart-row {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-row img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-row-info {
  flex: 1;
  display: grid;
  gap: 8px;
}

.quantity-row button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.checkout {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cart-total {
  font-size: 18px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: rgba(31, 41, 51, 0);
  transition: background 0.24s ease;
}

.overlay.show {
  pointer-events: auto;
  background: rgba(31, 41, 51, 0.42);
}

.modal {
  width: min(920px, calc(100vw - 26px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(31, 41, 51, 0.48);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 24px;
  padding: 28px;
}

.blog-modal {
  width: min(860px, calc(100vw - 26px));
}

#blogDetail img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

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

.blog-detail-copy h2 {
  padding-right: 44px;
}

.blog-detail-copy .lead {
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
}

.article-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px clamp(18px, 5vw, 60px) 86px;
}

.article-hero {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 22px;
}

.article-body {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 28px auto 0;
}

.article-body h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.article-body p {
  color: var(--ink);
  line-height: 1.85;
  font-size: 17px;
}

.article-body .lead {
  color: var(--muted);
  font-size: 20px;
  font-weight: 600;
}

.back-link {
  width: fit-content;
}

.checkout-page,
.account-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 24px;
  margin-top: 30px;
}

.checkout-list,
.profile-panel,
.orders-panel,
.empty-state {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.checkout-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

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

.checkout-row div {
  display: grid;
  gap: 6px;
}

.order-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.order-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.contact-info {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  font-weight: 700;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.detail-layout img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.detail-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 42px;
}

.detail-meta {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: #f4f7f5;
}

.auth-modal {
  width: min(420px, calc(100vw - 26px));
  padding: 24px;
}

.auth-tabs {
  justify-content: flex-start;
  margin-bottom: 16px;
}

.auth-tabs button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 800;
}

.auth-tabs button.active {
  color: white;
  background: var(--ink);
}

.hidden {
  display: none;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--mint-dark);
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 80;
  transform: translate(-50%, 80px);
  padding: 12px 16px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  opacity: 0;
  transition: 0.24s ease;
  font-weight: 700;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 1050px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero,
  .section-heading,
  .checkout-page,
  .account-page,
  .custom-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: stretch;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
  }

  .hero {
    min-height: auto;
  }

  .hero-actions,
  .filters,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section-strip,
  .product-grid,
  .blog-grid,
  .blog-row,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .blog-row img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .checkout-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .checkout-row .quantity-row {
    grid-column: 1 / -1;
  }

  .detail-copy {
    padding-right: 0;
  }

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