/* Shared semantic palette. Photographs retain their original colors in both themes. */
:root {
  color-scheme: dark;
  --paper: #101114;
  --white: #181a1f;
  --surface: #181a1f;
  --surface-raised: #22252b;
  --ink: #f1f2f4;
  --soft-ink: #adb1bb;
  --muted: #adb1bb;
  --line: #333740;
  --gold: #d6b36a;
  --gold-light: #e2c58c;
  --accent-ink: #20190c;
  --accent-soft: #302a1e;
  --green: #57d99b;
  --red: #ff938a;
  --danger: #ff938a;
  --success-bg: #17382c;
  --shadow: 0 18px 60px rgb(0 0 0 / 28%);
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f5f6f8;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-raised: #edf0f4;
  --ink: #222630;
  --soft-ink: #5b6372;
  --muted: #5b6372;
  --line: #dce0e7;
  --gold: #936a22;
  --gold-light: #e2c58c;
  --accent-ink: #ffffff;
  --accent-soft: #f4ead7;
  --green: #16764c;
  --red: #b83535;
  --danger: #b83535;
  --success-bg: #e4f4eb;
  --shadow: 0 18px 60px rgb(27 36 52 / 10%);
}
body { background: var(--paper); color: var(--ink); line-height: 1.5; }
button, input, select, textarea, dialog { color: var(--ink); }
input, select, textarea { color-scheme: inherit; accent-color: var(--gold); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, .button, .admin-button, input, select, textarea { border-radius: 9px; }
.theme-toggle, [data-theme-toggle] { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); border-radius: 50%; cursor: pointer; font-size: 20px; }
.site-header, .search-bar, .mobile-nav, .promise-strip, .cart-summary, .cart-drawer, .product-dialog { background: var(--surface); border-color: var(--line); }
.site-header { background: color-mix(in srgb, var(--surface) 94%, transparent); }
.announcement { background: var(--surface-raised); color: var(--ink); }
.button--dark, .cart-button, .category-pills button.active, .quantity-row .button, .size-options button.active { background: var(--gold); color: var(--accent-ink); border-color: var(--gold); }
.button--gold { background: var(--gold-light); color: #20190c; }
.cart-button b { background: var(--surface); color: var(--ink); }
.eyebrow, .product-card__wholesale, .service-grid svg, .wholesale li span, .cart-drawer>header p { color: var(--gold); }
.eyebrow--light { color: var(--gold-light); }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.product-card__media { background: var(--surface-raised); }
.product-card__info { padding: 18px 16px; }
.product-card__badge { background: #1a1c21; color: #f1f2f4; border-radius: 6px; }
.product-card__stock { background: var(--surface); color: var(--ink); border-radius: 6px; }
.product-card__category, .product-card__prices del, .demo-disclaimer, .cart-line small, .cart-line__remove, .cart-summary small { color: var(--muted); }
.wholesale, .service-grid, .journal { background: var(--surface-raised); }
.wholesale ul, .wholesale li, .service-grid article { border-color: var(--line); }
.story, .site-footer, .campaign-banner { background: var(--surface); color: var(--ink); }
.story__body p, .campaign-banner p:not(.eyebrow), .site-footer span, .site-footer .footer-brand p, .site-footer small { color: var(--muted); }
.site-footer strong { color: var(--ink); }
.site-footer small { border-color: var(--line); }
.journal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cart-notice, .dialog-product__wholesale { background: var(--accent-soft); color: var(--gold); border-radius: 9px; }
.cart-summary>p { color: var(--gold); }
.cart-line__qty button, .size-options button, .quantity-row input { background: var(--surface-raised); }
.toast, .admin-toast { background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.mobile-app-nav { background: var(--surface); border-top: 1px solid var(--line); }
.mobile-app-nav a, .mobile-app-nav button { color: var(--ink); }
.mobile-app-nav span { color: var(--gold); }
.admin-sidebar { background: var(--surface); color: var(--ink); border-right: 1px solid var(--line); padding: 20px 14px; }
.admin-sidebar nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.admin-brand { flex-shrink: 0; margin: 0 8px 22px; }
.admin-sidebar nav a { border-radius: 10px; color: var(--muted); padding: 11px 12px; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: var(--accent-soft); color: var(--ink); }
.admin-sidebar nav span, .overline, .editor-dialog header p { color: var(--gold); }
.admin-sidebar nav b { background: var(--surface-raised); color: var(--gold); }
.admin-sidebar nav>small, .sidebar-footer small { color: var(--muted); }
.sidebar-footer { border-color: var(--line); flex-shrink: 0; }
.admin-topbar, .admin-stats, .inventory-panel, .plus-card, .editor-dialog header, .editor-dialog footer { background: var(--surface); }
.admin-topbar { height: 72px; }
.admin-button--primary { background: var(--gold); color: var(--accent-ink); border-color: var(--gold); }
.admin-button--secondary, .stock-control button, .admin-search input, .inventory-toolbar select, .form-grid input, .form-grid select, .form-grid textarea, .login-form-wrap input { background: var(--surface-raised); color: var(--ink); }
.admin-stats, .inventory-panel, .plus-card { border-radius: 16px; overflow: hidden; box-shadow: 0 2px 5px rgb(0 0 0 / 3%); }
.admin-stats strong { font-size: 30px; }
.admin-stats small, th, .price-cell small, .form-grid label, .row-menu button { color: var(--muted); }
.form-grid label { font-size: 11px; text-transform: none; letter-spacing: 0; }
th { background: var(--surface-raised); }
td { font-size: 12px; }
tr:hover td { background: color-mix(in srgb, var(--surface-raised) 45%, transparent); }
.row-menu button:hover { background: var(--surface-raised); color: var(--ink); }
.status-pill { background: var(--success-bg); color: var(--green); border: 0; }
.status-pill.archived { background: var(--surface-raised); color: var(--muted); }
.admin-note, .avatar { background: var(--accent-soft); border-color: var(--line); color: var(--gold); border-radius: 12px; }
.admin-note p, .admin-note>span { color: var(--muted); }
.editor-dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; }
.editor-dialog footer { gap: 10px; }
.media-uploader { background: var(--surface-raised); border-color: var(--line); border-radius: 12px; }
.media-uploader.dragging { background: var(--accent-soft); border-color: var(--gold); }
.media-uploader img { object-fit: contain; border-radius: 8px; }
.login-form-wrap { background: var(--paper); }
.login-visual { background: var(--surface); color: var(--ink); }
.login-visual span { color: var(--muted); }
.preset--gold { background: #101114; color: #e2c58c; }
.preset--mono { background: #f5f6f8; color: #936a22; }
.preset { border: 2px solid var(--line); border-radius: 12px; }
.preview-notice, .connection-status { padding: 9px 18px; background: var(--accent-soft); color: var(--gold); font-size: 12px; }
.preview-notice a { text-decoration: underline; }
.connection-status { position: fixed; bottom: 12px; left: 12px; z-index: 80; border-radius: 9px; }
.install-button { border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); padding: 9px 14px; font-size: 12px; }
.admin-sidebar-scrim { position: fixed; inset: 0; background: rgb(0 0 0 / 60%); z-index: 19; border: 0; border-radius: 0; }
.media-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 20px; }
.media-library button { border: 1px solid var(--line); background: var(--surface-raised); padding: 10px; text-align: left; overflow-wrap: anywhere; }
.media-library img { width: 100%; height: 100px; object-fit: contain; margin-bottom: 8px; }
.media-library small { display: block; color: var(--muted); }
.content-body { white-space: pre-wrap; line-height: 1.8; }
.custom-section { padding: 64px clamp(20px,6vw,96px); border-top: 1px solid var(--line); }
.custom-section img { max-height: 420px; border-radius: 16px; margin-block: 24px; }
@media (max-width:720px) {
  .theme-toggle { width: 34px; height: 34px; }
  .header-actions { gap: 5px; }
  .product-card__info { padding: 12px 10px; }
  .product-card__meta { display: block; }
  .product-card__prices { white-space: normal; }
  .topbar-actions { gap: 10px; }
  .mobile-app-nav { height: calc(62px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .admin-sidebar { height: 100dvh; }
  .floating-whatsapp { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .toast, .connection-status { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .heading-actions { flex-wrap: wrap; }
}

/* Lightweight glass: blur only on navigation, never on scrolling card grids. */
:root { --glass: rgb(24 26 31 / 88%); --glass-highlight: rgb(255 255 255 / 7%); }
:root[data-theme="light"] { --glass: rgb(255 255 255 / 90%); --glass-highlight: rgb(255 255 255 / 80%); }
.site-header, .admin-topbar, .mobile-app-nav {
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 6px 24px rgb(0 0 0 / 6%);
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .site-header, .admin-topbar, .mobile-app-nav { background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.admin-stats, .plus-card, .inventory-panel, .product-card, .editor-dialog, .journal-card {
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 28px rgb(0 0 0 / 7%);
}
.admin-button, .button { min-height: 44px; }
.admin-search input, .inventory-toolbar select, .form-grid input, .form-grid select { min-height: 44px; }
.form-grid input[type="checkbox"], .form-grid input[type="radio"] { min-height: auto; }
.builder-actions button, .row-menu button { min-height: 36px; border-radius: 8px; }
input, textarea, select { max-width: 100%; }
.settings-form { padding: clamp(18px,3vw,32px); }
#businessDetails { display: flex; flex-direction: column; gap: 6px; }
#businessDetails p { margin: 0; }
.login-form-wrap { position: relative; }
.login-form-wrap>[data-theme-toggle] { position: absolute; top: 20px; right: 20px; width: 38px; height: 38px; margin: 0; padding: 0; }
.sync-status { color: var(--muted); font-size: 11px; margin: 12px 0; }
@media (max-width:720px) {
  .form-grid input, .form-grid select, .form-grid textarea, .login-form-wrap input, .quote-contact input { font-size: 16px; }
  .builder-item { grid-template-columns: auto minmax(0,1fr); }
  .builder-actions { grid-column: 2; flex-wrap: wrap; }
  .bulk-bar { flex-wrap: wrap; }
  .bulk-bar strong { width: 100%; }
  .admin-toast { left: 14px; right: 14px; bottom: 18px; }
  .topbar-actions { gap: 8px; }
  .admin-content { padding-bottom: 32px; }
  body:has(.admin-main), body.login-page { padding-bottom: 0; }
}
@media (prefers-reduced-transparency: reduce), (prefers-reduced-motion: reduce) {
  .site-header, .admin-topbar, .mobile-app-nav { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.quote-contact .quote-consent { display:flex; align-items:start; gap:9px; grid-column:1/-1; text-transform:none; letter-spacing:0; font-size:11px; }
.quote-contact .quote-consent input { width:18px; height:18px; flex-shrink:0; margin:0; }
.footer-brand details { font-size:12px; color:var(--muted); max-width:440px; }
.footer-brand summary { cursor:pointer; color:var(--gold); }

/* Preserve the complete logo artwork at every placement. */
.brand,
.admin-brand,
.login-visual > img,
.site-footer .footer-brand img {
  aspect-ratio: 1220 / 837;
  height: auto;
  overflow: hidden;
  border: 1px solid rgb(214 179 106 / 24%);
  border-radius: 12px;
  background: #050505;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 8px 24px rgb(0 0 0 / 16%);
}
.brand { width: 94px; }
.admin-brand { width: 112px; }
.login-visual > img { width: 156px; position: relative; z-index: 1; }
.site-footer .footer-brand img { width: 132px; }
.brand img,
.admin-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.login-visual > img,
.site-footer .footer-brand img { display: block; max-width: 100%; object-fit: contain; object-position: center; }
#accessGate {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
#accessGate h1 { margin: 0 0 10px; font-family: var(--font-head); }
#accessGate p { color: var(--muted); }
#accessGate a { display: inline-block; margin-top: 10px; color: var(--gold); font-weight: 700; }
@media (max-width:720px) {
  .brand { width: 80px; }
  .admin-brand { width: 104px; }
  .login-visual > img { width: 112px; }
  .login-visual { min-height: 34vh; }
  .login-form-wrap { padding: 34px 20px; }
  .login-form-wrap form { padding-top: 24px; }
  .login-form-wrap>[data-theme-toggle] { width: 34px; height: 34px; }
}
