:root{
  --bg:#F7F4EE;
  --panel:#FFFFFF;
  --panel2:#EEE8DE;
  --border:#D8D1C7;
  --text:#252523;
  --muted:#6F6A61;
  --gold:#B99A62;
  --gold-dark:#9C7A43;
  --sage:#7F8975;
  --sage-light:#E8ECE4;
  --danger:#A05E5E;
  --warning:#B78B44;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
body{
  background:
    radial-gradient(circle at 50% -12%,#FFFDF9 0,transparent 38%),
    linear-gradient(180deg,#F9F6F0 0%,#F3EFE7 100%);
}
button,input,select{font:inherit}
button{cursor:pointer}
#app{max-width:760px;margin:0 auto;min-height:100vh;padding:18px 22px calc(110px + env(safe-area-inset-bottom))}
.hidden{display:none!important}
.shopHeader{display:flex;align-items:center;justify-content:center;position:relative;padding:6px 0 12px;min-height:118px}
.brandLogo{width:178px;max-width:54vw;height:auto;display:block;object-fit:contain;mix-blend-mode:multiply}
.miniCart{
  position:absolute;right:0;top:24px;border:1px solid var(--border);background:rgba(255,255,255,.82);
  color:var(--text);border-radius:999px;padding:10px 15px;font-weight:800;box-shadow:0 7px 20px rgba(37,37,35,.06)
}
.notice{
  text-align:center;background:#F0EBE2;color:var(--muted);border:1px solid #E1D8CA;border-radius:15px;
  padding:12px;font-size:13px;margin-bottom:14px;letter-spacing:.02em
}
.searchWrap{
  display:flex;align-items:center;gap:8px;border:1px solid var(--border);background:rgba(255,255,255,.88);
  border-radius:999px;padding:0 16px;margin-bottom:14px;box-shadow:0 5px 18px rgba(37,37,35,.035)
}
.searchWrap input{width:100%;height:48px;border:0;outline:0;background:transparent;color:var(--text)}
.searchWrap input::placeholder{color:#A49D92}
.chips{display:flex;gap:9px;overflow:auto;padding:0 0 8px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;border:1px solid var(--border);background:rgba(255,255,255,.75);color:var(--muted);
  border-radius:999px;padding:10px 17px;transition:.15s ease
}
.chip.active{border-color:var(--sage);color:white;font-weight:800;background:var(--sage)}
.chips.small .chip{padding:8px 13px}
.sectionLabel{color:var(--muted);font-size:14px;font-weight:700;margin:5px 0 8px}
.productGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:10px}
.productCard{
  min-height:172px;border:1px solid #DDD6CB;background:rgba(255,255,255,.94);border-radius:18px;padding:15px;
  display:flex;flex-direction:column;position:relative;box-shadow:0 8px 24px rgba(37,37,35,.045)
}
.productTop{display:flex;gap:8px;justify-content:space-between;align-items:flex-start}
.productName{font-weight:850;line-height:1.25;color:var(--text)}
.stockBadge{flex:0 0 auto;border-radius:999px;padding:5px 9px;font-size:12px;color:#795B27;background:#F2E6C8}
.stockBadge.out{color:#8D5050;background:#F1DEDE}
.productDesc{color:var(--muted);font-size:13px;line-height:1.35;margin:8px 0 4px}
.coaLink{color:var(--sage);text-decoration:none;font-size:14px;margin-top:8px;font-weight:650}
.cardBottom{display:flex;align-items:end;justify-content:space-between;gap:8px;margin-top:auto;padding-top:12px}
.price{font-weight:900;font-size:19px;color:var(--text)}
.addButton,.notifyButton{
  border:0;border-radius:999px;color:white;font-weight:900;padding:10px 17px;background:linear-gradient(90deg,var(--gold-dark),var(--gold));
  box-shadow:0 6px 14px rgba(156,122,67,.16)
}
.notifyButton{background:#F2EFE9;color:var(--muted);border:1px solid var(--border);box-shadow:none}
.bottomCart{
  position:fixed;z-index:10;left:50%;transform:translateX(-50%);bottom:calc(20px + env(safe-area-inset-bottom));
  width:min(716px,calc(100% - 44px));border:0;border-radius:999px;padding:17px 20px;color:white;font-weight:900;font-size:16px;
  background:linear-gradient(90deg,var(--gold-dark),var(--gold));box-shadow:0 14px 35px rgba(102,78,39,.22)
}
.pageTitleRow{display:flex;align-items:center;gap:12px;margin:4px 0 24px}
.pageTitleRow h2{font-family:Georgia,serif;font-size:22px;font-weight:500;margin:0;color:var(--text)}
.backButton{border:1px solid var(--border);background:rgba(255,255,255,.75);color:var(--muted);padding:9px 14px;border-radius:999px}
.cartItem{
  border:1px solid var(--border);background:rgba(255,255,255,.94);border-radius:18px;padding:16px;margin-bottom:12px;
  display:grid;grid-template-columns:1fr auto;gap:12px;box-shadow:0 7px 20px rgba(37,37,35,.04)
}
.cartItemName{font-weight:900;color:var(--text)}
.cartItemPrice{color:var(--gold-dark);margin-top:5px;font-weight:750}
.qtyControls{display:flex;align-items:center;gap:8px}
.qtyControls button{width:34px;height:34px;border-radius:10px;border:1px solid var(--border);background:#F6F2EB;color:var(--text);font-weight:900}
.removeButton{color:var(--danger)!important}
.summaryCard{border:1px solid var(--border);background:rgba(255,255,255,.94);border-radius:18px;padding:16px;margin:18px 0}
.summaryCard div,.checkoutTotals div{display:flex;justify-content:space-between;gap:18px;padding:6px 0}
.primaryButton{
  width:100%;border:0;border-radius:18px;padding:17px;color:white;font-weight:900;font-size:17px;
  background:linear-gradient(90deg,var(--gold-dark),var(--gold));box-shadow:0 8px 20px rgba(156,122,67,.18)
}
form label{display:block;color:var(--muted);font-size:13px;margin-bottom:13px}
form input,form select{
  width:100%;height:49px;margin-top:7px;border-radius:15px;border:1px solid var(--border);background:rgba(255,255,255,.92);
  color:var(--text);outline:none;padding:0 14px
}
form input:focus,form select:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(185,154,98,.12)}
form h3{font-family:Georgia,serif;font-weight:500;margin:18px 0 12px}
.paymentChoice{border:1px solid var(--border);background:rgba(255,255,255,.92);border-radius:16px;padding:14px;text-align:center;font-weight:900;margin-bottom:16px;color:var(--text)}
.paymentChoice.selected{border-color:var(--gold);box-shadow:inset 0 0 0 1px rgba(185,154,98,.25)}
.checkoutTotals{margin:8px 0 14px;color:var(--muted)}
.checkoutTotals .grandTotal{font-size:20px;font-weight:900;color:var(--text);border-top:1px solid var(--border);margin-top:8px;padding-top:12px}
.hint{text-align:center;color:#8C857A;font-size:12px}
.error{background:#F2E2E2;color:#8B5050;border:1px solid #DFC5C5;border-radius:14px;padding:12px}
.emptyState{border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,.9);color:var(--muted);padding:28px;text-align:center}
@media (max-width:430px){
  #app{padding-left:16px;padding-right:16px}
  .shopHeader{min-height:106px}
  .brandLogo{width:160px}
  .productGrid{gap:10px}
  .productCard{padding:13px;min-height:176px}
  .productName{font-size:15px}
  .addButton,.notifyButton{padding:9px 14px}
  .bottomCart{width:calc(100% - 32px)}
}


/* Upgrade 3 shop controls */
.helpButton{position:absolute;left:0;top:24px;border:1px solid var(--border);background:rgba(255,255,255,.82);color:var(--muted);border-radius:999px;padding:10px 13px;font-weight:800}
.announcement{background:#F3E6C8;color:#70562B;border:1px solid #E4CF9E;border-radius:15px;padding:12px 14px;margin-bottom:12px;text-align:center;font-size:13px;line-height:1.4;font-weight:700}
.maintenanceNotice{background:#F6E7E4;color:#835049;border:1px solid #E2C0BA;border-radius:15px;padding:14px;margin-bottom:14px;text-align:center;font-size:13px;line-height:1.45;font-weight:800}

.pendingPaymentNotice{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:#F3E6C8;color:#70562B;border:1px solid #E4CF9E;border-radius:15px;
  padding:12px 14px;margin-bottom:12px;font-size:13px;line-height:1.4
}
.pendingPaymentNotice div{display:flex;flex-direction:column;gap:2px}
.pendingPaymentNotice strong{font-weight:900}
.pendingPaymentNotice button{
  flex:0 0 auto;border:1px solid #D6B875;background:#fffaf0;color:#70562B;
  border-radius:999px;padding:9px 13px;font-weight:850
}
.promoRow{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}.promoRow input{margin-top:0}.secondaryButton{min-height:49px;border:1px solid var(--border);background:white;color:var(--text);border-radius:15px;padding:0 15px;font-weight:800}#discountRow{color:#52684A;font-weight:800}

.fieldHint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #7c766c;
}


/* Upgrade 5 payment completion screen */
.paymentStatusCard{
  width:min(520px,100%);
  margin:40px auto 0;
  border:1px solid var(--border);
  background:rgba(255,255,255,.94);
  border-radius:24px;
  padding:28px 22px;
  text-align:center;
  box-shadow:0 12px 34px rgba(37,37,35,.06)
}
.paymentStatusIcon{font-size:46px;line-height:1;margin-bottom:14px}
.paymentStatusCard h2{
  margin:0 0 10px;
  font-family:Georgia,serif;
  font-size:28px;
  font-weight:500;
  color:var(--text)
}
.paymentStatusCard>p{
  margin:0 auto 20px;
  max-width:420px;
  color:var(--muted);
  line-height:1.55
}
.paymentReferenceCard{
  border:1px solid var(--border);
  background:#F8F5EF;
  border-radius:18px;
  padding:14px 16px;
  margin:18px 0 20px;
  text-align:left
}
.paymentReferenceCard div{
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:7px 0
}
.paymentReferenceCard span{color:var(--muted)}
.paymentReferenceCard strong{color:var(--text)}
.paymentActions{display:grid;gap:10px}
.wideButton{width:100%;padding:14px 16px}

/* Upgrade 6 hardening */
.headerLeftActions{position:absolute;left:0;top:24px;display:flex;gap:7px;align-items:center}
.headerLeftActions .helpButton,.headerLeftActions .myOrderButton{position:static}
.myOrderButton{border:1px solid var(--border);background:rgba(255,255,255,.82);color:var(--muted);border-radius:999px;padding:10px 13px;font-weight:800}
.shopFooter{display:flex;flex-wrap:wrap;gap:10px 16px;justify-content:center;border-top:1px solid #E5DED3;margin:30px 0 90px;padding:20px 4px 0;font-size:12px}
.shopFooter a{color:var(--muted);text-decoration:none}
.sellerDetails{border:1px solid var(--border);background:#F8F5EF;border-radius:16px;padding:13px 15px;margin:18px 0;color:var(--muted);font-size:13px;line-height:1.45}
.sellerDetails strong{display:block;color:var(--text);margin-bottom:5px}
.termsCheck{display:flex!important;align-items:flex-start;gap:10px;margin:18px 0!important;color:var(--muted);font-size:12px;line-height:1.45}
.termsCheck input{width:18px!important;height:18px!important;min-height:0!important;margin:1px 0 0!important;padding:0!important;flex:0 0 auto}
.termsCheck a{color:var(--gold-dark)}
@media(max-width:520px){
  .headerLeftActions{top:18px;flex-direction:column;align-items:flex-start;gap:5px}
  .headerLeftActions .helpButton,.headerLeftActions .myOrderButton{padding:8px 11px;font-size:12px}
}


/* Upgrade 7 research compliance and Stripe */
.researchBanner{
  margin:12px 0 18px;
  padding:13px 15px;
  border:1px solid #D9C7A5;
  border-radius:16px;
  background:#FBF7EF;
  color:#6B5B42;
  font-size:12px;
  line-height:1.45
}
.researchBanner strong{display:block;color:#3E3528;margin-bottom:3px}
.researchProductBadge{
  display:inline-block;
  margin:8px 0 5px;
  border:1px solid #B99A62;
  border-radius:999px;
  padding:5px 8px;
  color:#7A5E31;
  background:#FBF7EF;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em
}
.researchProductNote{
  margin:3px 0 8px;
  color:#7A746A;
  font-size:11px;
  line-height:1.4
}
.researchDeclaration{
  display:flex!important;
  align-items:flex-start;
  gap:10px;
  margin:18px 0!important;
  padding:14px;
  border:1px solid #D9C7A5;
  border-radius:16px;
  background:#FBF7EF;
  color:#5E5548;
  font-size:12px;
  line-height:1.5
}
.researchDeclaration input{
  width:18px!important;
  height:18px!important;
  min-height:0!important;
  margin:2px 0 0!important;
  padding:0!important;
  flex:0 0 auto
}


/* Upgrade 8 product photography */
.productPhotoButton{
  width:100%;aspect-ratio:1/1;border:1px solid var(--border);border-radius:15px;
  padding:0;margin:0 0 11px;background:#fff;overflow:hidden;display:block
}
.productPhoto{
  width:100%;height:100%;display:block;object-fit:contain;background:#fff
}
.productPhotoButton:active{transform:scale(.99)}
.productImageDialog{
  border:0;background:transparent;padding:14px;width:min(680px,100%)
}
.productImageDialog::backdrop{background:rgba(18,16,13,.72)}
.productImageDialogCard{
  background:#F7F4EE;border:1px solid var(--border);border-radius:22px;
  padding:12px;box-shadow:0 28px 80px rgba(0,0,0,.35)
}
.productImageDialogHead{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:3px 5px 10px;color:var(--text)
}
.productImageDialogHead strong{font-family:Georgia,serif;font-size:19px}
.productImageDialogHead button{
  border:0;background:transparent;color:var(--muted);font-size:30px;line-height:1
}
.productImageDialog img{
  display:block;width:100%;max-height:72vh;object-fit:contain;background:#fff;
  border:1px solid var(--border);border-radius:16px
}
@media(max-width:430px){
  .productPhotoButton{border-radius:13px;margin-bottom:9px}
}
