:root {
  --ink: #17211c;
  --paper: #f5f1e9;
  --cream: #fbf8f2;
  --sage: #a8b49f;
  --line: rgba(23, 33, 28, .16);
  --muted: #69716b;
  --danger: #a63d32;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; margin-bottom: 18px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow.light, .wordmark.light { color: var(--paper); }
.brand-logo { display: block; }
.brand-logo img { width: 100%; height: auto; }
.brand-logo-login { position: absolute; top: 38px; width: 290px; }
.brand-logo-header { width: 185px; }
.brand-logo-footer { width: 240px; filter: invert(1); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.045em; line-height: .98; }
h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(38px, 5vw, 68px); }
h1 em, h2 em { font-family: "Playfair Display", Georgia, serif; font-weight: 500; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--cream); }
.login-art { min-height: 100vh; padding: 56px; display: flex; flex-direction: column; justify-content: flex-end; color: white; background: linear-gradient(180deg, rgba(16,28,21,.05), rgba(16,28,21,.48)), url("/images/cleanser.png") center/cover; }
.login-art p { margin: 0; font-size: clamp(46px, 6vw, 84px); letter-spacing: -.055em; line-height: .95; }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(430px, 100%); min-height: 630px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.login-card h1 { margin-bottom: 24px; font-size: 58px; }
.login-card .muted { font-size: 15px; line-height: 1.65; }
.login-card small { margin-top: 22px; color: var(--muted); text-align: center; }

.field { display: grid; gap: 9px; margin: 14px 0; }
.field > span { font-size: 12px; font-weight: 600; }
.field small { margin: 0; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; outline: 0; background: rgba(255,255,255,.5); padding: 15px 16px; transition: border .2s, background .2s; }
input:focus, textarea:focus { border-color: var(--ink); background: white; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 75px; }
.text-button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 12px; font-weight: 600; cursor: pointer; }
.form-error { min-height: 20px; margin: 6px 0; color: var(--danger); font-size: 13px; }
.button { min-height: 50px; display: inline-flex; justify-content: space-between; align-items: center; gap: 40px; padding: 0 20px; border: 1px solid var(--ink); cursor: pointer; font-weight: 600; font-size: 13px; transition: transform .2s, background .2s, color .2s; }
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.button-dark { background: var(--ink); color: white; }
.button-outline { background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--ink); color: white; }
.button-wide { width: 100%; }

.site-header { position: sticky; top: 0; z-index: 20; height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 clamp(22px, 5vw, 72px); background: rgba(245,241,233,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.site-header nav { display: flex; gap: 34px; font-size: 12px; font-weight: 600; }
.nav-button { padding: 0; border: 0; background: none; font-weight: 600; cursor: pointer; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.icon-button { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cart-button { min-width: 106px; height: 40px; display: flex; justify-content: space-between; align-items: center; padding: 0 6px 0 14px; border: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; }
.cart-count { min-width: 27px; height: 27px; display: grid; place-items: center; background: var(--ink); color: white; border-radius: 50%; }

.hero { min-height: calc(100vh - 78px); display: grid; grid-template-columns: 1fr 1fr; }
.hero-copy { padding: 9vw 6vw 8vw clamp(24px, 8vw, 130px); display: flex; flex-direction: column; justify-content: center; }
.hero-copy h1 { max-width: 760px; margin-bottom: 36px; }
.hero-copy p { max-width: 470px; margin-bottom: 40px; color: var(--muted); line-height: 1.7; }
.hero-copy .button { align-self: flex-start; }
.hero-image { min-height: 600px; position: relative; overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.image-note { position: absolute; right: 24px; bottom: 20px; padding: 8px 12px; background: rgba(250,248,241,.9); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.products-section { padding: 120px clamp(22px, 5vw, 72px) 150px; background: var(--cream); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 58px; }
.section-heading h2 { margin: 0; }
.section-heading > p { width: 310px; margin: 0; color: var(--muted); line-height: 1.6; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product-card { position: relative; }
.product-image { aspect-ratio: 4/5; margin-bottom: 22px; overflow: hidden; background: #e9e2d7; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product-card:hover .product-image img { transform: scale(1.025); }
.product-meta { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.product-meta h3 { margin-bottom: 6px; font-size: 17px; }
.product-meta p { margin: 0; color: var(--muted); font-size: 12px; }
.price { font-weight: 600; white-space: nowrap; }
.product-description { min-height: 65px; margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.65; }
.add-button { width: 100%; height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; }
.add-button:hover { background: var(--ink); color: white; }
.stock-note { position: absolute; top: 12px; left: 12px; padding: 7px 9px; background: rgba(255,255,255,.85); font-size: 10px; }

.how-section { min-height: 660px; display: grid; grid-template-columns: .8fr 1.2fr; background: var(--ink); color: var(--paper); }
.how-title { padding: 110px clamp(24px, 7vw, 110px); background: linear-gradient(rgba(23,33,28,.88), rgba(23,33,28,.88)), url("/images/cream.png") center/cover; }
.how-title h2 { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); padding: 110px 5vw; gap: 0; }
.steps article { padding: 0 28px; border-left: 1px solid rgba(255,255,255,.18); }
.steps article > span { display: block; margin-bottom: 130px; font-size: 11px; color: var(--sage); }
.steps h3 { font-size: 16px; }
.steps p { color: rgba(255,255,255,.58); font-size: 13px; line-height: 1.65; }
footer { min-height: 150px; display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(22px, 5vw, 72px); background: var(--ink); color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(16,24,20,.42); backdrop-filter: blur(3px); }
.cart-drawer { position: fixed; z-index: 50; top: 0; right: 0; width: min(500px, 100%); height: 100vh; display: flex; flex-direction: column; background: var(--cream); transform: translateX(105%); transition: transform .35s ease; box-shadow: -30px 0 70px rgba(0,0,0,.1); }
.cart-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 35px 38px 25px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0; font-size: 46px; }
.close-button { width: 40px; height: 40px; border: 0; background: none; font-size: 30px; font-weight: 300; cursor: pointer; }
.cart-items { flex: 1; overflow: auto; padding: 10px 38px; }
.empty-cart { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; }
.cart-item { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 80px; height: 96px; object-fit: cover; }
.cart-item h3 { margin-bottom: 8px; font-size: 14px; }
.quantity { display: inline-flex; border: 1px solid var(--line); }
.quantity button, .quantity span { width: 30px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; font-size: 12px; }
.quantity button { cursor: pointer; }
.remove-item { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 17px; }
.cart-footer { padding: 28px 38px 36px; border-top: 1px solid var(--line); }
.total-row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.cart-footer p { color: var(--muted); font-size: 11px; }

dialog { max-width: calc(100% - 32px); border: 0; padding: 0; background: var(--cream); color: var(--ink); box-shadow: 0 35px 100px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(14,22,17,.65); backdrop-filter: blur(4px); }
.checkout-dialog { width: 940px; }
.checkout-dialog form { padding: 42px; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.dialog-header h2 { margin: 0; font-size: 45px; }
.checkout-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; }
.checkout-layout h3 { padding-bottom: 13px; border-bottom: 1px solid var(--line); font-size: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.delivery-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 18px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.delivery-option input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot { width: 17px; height: 17px; border: 1px solid var(--ink); border-radius: 50%; padding: 3px; }
.delivery-option input:checked + .radio-dot::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--ink); }
.delivery-option strong, .delivery-option small { display: block; }
.delivery-option strong { font-size: 13px; margin-bottom: 4px; }
.delivery-option small { color: var(--muted); font-size: 11px; }
.delivery-option b { font-size: 12px; }
.packeta-box { padding: 15px 0; }
.packeta-box p { margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
.checkout-summary { margin-top: 24px; padding: 20px; background: #eee9df; }
.checkout-summary div { display: flex; justify-content: space-between; margin: 8px 0; font-size: 12px; }
.checkout-summary .grand-total { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 15px; }

.success-dialog { width: 680px; padding: 45px; text-align: center; }
.success-dialog h2 { margin-bottom: 15px; font-size: 46px; }
.success-dialog > p { color: var(--muted); }
.success-mark { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; background: var(--ink); color: white; }
.payment-card { display: grid; grid-template-columns: 230px 1fr; gap: 30px; align-items: center; margin: 30px 0; padding: 25px; background: white; text-align: left; }
.payment-card img { width: 230px; }
.payment-card span, .payment-card strong { display: block; }
.payment-card span { margin-top: 10px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.payment-card strong { margin-top: 3px; font-size: 14px; }

.admin-page { min-height: calc(100vh - 78px); padding: 80px clamp(22px, 7vw, 110px); }
.admin-heading { display: flex; justify-content: space-between; align-items: flex-end; }
.admin-heading h1 { margin: 0; font-size: 72px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 50px 0; }
.stats-grid article { padding: 24px; background: var(--cream); border: 1px solid var(--line); }
.stats-grid span, .stats-grid strong { display: block; }
.stats-grid span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.stats-grid strong { margin-top: 15px; font-size: 34px; }
.orders-list { display: grid; gap: 12px; }
.order-card { background: var(--cream); border: 1px solid var(--line); }
.order-main { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 25px; align-items: center; padding: 22px; }
.order-main h3 { margin: 0 0 5px; font-size: 14px; }
.order-main p { margin: 2px 0; color: var(--muted); font-size: 12px; }
.order-price { text-align: right; }
.status { display: inline-flex; padding: 6px 9px; background: #e8e4da; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.status.paid, .status.ready_to_ship { background: #dae5d7; color: #2d5c34; }
.status.shipped { background: #dce5e7; color: #28525e; }
.order-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 0 22px 20px; }
.order-actions button { width: auto; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 120px); padding: 12px 18px; background: var(--ink); color: white; box-shadow: 0 10px 40px rgba(0,0,0,.2); font-size: 12px; opacity: 0; transition: .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .login-view, .hero, .how-section { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; }
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero-copy { min-height: 65vh; padding: 80px 28px; }
  .hero-image { min-height: 70vh; }
  .product-grid { grid-template-columns: 1fr; gap: 65px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 25px; }
  .steps { padding: 70px 24px; }
  .steps article { padding: 0 18px; }
  .steps article > span { margin-bottom: 70px; }
  .checkout-layout { grid-template-columns: 1fr; gap: 25px; }
  .order-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  h1 { font-size: 54px; }
  .brand-logo-login { top: 15px; width: 235px; }
  .brand-logo-header { width: 150px; }
  .login-card { min-height: 560px; }
  .login-card h1 { font-size: 50px; }
  .site-header { height: 68px; padding: 0 16px; }
  .header-actions .icon-button { display: none; }
  .hero { min-height: auto; }
  .hero-copy { min-height: calc(100vh - 68px); }
  .products-section { padding: 90px 18px; }
  .how-title { padding: 90px 24px; }
  .steps { grid-template-columns: 1fr; gap: 45px; }
  .steps article { border-left: 0; border-top: 1px solid rgba(255,255,255,.18); padding: 25px 0 0; }
  .steps article > span { margin-bottom: 35px; }
  footer { flex-direction: column; justify-content: center; gap: 15px; text-align: center; }
  .drawer-header, .cart-items, .cart-footer { padding-left: 20px; padding-right: 20px; }
  .checkout-dialog form, .success-dialog { padding: 24px; }
  .dialog-header h2, .success-dialog h2 { font-size: 36px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .payment-card { grid-template-columns: 1fr; }
  .payment-card img { width: min(100%, 250px); margin: auto; }
  .admin-heading { align-items: flex-start; flex-direction: column; gap: 25px; }
  .admin-heading h1 { font-size: 52px; }
  .stats-grid { grid-template-columns: 1fr; }
  .order-main { grid-template-columns: 1fr; }
  .order-price { text-align: left; }
}
