/* Sayora retail polish: keep the existing brand and optional dark theme. */
[data-theme="light"] body{background:#fffaf5}
[data-theme="light"] .glass{box-shadow:0 6px 24px #352c2808;border-color:#e8ded6}
[data-theme="light"] #starfieldCanvas,[data-theme="light"] .cosmic-nebula{display:none}
.product-card{border-radius:18px}.product-card:hover{transform:translateY(-3px)}
.product-name{line-height:1.45}.product-card button{min-height:44px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #b65d48;outline-offset:3px}
.qty-btn{min-width:40px;min-height:40px}.cart-item-name{overflow-wrap:anywhere}
@media(max-width:640px){.cart-layout{grid-template-columns:1fr}.cart-item{gap:12px;flex-wrap:wrap}.marketplace-main .container{padding-left:16px;padding-right:16px}.product-card .product-name{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}.reveal{opacity:1!important;transform:none!important}#starfieldCanvas,.cosmic-nebula{display:none!important}}

/* Semantic colors keep text contrast independent from the burgundy button fill. */
:root {
  --accent-text: #ffc3b5;
  --text-subtle: #adb0bb;
  --text-color: var(--text-main);
  --muted-color: var(--text-muted);
  color-scheme: dark;
}
[data-theme="light"] { --accent-text: #820000; color-scheme: light; }
.loader { background: var(--bg-main); }
.loader-title { color: var(--text-main); }
.loader-subtitle { color: var(--text-muted); opacity: 1; }
.loader-progress { background: var(--border-glass); }
.loader-bar { background: var(--accent-text); }
[data-theme="dark"] :is(.logo img,.loader-logo,.drawer-logo,.footer-brand img) {
  filter: brightness(0) invert(1);
}
#header { background: var(--surface-solid); }
#starfieldCanvas { opacity: .22; }
.glass { background: var(--surface-solid); }
:is(input,textarea)::placeholder { color: var(--text-subtle); opacity: 1; }
select option { background: var(--surface-solid); color: var(--text-main); }
:is(.contact-links a,.menu-link,.drawer-link):hover { color: var(--accent-text); }
:is(.menu-cta,.drawer-cta):hover { color: #fff; }
.cta-box { background: linear-gradient(135deg,#820000,#28050a); }
.cta-content p { color: #ffeedc; }
.btn-cta { background: #ffeedc; color: #570000; }
.btn-cta:hover { background: #fff7ef; color: #570000; }
.journey-dot:not(.active) { background: var(--surface-solid); color: var(--text-muted); }
.promo-banner { background: var(--surface-2); color: var(--text-main); border-color: var(--border-glass); }
:is(.cat-btn-inner i,.img-fallback-text i) { color: var(--accent-text); }
.btn-detail:hover,.page-btn:not(.active):hover { color: var(--accent-text); border-color: var(--accent-text); background: var(--surface-2); }
[data-theme="light"] .qty-control { background: #f7f0ea; }
[data-theme="light"] .qty-btn { background: white; }
[data-theme="light"] :is(.stock-in,.product-discount-tag,.promo-note) { color: #17643b; }
[data-theme="light"] .stock-low { color: #8a4900; }
[data-theme="light"] .stock-out { color: #b42318; }
[data-theme="light"] .badge-promo { background: #984000; }
.product-meta-row { flex-wrap: wrap; gap: 8px; }
.product-name,.contact-links a { overflow-wrap: anywhere; }
.modal-box.glass { background: var(--surface-solid); padding-top: 60px; }
.modal-product-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 28px; }
.modal-product-grid > * { min-width: 0; }
.modal-product-img { background: var(--surface-2); }
.modal-product-img img { object-fit: contain; }
.modal-product-no-img { height: 100%; display: grid; place-items: center; color: var(--text-muted); font-size: 48px; }
.modal-product-cat,.modal-product-desc { color: var(--text-muted); overflow-wrap: anywhere; }
.modal-product-name { font-size: 1.5rem; font-weight: 750; line-height: 1.35; margin: 10px 0; overflow-wrap: anywhere; }
.price-tiers-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .9rem; }
.price-tiers-table :is(th,td) { padding: 10px 8px; border-bottom: 1px solid var(--border-glass); text-align: left; }
.active-tier { background: var(--surface-2); color: var(--accent-text); font-weight: 700; }
.modal-qty-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.modal-price-display { font-size: 1.5rem; font-weight: 750; color: var(--accent-text); margin-top: 20px; }
@media(max-width:640px) {
  .modal-product-grid { grid-template-columns: 1fr; }
  .modal-product-img { height: 220px; }
  .modal-box { padding: 60px 20px 24px; }
  .header-actions { gap: 6px; }
  .logo img { height: 28px; }
  .contact-box { padding: 24px; }
  .hero-buttons .btn { width: 100%; }
}

/* Reserve a separate row for search so it cannot squeeze the mobile logo. */
.logo { flex-shrink: 0; }
@media(max-width:1100px) {
  #header:has(.search-bar-header) .menu { display: none; }
  #header:has(.search-bar-header) .hamburger-btn { display: flex; }
}
@media(max-width:640px) {
  html:has(.marketplace-main) { --nav-height: 124px; }
  #header:has(.search-bar-header) .navbar { height: 68px; }
  .search-bar-header { position: absolute; top: 72px; left: 18px; right: 18px; }
  .search-bar-header input,.search-bar-header input:focus { width: 100%; min-width: 0; }
  .search-bar-header button { flex-shrink: 0; }
}

.cart-item { grid-template-columns: 80px minmax(0,1fr) auto; }
.cart-item-info { min-width: 0; }
.cart-item-name { font-weight: 700; line-height: 1.45; }
.cart-item-info .cart-item-price { font: 400 .85rem/1.5 var(--font-body); color: var(--text-muted); margin: 4px 0 12px; }
.cart-item-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cart-item-controls .qty-control { height: auto!important; }
.qty-input { width: 48px; min-width: 0; text-align: center; color: var(--text-main); }
.qty-btn { flex-shrink: 0; }
.cart-item-subtotal { font-weight: 700; color: var(--secondary); white-space: nowrap; }
.cart-item-no-img { height: 100%; display: grid; place-items: center; color: var(--text-muted); }
@media(max-width:640px) {
  .cart-item { grid-template-columns: 52px minmax(0,1fr); padding: 16px; }
  .cart-item-img { width: 52px; height: 60px; }
  .cart-item-subtotal { grid-column: 2; }
  .cart-summary { padding: 22px; }
}
