:root {
  --cream: #f7f3ea;
  --cream-2: #fffdf8;
  --burgundy: #a62c40;
  --burgundy-dark: #7f1f31;
  --navy: #253747;
  --muted: #69747d;
  --line: #e5ddd1;
  --gold: #bd9460;
  --white: #fff;
  --green: #2d7a57;
  --shadow: 0 18px 50px rgba(37, 55, 71, .10);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Montserrat, Avenir Next, Avenir, system-ui, sans-serif; color: var(--navy); background: var(--cream); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(18px, 5vw, 72px); background: rgba(247, 243, 234, .94); border-bottom: 1px solid rgba(166,44,64,.13); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 132px; height: 48px; object-fit: contain; }
.brand-copy { border-left: 1px solid var(--line); padding-left: 14px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--burgundy); }
.admin-link { text-decoration: none; border: 1px solid var(--burgundy); color: var(--burgundy); border-radius: 999px; padding: 10px 16px; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.admin-link:hover { background: var(--burgundy); color: white; }

.hero { min-height: 430px; padding: 70px clamp(20px, 7vw, 110px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .7fr); align-items: center; gap: 60px; position: relative; overflow: hidden; background: var(--navy); color: white; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 440px; height: 440px; top: -260px; right: 5%; border: 1px solid rgba(189,148,96,.35); box-shadow: 0 0 0 70px rgba(189,148,96,.04), 0 0 0 140px rgba(189,148,96,.025); }
.hero::after { width: 260px; height: 260px; bottom: -180px; left: 18%; background: rgba(166,44,64,.3); filter: blur(2px); }
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { margin: 0 0 18px; color: #e6c596; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.hero h1 { margin: 0; font: 700 clamp(40px, 6vw, 74px)/.98 'Playfair Display', serif; letter-spacing: -.035em; }
.hero h1 em { color: #e6c596; font-style: normal; }
.hero-text { max-width: 620px; margin: 24px 0 0; font-size: clamp(15px, 2vw, 18px); line-height: 1.75; color: rgba(255,255,255,.76); }
.hero-card { position: relative; z-index: 1; padding: 30px; border: 1px solid rgba(255,255,255,.16); border-radius: 24px; background: rgba(255,255,255,.075); backdrop-filter: blur(10px); }
.hero-card strong { display: block; font: 700 30px/1.1 'Playfair Display', serif; color: #f4dcb9; }
.hero-card span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.68); }

.catalog-shell { width: min(1180px, calc(100% - 32px)); margin: -36px auto 130px; position: relative; z-index: 2; }
.catalog-card { background: var(--cream-2); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 34px 38px 26px; border-bottom: 1px solid var(--line); }
.catalog-head h2 { margin: 0; font: 700 31px/1.1 'Playfair Display', serif; }
.catalog-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.catalog-note { font-size: 11px; font-weight: 700; color: var(--burgundy); text-transform: uppercase; letter-spacing: .08em; }
.product-list { display: grid; }
.product-row { display: grid; grid-template-columns: minmax(300px, 1.6fr) minmax(150px, .5fr) minmax(170px, .5fr); align-items: center; gap: 24px; padding: 22px 38px; border-bottom: 1px solid var(--line); transition: background .2s; }
.product-row:hover { background: #fffaf2; }
.product-row:last-child { border-bottom: 0; }
.product-info { display: flex; align-items: center; gap: 22px; min-width: 0; }
.product-img { width: 150px; height: 150px; flex: 0 0 150px; object-fit: cover; border-radius: 14px; background: #eee8de; border: 1px solid var(--line); }
.product-img.placeholder { padding: 25px; object-fit: contain; }
.product-title { font-weight: 800; font-size: 16px; line-height: 1.4; }
.stock-badge { display: inline-flex; margin-top: 8px; padding: 5px 9px; border-radius: 999px; background: #f4e3e5; color: var(--burgundy-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.price-box { text-align: right; }
.old-price { font-size: 12px; color: #8a9298; text-decoration: line-through; }
.new-price { margin-top: 4px; font-size: 19px; font-weight: 800; color: var(--burgundy); }
.qty-picker { display: flex; justify-content: flex-end; }
.qty-control { display: grid; grid-template-columns: 42px 48px 42px; height: 43px; border: 1px solid #d7cec1; border-radius: 12px; overflow: hidden; background: white; }
.qty-control.disabled { opacity: .55; background: #eeeae4; }
.btn-qty { border: 0; background: transparent; color: var(--navy); font-size: 20px; }
.btn-qty:hover:not(:disabled) { background: #f2e9df; }
.qty-input { width: 100%; border: 0; border-left: 1px solid #eee5da; border-right: 1px solid #eee5da; text-align: center; outline: 0; font-weight: 800; color: var(--navy); -moz-appearance: textfield; }
.qty-input::-webkit-inner-spin-button { appearance: none; }

.checkout { padding: 38px; background: #efe7da; border-top: 1px solid var(--line); }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.checkout h3 { margin: 0 0 18px; font: 700 26px 'Playfair Display', serif; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #cfc4b5; border-radius: 11px; padding: 12px 13px; background: rgba(255,255,255,.8); color: var(--navy); outline: 0; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(166,44,64,.1); }
.order-summary { display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border-radius: 18px; background: var(--navy); color: white; }
.total-label { color: rgba(255,255,255,.62); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.total-price { display: block; margin: 8px 0 20px; font: 700 40px 'Playfair Display', serif; color: #f3d6ac; }
.summary-meta { font-size: 13px; color: rgba(255,255,255,.68); }
.primary-btn { width: 100%; margin-top: 24px; padding: 15px 18px; border: 0; border-radius: 12px; background: var(--burgundy); color: white; font-weight: 800; box-shadow: 0 8px 24px rgba(166,44,64,.22); }
.primary-btn:hover { background: var(--burgundy-dark); }
.primary-btn:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 20px; margin: 12px 0 0; font-size: 12px; font-weight: 700; }
.form-message.error { color: #a62234; }
.form-message.success { color: #bfe8d3; }
.sticky-bar { position: fixed; z-index: 25; bottom: 18px; left: 50%; transform: translateX(-50%); width: min(700px, calc(100% - 28px)); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 14px 13px 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(37,55,71,.96); box-shadow: 0 12px 40px rgba(22,30,38,.28); color: white; backdrop-filter: blur(12px); }
.sticky-meta { font-size: 11px; color: rgba(255,255,255,.65); }
.sticky-price { margin-top: 3px; font-weight: 800; color: #f2d4a8; }
.review-btn { border: 0; border-radius: 11px; padding: 12px 15px; background: var(--burgundy); color: white; font-size: 12px; font-weight: 800; }
.loading { padding: 70px 30px; text-align: center; color: var(--muted); }

/* Admin */
.admin-body { min-height: 100vh; background: #f3eee6; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top right, rgba(166,44,64,.22), transparent 35%), var(--navy); }
.login-card { width: min(440px, 100%); padding: 38px; border-radius: 24px; background: var(--cream-2); box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.login-logo { width: 150px; display: block; margin: 0 auto 24px; }
.login-card h1 { margin: 0; text-align: center; font: 700 32px 'Playfair Display', serif; }
.login-card > p { margin: 8px 0 26px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 15px clamp(18px, 4vw, 50px); background: var(--navy); color: white; }
.admin-topbar .brand img { filter: brightness(0) invert(1); }
.admin-topbar-actions { display: flex; align-items: center; gap: 12px; }
.ghost-btn { border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: transparent; color: inherit; padding: 9px 12px; font-size: 12px; font-weight: 700; }
.admin-main { width: min(1260px, calc(100% - 32px)); margin: 34px auto 80px; }
.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.admin-heading h1 { margin: 0; font: 700 38px 'Playfair Display', serif; }
.admin-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-btn { border: 1px solid var(--line); border-radius: 999px; padding: 10px 17px; background: white; color: var(--navy); font-size: 12px; font-weight: 800; }
.tab-btn.active { background: var(--burgundy); border-color: var(--burgundy); color: white; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: var(--cream-2); box-shadow: 0 10px 35px rgba(37,55,71,.06); overflow: hidden; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel-toolbar h2 { margin: 0; font: 700 24px 'Playfair Display', serif; }
.small-primary { border: 0; border-radius: 10px; padding: 11px 14px; background: var(--burgundy); color: white; font-size: 12px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.admin-table th { text-align: left; padding: 13px 18px; color: var(--muted); background: #f6f1e9; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.admin-table td { padding: 15px 18px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.admin-product { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.admin-product img { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; background: #eee; }
.status-pill { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-in, .status-completed { background: #dcf1e6; color: #236a4a; }
.status-out, .status-cancelled { background: #f3dfe2; color: #8f2536; }
.status-new { background: #e7eaf7; color: #394989; }
.status-processing { background: #f5e9cd; color: #80621d; }
.action-row { display: flex; flex-wrap: wrap; gap: 7px; }
.icon-btn { border: 1px solid #d8cfc3; border-radius: 8px; padding: 7px 9px; background: white; color: var(--navy); font-size: 11px; font-weight: 700; }
.icon-btn.danger { border-color: #e6b6be; color: #9e2639; }
.order-detail td { padding: 0 18px 16px; background: #fbf7f1; }
.order-detail-box { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 16px; border-radius: 12px; background: white; border: 1px solid var(--line); }
.order-detail-box p { margin: 4px 0; font-size: 12px; line-height: 1.55; }
.order-items { margin: 0; padding-left: 18px; }
.order-items li { margin: 4px 0; font-size: 12px; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(22,30,38,.68); }
.modal-card { width: min(600px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 28px; border-radius: 20px; background: var(--cream-2); box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.modal-head h2 { margin: 0; font: 700 26px 'Playfair Display', serif; }
.close-btn { border: 0; background: transparent; font-size: 25px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox-field { display: flex; align-items: center; gap: 10px; padding: 10px 0 18px; font-size: 13px; font-weight: 700; }

@media (max-width: 760px) {
  .brand-copy { display: none; }
  .brand img { width: 110px; }
  .hero { grid-template-columns: 1fr; padding-top: 55px; padding-bottom: 80px; }
  .hero-card { display: none; }
  .catalog-shell { width: min(100% - 18px, 1180px); margin-top: -28px; }
  .catalog-head { padding: 26px 20px 20px; align-items: start; flex-direction: column; }
  .product-row { grid-template-columns: 1fr auto; gap: 12px; padding: 17px 16px; }
  .product-info { grid-column: 1 / -1; gap: 14px; }
  .product-img { width: 84px; height: 84px; flex-basis: 84px; }
  .price-box { text-align: left; }
  .checkout { padding: 25px 18px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .sticky-bar { bottom: 9px; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-heading h1 { font-size: 31px; }
  .admin-topbar .brand-copy { display: none; }
  .admin-topbar-actions span { display: none; }
  .form-grid, .order-detail-box { grid-template-columns: 1fr; }
}
