.view-panel {
      animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Keep account dialogs reachable on short screens and above the keyboard. */
    #auth-modal > div, #account-profile-modal > div, #account-settings-modal > div {
      max-height: calc(100vh - 2rem);
      max-height: calc(100dvh - 2rem);
      overflow-y: auto;
      overscroll-behavior: contain;
    }
    #auth-modal [data-auth-submit]:disabled { opacity: .55; cursor: wait; }
    #auth-modal [aria-label="Close sign-in dialog"], #auth-modal [aria-pressed] { min-width: 40px; min-height: 40px; }
    [role="status"].fixed { max-width: calc(100vw - 2rem); overflow-wrap: anywhere; }
    button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
      outline: 2px solid #005EB8;
      outline-offset: 3px;
    }
    @media (max-width: 767px) {
      input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .no-scrollbar::-webkit-scrollbar { display: none; }
    .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
    .aikalo-logo-img { display: block; object-fit: contain; }
    .wishlist-btn.is-wishlisted { color: #005EB8 !important; transform: scale(1.05); }
    .wishlist-btn { cursor: pointer; }
    .wishlist-btn:active { transform: scale(0.92); }

    /* ===== MOBILE RESPONSIVE POLISH ===== */
    html, body { max-width: 100%; overflow-x: hidden; }
    img, video, iframe { max-width: 100%; }
    button, a { -webkit-tap-highlight-color: transparent; }

    @media (max-width: 1023px) {
      body { padding-bottom: 94px !important; }
      main, section, .view-panel { width: 100%; max-width: 100%; min-width: 0; }
      .view-panel { overflow: hidden; }
      .max-w-7xl, .max-w-6xl, .max-w-5xl, .max-w-4xl, .max-w-3xl, .max-w-2xl { max-width: 100% !important; }
      .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
      .md\:px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
      input, select, textarea { max-width: 100%; }
      .overflow-x-auto { -webkit-overflow-scrolling: touch; }

      /* Header: keep the brand and actions usable on narrow screens */
      header > div { padding-left: 1rem !important; padding-right: 1rem !important; gap: .5rem !important; }
      header .aikalo-logo-img { max-width: 120px; height: auto; }
      header input { min-width: 0 !important; width: 100% !important; }

      /* Hero typography and controls */
      h1 { overflow-wrap: anywhere; }
      .text-5xl { font-size: 2.25rem !important; line-height: 1.08 !important; }
      .text-4xl { font-size: 2rem !important; line-height: 1.1 !important; }
      .text-3xl { font-size: 1.75rem !important; line-height: 1.15 !important; }
      .py-14 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

      /* Prevent action rows from forcing horizontal scrolling */
      .flex:not(.overflow-x-auto) { min-width: 0; }
      .flex-wrap { row-gap: .5rem; }

      /* Product detail: stack everything cleanly on phones */
      #view-pdp .grid { min-width: 0 !important; }
      #view-pdp .grid > * { min-width: 0 !important; }
      #view-pdp img, #view-pdp video { width: 100%; height: auto; }
      #view-pdp .sticky { position: static !important; }
      #view-pdp .p-8 { padding: 1rem !important; }
      #view-pdp .p-7 { padding: 1rem !important; }
      #view-pdp .p-6 { padding: 1rem !important; }
      #view-pdp .gap-8 { gap: 1rem !important; }

      /* Reviews and vendor cards */
      #pdp-customer-reviews, #pdp-other-vendors { width: 100%; min-width: 0; }
      #pdp-customer-reviews .flex, #pdp-other-vendors .flex { min-width: 0; }

      /* Compare remains horizontally scrollable rather than breaking the page */
      #view-compare .overflow-x-auto { max-width: 100%; overflow-x: auto; }

      /* Modals should use the full available mobile width */
      [id$="-modal"] > div, .fixed.inset-0 > div { max-width: calc(100vw - 2rem); }

      /* Bottom navigation stays above the safe area and can hide while scrolling down */
      .fixed.bottom-4 {
        bottom: max(1rem, env(safe-area-inset-bottom)) !important;
        transition: transform .25s ease, opacity .2s ease;
        will-change: transform, opacity;
      }
      .fixed.bottom-4.dock-hidden {
        transform: translateX(-50%) translateY(calc(100% + 1.5rem)) !important;
        opacity: 0;
        pointer-events: none;
      }
      .fixed.bottom-4 > nav { width: 100%; max-width: none; }
      .fixed.bottom-4 .dock-btn { min-height: 48px; }
    }

    @media (max-width: 640px) {
      .text-sm { font-size: .8125rem; }
      .text-xs { font-size: .6875rem; }
      .rounded-2xl { border-radius: 1rem; }
      .p-5 { padding: 1rem !important; }
      .p-4 { padding: .875rem !important; }
      .gap-8 { gap: 1.25rem !important; }
      .gap-6 { gap: 1rem !important; }
      .gap-5 { gap: .875rem !important; }

      /* Full-width primary actions are easier to tap */
      #view-pdp .grid-cols-2 { grid-template-columns: 1fr !important; }
      #view-pdp button { min-height: 44px; }
      #view-pdp .grid-cols-2 button { width: 100%; }

      /* Keep the mobile dock compact */
      .fixed.bottom-4 { padding-left: .5rem !important; padding-right: .5rem !important; }
      .fixed.bottom-4 > nav { padding: .35rem !important; }
      .fixed.bottom-4 .dock-btn { padding: .5rem .25rem !important; }
      .fixed.bottom-4 .dock-btn span { font-size: 8px !important; }
    }

    /* AIKALO mobile PDP reading/purchase order */
    @media (max-width: 1023px) {
      #view-pdp > .max-w-7xl > .grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem !important;
      }

      /* Flatten the two desktop columns so their important sections can be ordered for mobile. */
      #view-pdp #pdp-gallery-column,
      #view-pdp #pdp-gallery-column + div,
      #view-pdp #pdp-gallery-column + div > div:first-child {
        display: contents !important;
      }

      /* Media first */
      #view-pdp #pdp-gallery-column > div:first-child { order: 1; }
      #view-pdp #pdp-gallery-thumbs { order: 2; }
      #view-pdp #pdp-gallery-note { order: 3; }

      /* Product identity */
      #view-pdp #pdp-gallery-column + div > div:first-child > div:nth-child(1) { order: 4; }
      #view-pdp #pdp-title { order: 5; }
      #view-pdp #pdp-subtitle { order: 6; }
      #view-pdp #pdp-gallery-column + div > div:first-child > div:nth-child(4) { order: 7; }
      #view-pdp #pdp-gallery-column + div > div:first-child > div:nth-child(5) { order: 8; }

      /* Helpful product options before secondary actions */
      #view-pdp #pdp-gallery-column + div > div:first-child > div:nth-child(6) { order: 9; }
      #view-pdp #pdp-gallery-column + div > div:first-child > #pdp-compare-panel { order: 10; }
      #view-pdp #pdp-gallery-column + div > div:first-child > div:nth-child(8) { order: 11; }

      /* Purchase actions */
      #view-pdp #pdp-gallery-column + div > div.flex.gap-4 { order: 12; }

      /* Vendor, reviews, AI, then alternative vendors */
      #view-pdp #pdp-gallery-column > button { order: 13; }
      #view-pdp #pdp-customer-reviews { order: 14; }
      #view-pdp #pdp-ai-panel { order: 15; }
      #view-pdp #pdp-other-vendors { order: 16; }

      /* Make the purchase action row stack cleanly on phones. */
      #view-pdp #pdp-gallery-column + div > div.flex.gap-4 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: .625rem !important;
        width: 100%;
      }

      #view-pdp #pdp-gallery-column + div > div.flex.gap-4 > button {
        width: 100% !important;
        min-height: 48px;
      }

      /* Keep the AI input comfortable after the reorder. */
      #view-pdp #pdp-ai-panel form {
        align-items: stretch;
      }
      #view-pdp #pdp-ai-input {
        min-width: 0;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .view-panel { animation: none; }
    }
  
/* AIKALO mobile header refinement */
@media (max-width: 767px) {
  header > div:first-child {
    height: auto !important;
    min-height: 64px;
    padding: 10px 14px 12px !important;
    flex-wrap: wrap !important;
    row-gap: 9px !important;
    column-gap: 8px !important;
    align-items: center !important;
  }

  header > div:first-child > button:first-child {
    flex: 0 0 auto !important;
  }

  header > div:first-child > button:first-child img {
    height: 28px !important;
  }

  header > div:first-child > button:first-child span {
    font-size: 17px !important;
  }

  header > div:first-child > div.flex-1 {
    order: 3 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  header > div:first-child > div.flex-1 form {
    width: 100% !important;
  }

  header > div:first-child > div.flex-1 input {
    height: 40px !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    font-size: 11px !important;
  }

  header > div:first-child > div.flex.items-center.space-x-3 {
    margin-left: auto !important;
    gap: 4px !important;
  }

  header > div:first-child > div.flex.items-center.space-x-3 > button:first-child {
    display: none !important;
  }

  #auth-header-guest {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  #auth-header-guest button {
    white-space: nowrap !important;
    font-size: 10px !important;
    line-height: 1 !important;
    padding: 8px 10px !important;
    min-height: 32px !important;
  }

  #auth-header-guest button:last-child {
    padding-left: 11px !important;
    padding-right: 11px !important;
  }

  header > div:first-child > div.flex.items-center.space-x-3 > button:nth-child(2) {
    width: 36px !important;
    height: 36px !important;
    padding: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  header > div:first-child > div.flex.items-center.space-x-3 > div.h-4 {
    margin: 0 2px !important;
  }
}

@media (max-width: 380px) {
  #auth-header-guest button {
    font-size: 9.5px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #auth-header-guest button:last-child {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }
}

@media (max-width: 1023px) {
    #aikalo-mobile-dock { transition: transform .22s ease, opacity .18s ease !important; will-change: transform, opacity; }
    #aikalo-mobile-dock.aikalo-dock-hidden { transform: translate3d(-50%, calc(100% + 2rem), 0) !important; opacity: 0 !important; pointer-events: none !important; }
  }
  @media (min-width: 1024px) { #aikalo-mobile-dock.aikalo-dock-hidden { transform: none !important; opacity: 1 !important; pointer-events: auto !important; } }
/* Marketplace workspaces intentionally do not restyle Home. */
.market-workspace{max-width:1120px;margin:auto;padding:24px 16px 140px;overflow-wrap:anywhere;color:#14243a}
.market-workspace h1{font-size:26px;font-weight:700;margin-bottom:16px}.market-workspace h2,.market-dialog h2{font-size:20px;font-weight:600;margin-bottom:12px}
.market-workspace nav{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.market-note{font-size:14px;line-height:1.6;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.market-card{min-width:0;border:1px solid #dbe5f0;border-radius:16px;padding:16px;margin:16px 0;overflow-wrap:anywhere;background:white}.market-card h3{font-weight:600}.market-card img{object-fit:contain;max-width:100%;margin-top:12px}
.market-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border:1px solid #c9d8ea;border-radius:10px;margin:4px;color:#15365f;background:#f3f7fc;cursor:pointer}.market-button:disabled{opacity:.5;cursor:not-allowed}
.market-workspace form,.market-dialog form{display:grid;gap:12px}.market-workspace label,.market-dialog label{display:grid;gap:6px;font-size:14px;min-width:0}.market-workspace input,.market-dialog input,.market-workspace select,.market-dialog select,.market-dialog textarea{max-width:100%;min-width:0;width:100%;border:1px solid #b9cbe0;padding:10px;border-radius:8px;font-size:16px;background:white}.market-dialog input[type=checkbox]{width:22px;height:22px}.market-dialog textarea{min-height:100px}.market-dialog{width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border-radius:16px;overflow-wrap:anywhere}.market-dialog::backdrop{background:#10284499}.market-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.market-spec{display:grid;gap:8px;border:1px solid #dbe5f0;padding:12px;border-radius:10px}.market-button:focus-visible,.market-dialog :focus-visible{outline:3px solid #2466aa;outline-offset:3px}
[hidden]{display:none!important}

/* Staff catalogue workspace: AIKALO colors and typography, denser management layout. */
.market-admin-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:8px 0 28px}
.market-eyebrow{margin:0 0 6px;color:#58708d;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.market-admin-heading h1{margin:0;color:#14243a;font-size:30px;font-weight:700;line-height:1.2}
.market-subtitle{max-width:650px;margin:8px 0 0;color:#63758a;font-size:14px;line-height:1.55}
.market-button-primary{border-color:#173e6a;background:#173e6a;color:#fff;font-weight:700;box-shadow:0 2px 5px #1028441c}.market-button-primary:hover:not(:disabled){background:#102f53}.market-button-secondary{background:#fff;color:#29445f}
.market-admin-heading>.market-button{margin:0;min-width:148px}
.market-admin-filters{display:grid;grid-template-columns:minmax(220px,2fr) minmax(140px,1fr) minmax(160px,1.2fr) minmax(140px,1fr) auto;align-items:end;gap:12px;padding:18px;background:#f5f8fc;border:1px solid #e0e8f1;border-radius:14px}
.market-admin-filters label,.market-editor-form label{color:#283d55;font-size:13px;font-weight:600}
.market-admin-filters input,.market-admin-filters select,.market-editor-form input:not([type=checkbox]):not([type=file]),.market-editor-form select,.market-editor-form textarea,.market-upload-panel input:not([type=checkbox]){min-height:44px;border:1px solid #cbd7e4;border-radius:9px;background:#fff;padding:10px 12px;color:#14243a;font:inherit;font-size:15px}
.market-admin-filters .market-button{margin:0;min-width:110px}
.market-list-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 12px}.market-list-summary h2{margin:0;font-size:17px;font-weight:700;color:#14243a}.market-list-summary span{color:#6b7e92;font-size:13px}
.market-product-list{display:grid;gap:10px}
.market-product-row{display:grid;grid-template-columns:auto 76px minmax(0,1fr) auto minmax(230px,auto);align-items:center;gap:16px;min-width:0;padding:14px 16px;border:1px solid #e0e7ef;border-radius:13px;background:#fff;transition:border-color .15s,box-shadow .15s}
.market-product-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0;padding:12px 14px;border:1px solid #e0e7ef;border-radius:12px;background:#fff}.market-product-selection[hidden]{display:none}.market-product-selection-count{margin-right:auto;color:#435a73;font-size:13px;font-weight:700}.market-product-select{display:flex;align-items:center;justify-content:center;min-height:36px;color:#536a83;font-size:11px}.market-product-select input{width:18px;height:18px;margin:0;accent-color:#0862bd}
.market-product-row:hover{border-color:#c5d4e4;box-shadow:0 5px 16px #173e6a0d}
.market-product-thumb{display:grid;place-items:center;width:76px;height:76px;overflow:hidden;border:1px solid #e7edf3;border-radius:10px;background:#f7f9fc;color:#a7b4c2;font-size:25px}.market-product-thumb img{width:100%;height:100%;margin:0;object-fit:contain;background:#fff}
.market-product-main{min-width:0}.market-product-main h3{margin:0;color:#14243a;font-size:15px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}.market-product-meta,.market-product-slug{margin:4px 0 0;color:#6b7e92;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.market-product-slug{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;color:#8795a5}
.market-status{display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:4px 9px;border:1px solid transparent;border-radius:999px;font-size:11px;font-weight:700;text-transform:capitalize;white-space:nowrap}.market-status.is-active{color:#176744;background:#eaf7f0;border-color:#ccebd9}.market-status.is-draft{color:#745518;background:#fff7df;border-color:#f2e5b8}.market-status.is-archived{color:#657386;background:#eff2f5;border-color:#dfe5eb}
.market-product-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}.market-product-actions .market-button{min-height:38px;margin:0;padding:8px 10px;font-size:12px}
.market-empty{display:grid;justify-items:center;gap:8px;padding:42px 20px;border:1px dashed #cbd8e6;border-radius:14px;background:#f9fbfd;text-align:center}.market-empty-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#eaf0f7;color:#375b82;font-size:22px}.market-empty h3{margin:4px 0 0;color:#20364e;font-size:16px;font-weight:700}.market-empty p{max-width:440px;margin:0;color:#6b7e92;font-size:13px;line-height:1.55}
.market-product-skeleton{height:104px;border:1px solid #e6ebf1;border-radius:13px;background:linear-gradient(100deg,#f2f5f8 25%,#fafbfd 42%,#f2f5f8 60%);background-size:220% 100%;animation:market-shimmer 1.2s linear infinite}@keyframes market-shimmer{to{background-position-x:-220%}}
.market-product-editor{width:min(920px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:0;overflow-x:hidden}.market-product-editor>header{position:sticky;z-index:2;top:0;padding:14px 22px;border-bottom:1px solid #e5ebf2;background:#fff}.market-product-editor>header h2{margin:0;font-size:18px}.market-product-editor>header .market-button{margin:0;min-height:38px}
.market-editor-form{gap:0!important;padding-bottom:2px}.market-editor-intro{padding:22px 24px 16px;border-bottom:1px solid #edf0f4}.market-editor-intro .market-editor-status{margin-top:12px}.market-editor-section{padding:22px 24px;border-bottom:1px solid #edf0f4}.market-section-title{margin:0 0 16px;color:#1b3048;font-size:16px;font-weight:700}
.market-basic-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.market-category-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.market-category-fields .market-help{grid-column:1/-1;margin-top:-8px}
.market-editor-form textarea{width:100%;min-height:100px;resize:vertical}.market-editor-form [name=description]{min-height:130px}.market-editor-form input[type=checkbox],.market-upload-panel input[type=checkbox]{width:20px;height:20px;accent-color:#173e6a}.market-help{margin:5px 0 0;color:#728196;font-size:12px;font-weight:400;line-height:1.5}
.market-spec-host{display:grid;gap:14px}.market-spec-group{min-width:0;margin:0;padding:14px;border:1px solid #e2e9f0;border-radius:12px}.market-spec-group legend{padding:0 6px;color:#415a75;font-size:12px;font-weight:700}.market-spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.market-spec-field{align-content:start;min-width:0}.market-spec-field input[type=checkbox]{justify-self:start;margin-top:8px}
.market-multi-options{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}.market-multi-options label{display:inline-flex!important;align-items:center;gap:5px;padding:6px 8px;border:1px solid #dce5ee;border-radius:8px;background:#f8fafd;font-size:11px!important;font-weight:500!important}.market-multi-options input[type=checkbox]{width:16px;height:16px;min-height:16px}
.market-additional{padding:16px 24px;border-bottom:1px solid #edf0f4}.market-additional summary{cursor:pointer;color:#29445f;font-weight:700}.market-additional summary .market-help{display:inline}.market-additional-host{margin-top:14px}.market-extra-row{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:10px;padding:10px 0;border-bottom:1px solid #edf0f4}
.market-editor-footer{position:sticky;z-index:2;bottom:0;display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:8px;padding:14px 24px;border-top:1px solid #e5ebf2;background:#ffffffed;backdrop-filter:blur(8px)}.market-editor-footer .market-button{margin:0;min-width:138px}.market-save-feedback{margin:0 0 0 8px;color:#61758b;font-size:13px}.market-error-state{border-color:#f0d7d5;background:#fffafa}.market-error-text{color:#9e3431;font-size:13px}
.market-media-dialog{width:min(820px,calc(100% - 24px))}.market-media-list{display:grid;gap:10px;margin:16px 0}.market-media-card{display:grid;grid-template-columns:112px minmax(0,1fr) auto;align-items:center;gap:14px;padding:12px;border:1px solid #e0e7ef;border-radius:12px}.market-media-card>img{width:112px;height:84px;margin:0;object-fit:contain;border:1px solid #e6ebf1;border-radius:8px;background:#f7f9fc}.market-media-card p{margin:4px 0 0}.market-media-actions{display:flex;gap:5px;justify-content:flex-end;flex-wrap:wrap}.market-media-actions .market-button{margin:0;min-height:36px;padding:7px 9px;font-size:12px}
.market-upload-panel{margin:18px 0;padding:18px;border:1px solid #dce6f0;border-radius:13px;background:#f8fafd}.market-upload-panel h3{margin:0 0 5px}.market-dropzone{position:relative;display:grid!important;justify-items:center;gap:7px;margin:14px 0;padding:25px 15px;border:1.5px dashed #9db3cc;border-radius:12px;background:#fff;text-align:center;cursor:pointer}.market-dropzone.is-dragging{border-color:#173e6a;background:#edf4fb}.market-file-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.market-drop-icon{font-size:26px;color:#466b91}.market-upload-previews{display:flex;flex-wrap:wrap;gap:10px}.market-upload-preview{display:grid;gap:4px;max-width:160px;color:#63758a;font-size:11px;overflow-wrap:anywhere}.market-upload-preview img{width:150px;height:110px;margin:0;object-fit:contain;border:1px solid #dfe7ef;border-radius:8px;background:#fff}.market-upload-panel label:not(.market-dropzone){display:flex;align-items:center;gap:9px;margin-top:12px}.market-upload-panel label:not(.market-dropzone) input{width:20px;min-height:20px}.market-upload-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.market-upload-actions .market-button{margin:0}.market-upload-progress{height:4px;margin:8px 0;overflow:hidden;border-radius:99px;background:#dfe8f1}.market-upload-progress::after{content:"";display:block;width:38%;height:100%;border-radius:inherit;background:#285b8c;animation:market-upload-progress 1.05s ease-in-out infinite alternate}@keyframes market-upload-progress{from{transform:translateX(0)}to{transform:translateX(165%)}}
@media(max-width:760px){.market-admin-filters{grid-template-columns:1fr 1fr}.market-admin-filters label:first-child{grid-column:1/-1}.market-admin-filters .market-button{grid-column:1/-1;width:100%}.market-product-row{grid-template-columns:auto 60px minmax(0,1fr) auto;gap:10px;padding:12px}.market-product-thumb{width:60px;height:60px}.market-product-actions{grid-column:1/-1;justify-content:flex-start;padding-top:8px;border-top:1px solid #edf0f4}.market-product-actions .market-button{flex:0 1 auto;white-space:nowrap}.market-product-editor{padding:0}.market-product-editor>header{padding:12px 16px}.market-editor-intro,.market-editor-section{padding:18px 16px}.market-additional{padding:14px 16px}.market-editor-footer{padding:12px 16px}.market-media-card{grid-template-columns:82px minmax(0,1fr)}.market-media-card>img{width:82px;height:72px}.market-media-actions{grid-column:1/-1;justify-content:flex-start}.market-media-actions .market-button{flex:1}}
@media(max-width:480px){.market-workspace{padding:18px 12px 120px}.market-admin-heading{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:20px}.market-admin-heading h1{font-size:25px}.market-admin-heading>.market-button{width:100%}.market-admin-filters{grid-template-columns:1fr;padding:14px}.market-admin-filters label:first-child,.market-admin-filters .market-button{grid-column:auto}.market-product-row{grid-template-columns:auto 52px minmax(0,1fr) auto;gap:9px;padding:10px}.market-product-thumb{width:52px;height:52px}.market-product-main h3{font-size:13px}.market-product-meta{font-size:11px}.market-status{font-size:10px;padding:3px 7px}.market-spec-grid,.market-basic-grid,.market-category-fields{grid-template-columns:1fr}.market-category-fields .market-help{grid-column:auto}.market-extra-row{grid-template-columns:1fr}.market-editor-footer{grid-template-columns:1fr 1fr}.market-editor-footer .market-button{min-width:0;width:100%}.market-save-feedback{grid-column:1/-1;margin:2px 0 0}.market-media-dialog,.market-product-editor{width:calc(100% - 12px);max-height:calc(100dvh - 12px)}.market-product-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.market-product-actions .market-button{min-width:0;padding:8px 6px;font-size:11px;white-space:normal}.market-dropzone{padding:20px 10px}}

/* PDP vendor discovery: use the existing inherited AIKALO typography. */
#pdp-feature-hub .pdp-explore-intro{max-width:42rem;line-height:1.6;margin:0;overflow-wrap:break-word}
.pdp-vendor-offers{font-family:inherit;min-width:0}.pdp-vendor-offers p{max-width:42rem;line-height:1.6;overflow-wrap:anywhere;margin:0}
.pdp-vendor-offers .pdp-offers-support{margin-top:6px}.pdp-buying-note{padding:14px 16px;margin:16px 0}.pdp-buying-note p,.pdp-offers-empty p{margin-top:6px}
.pdp-offers-empty{padding:24px 20px}.pdp-vendor-card{padding:16px;margin-top:12px;min-width:0}.pdp-vendor-card>p{margin-top:8px}.pdp-vendor-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.pdp-vendor-actions .market-button{margin:0;font:inherit;font-size:12px;font-weight:600}

/* Dedicated Messages workspace */
.market-workspace.market-messages-page{max-width:1280px;padding-top:20px}
.market-messages-title{margin:0 0 14px!important;font-size:25px!important;font-weight:700!important;line-height:1.25}
.market-messages-layout{display:grid;grid-template-columns:minmax(240px,320px) minmax(0,1fr);height:min(700px,calc(100dvh - 205px));min-height:440px;overflow:hidden;border:1px solid #dfe7ef;border-radius:14px;background:#fff;box-shadow:0 8px 28px #183b5a0b}
.market-messages-sidebar{display:flex;min-width:0;min-height:0;flex-direction:column;border-right:1px solid #e5ebf1;background:#fbfcfe}
.market-messages-sidehead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px;border-bottom:1px solid #e5ebf1}.market-messages-sidehead h2{margin:0;font-size:14px;font-weight:700}.market-messages-sidehead .market-button,.market-conversation-header>.market-button{margin:0;min-height:36px;padding:7px 10px;font-size:12px}
.market-message-list{min-height:0;flex:1;overflow:auto;padding:6px}.market-message-list>.market-note{padding:12px;color:#6b7e92;font-size:13px}.market-message-item{display:grid;width:100%;min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;margin:0;padding:12px 10px;border:0;border-bottom:1px solid #edf1f5;border-radius:8px;background:transparent;text-align:left;cursor:pointer}.market-message-item:hover,.market-message-item[aria-current=true]{background:#edf4fb}.market-message-contact{min-width:0;overflow:hidden;color:#1c3047;font-size:13px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.market-message-product{grid-column:1;min-width:0;overflow:hidden;color:#526981;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.market-message-preview{grid-column:1;overflow:hidden;color:#7a8999;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.market-message-meta{grid-column:2;grid-row:1/4;display:flex;align-items:flex-start;gap:6px;color:#7a8999;font-size:10px;white-space:nowrap}.market-message-unread{display:grid;min-width:19px;height:19px;place-items:center;padding:0 5px;border-radius:20px;background:#173e6a;color:white;font-size:10px;font-weight:700}
.market-messages-active{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;min-height:0;background:#fff}.market-conversation-header{display:flex;align-items:center;gap:12px;min-width:0;padding:12px 16px;border-bottom:1px solid #e5ebf1}.market-conversation-header h2{min-width:0;margin:0;color:#1b3048;font-size:15px;font-weight:700;overflow-wrap:anywhere}.market-conversation-header>p,.market-conversation-heading p{margin:3px 0 0;color:#728196;font-size:12px;line-height:1.4}.market-conversation-heading{min-width:0;flex:1}.market-message-back{display:none!important}.market-conversation-actions .market-button{margin:0;color:#8b3939;font-size:11px}
.market-message-history{display:flex;min-height:0;flex-direction:column;gap:10px;overflow:auto;padding:16px;background:#f8fafc}.market-message-history>.market-note{margin:auto;color:#728196;text-align:center}.market-message-bubble{box-sizing:border-box;width:min(84%,640px);max-width:100%;min-width:0;padding:11px 13px;border:1px solid #e0e7ef;border-radius:12px;background:#fff;overflow-wrap:anywhere}.market-message-sender{display:block;color:#365472;font-size:11px;font-weight:700}.market-message-body{margin:5px 0 0;color:#24384e;font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.market-message-time{display:block;margin-top:6px;color:#8290a0;font-size:10px}.market-message-note{max-width:480px;margin:auto!important;padding:15px;border:1px solid #dfe7ef;border-radius:10px;background:#fff;color:#64778c;font-size:13px;text-align:center}
.market-message-composer{padding:12px 16px;border-top:1px solid #e5ebf1;background:#fff}.market-message-composer form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.market-message-composer label{display:block;min-width:0}.market-message-composer textarea{display:block;box-sizing:border-box;width:100%;min-height:46px;max-height:140px;resize:vertical;padding:11px 12px;border:1px solid #cbd7e4;border-radius:10px;background:white;color:#14243a;font:inherit;font-size:15px;line-height:1.45}.market-message-composer .market-button{min-height:44px;margin:0;padding:10px 16px}.market-message-composer [role=status]{grid-column:1/-1;margin:0;color:#687b90;font-size:12px}.market-message-composer .market-button:disabled{opacity:.55;cursor:wait}
.market-messages-empty{display:grid;align-content:center;justify-items:center;gap:8px;min-height:100%;padding:20px;text-align:center}.market-messages-empty-icon{display:grid;width:44px;height:44px;place-items:center;border-radius:12px;background:#edf3f9;color:#426487;font-size:21px}.market-messages-empty h2{margin:4px 0 0;color:#29435d;font-size:16px;font-weight:700}.market-messages-empty p{max-width:300px;margin:0;color:#728196;font-size:13px;line-height:1.5}
@media(min-width:768px) and (max-width:960px){.market-messages-layout{grid-template-columns:minmax(230px,260px) minmax(0,1fr)}.market-conversation-header{flex-wrap:wrap;gap:8px}.market-conversation-heading{flex:1 1 100%}.market-conversation-header>.market-message-refresh{margin-left:0}.market-conversation-actions{margin-left:auto}}
@media(max-width:767px){.market-workspace.market-messages-page{padding:12px 10px 110px}.market-messages-title{font-size:22px!important}.market-messages-layout{display:block;height:calc(100dvh - 165px);min-height:430px;border-radius:11px}.market-messages-sidebar,.market-messages-active{height:100%}.market-messages-active{display:none}.market-messages-layout.is-conversation-open .market-messages-sidebar{display:none}.market-messages-layout.is-conversation-open .market-messages-active{display:grid}.market-message-back{display:inline-flex!important;flex:none}.market-conversation-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;padding:10px}.market-conversation-header>.market-message-refresh{grid-column:3;grid-row:1;margin-left:0}.market-conversation-heading{grid-column:2;grid-row:1;flex:initial}.market-conversation-header h2{font-size:14px}.market-conversation-actions .market-button{min-height:34px;padding:6px 8px;font-size:10px}.market-message-history{padding:12px}.market-message-composer{padding:10px}.market-message-composer form{gap:7px}.market-message-composer .market-button{padding:9px 11px;font-size:12px}.market-message-bubble{width:min(94%,640px)}.market-conversation-actions{grid-column:1/-1;justify-self:end;margin-left:auto}}
@media(max-width:360px){.market-workspace.market-messages-page{padding-right:8px;padding-left:8px}.market-messages-layout{height:calc(100dvh - 150px);min-height:400px}.market-messages-sidehead{padding:11px}.market-message-list{padding:4px}.market-message-item{padding:10px 8px}.market-conversation-header{flex-wrap:wrap}.market-conversation-header .market-message-back{min-height:36px;padding:7px}.market-conversation-heading{flex-basis:calc(100% - 56px)}.market-message-composer form{grid-template-columns:minmax(0,1fr) auto}.market-message-composer textarea{font-size:16px}}

/* Clear participant identity and useful, catalogue-backed conversation context. */
.market-messages-layout{border-color:#d9e4ef;box-shadow:0 12px 36px #15395b0d}
.market-messages-sidehead{background:#fff}.market-message-item{position:relative;gap:5px 9px;margin:3px 0;border:1px solid transparent;border-radius:10px;transition:background-color .15s,border-color .15s}.market-message-item:hover{border-color:#e0e9f2}.market-message-item[aria-current=true]{border-color:#d5e3f1;background:#edf4fb}.market-message-state{grid-column:1;justify-self:start;margin-top:3px;padding:2px 7px;border-radius:999px;background:#e8f5ed;color:#26724b;font-size:10px;font-weight:700}.market-message-state.is-closed{background:#f1f3f6;color:#697789}
.market-conversation-header{min-height:68px}.market-conversation-context{display:flex;align-items:center;flex-wrap:wrap;gap:5px 9px;margin-top:5px}.market-conversation-product,.market-conversation-activity{color:#74849a;font-size:11px;line-height:1.35}.market-conversation-state{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border-radius:999px;background:#e8f5ed;color:#28734d;font-size:10px;font-weight:700}.market-conversation-state::before{width:6px;height:6px;border-radius:50%;background:currentColor;content:""}.market-conversation-state.is-closed{background:#f1f3f6;color:#697789}
.market-message-history{gap:12px;background:#f5f8fc}.market-message-bubble{width:fit-content;max-width:min(82%,680px);padding:12px 15px;border-radius:16px 16px 16px 5px;background:#fff;box-shadow:0 2px 8px #19385808}.market-message-bubble--outgoing{align-self:flex-end;border-color:#c7def5;border-radius:16px 16px 5px 16px;background:#e8f2ff}.market-message-bubble--staff{align-self:center;border-color:#e3e8ee;background:#f0f3f7}.market-message-bubble--outgoing .market-message-sender{text-align:right;color:#245b8d}.market-message-body{margin-top:4px}.market-message-pagination{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:8px 0}.market-message-pagination .market-button{min-height:34px;margin:0;padding:6px 11px;font-size:12px}.market-message-page-number{min-width:58px;color:#74849a;font-size:12px;text-align:center}.market-message-history>.market-note{margin:auto;color:#718197;text-align:center}
@media(max-width:767px){.market-message-bubble{max-width:92%}.market-conversation-header{min-height:0}.market-conversation-context{gap:4px 7px}.market-message-history{gap:10px}}

/* Keep user prompts and Concierge replies in visibly separate chat bubbles. */
#chat-stream.cc-chat-stream,#pdp-ai-chat-history.cc-chat-stream{display:flex!important;flex-direction:column;align-items:stretch;gap:16px;min-width:0;overflow-x:hidden;overscroll-behavior:contain}
#pdp-ai-chat-history.cc-chat-stream{max-height:24rem;padding:14px;background:#f5f8fc}
.cc-chat-row{display:flex;align-items:flex-end;gap:9px;min-width:0;width:100%}.cc-chat-row--assistant{justify-content:flex-start}.cc-chat-row--user{justify-content:flex-end}
.cc-chat-avatar{display:grid;flex:0 0 30px;width:30px;height:30px;place-items:center;border-radius:50%;background:#173e6a;color:white;font-size:10px;font-weight:800}
.cc-chat-bubble{box-sizing:border-box;min-width:0;max-width:min(82%,680px);padding:12px 15px;border:1px solid #dfe7ef;border-radius:16px 16px 16px 5px;background:#fff;color:#23384f;box-shadow:0 2px 8px #19385808;overflow-wrap:anywhere}
.cc-chat-bubble--user{border-color:#c6dcf3;border-radius:16px 16px 5px 16px;background:#e8f2ff;color:#173753}.cc-chat-label{display:block;margin:0 0 5px;color:#48647f;font-size:10px;font-weight:750;letter-spacing:.02em}.cc-chat-bubble--user .cc-chat-label{text-align:right;color:#245b8d}.cc-chat-message-text{margin:0!important;color:inherit;font-size:13px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.cc-chat-bubble--assistant>p:not(.cc-chat-message-text){line-height:1.55;overflow-wrap:anywhere}.cc-chat-bubble--assistant article{max-width:100%;overflow-wrap:anywhere}.cc-chat-notice{align-self:center;max-width:min(92%,640px);padding:9px 13px;border:1px solid #e2e8ef;border-radius:12px;background:#f7f9fc;color:#64768a;text-align:center}.cc-chat-notice p{margin:0!important;font-size:12px;line-height:1.5}
@media(max-width:480px){#chat-stream.cc-chat-stream{gap:13px;padding:14px}#pdp-ai-chat-history.cc-chat-stream{max-height:20rem;padding:11px}.cc-chat-row{gap:7px}.cc-chat-avatar{flex-basis:26px;width:26px;height:26px}.cc-chat-bubble{max-width:calc(100% - 34px);padding:11px 12px}.cc-chat-row--user .cc-chat-bubble{max-width:88%}.cc-chat-message-text{font-size:13px}}

/* Keep message pagination in compact footer rows at the bottom of each pane. */
.market-messages-active{grid-template-rows:auto minmax(0,1fr) auto auto}.market-message-pagination{display:flex;flex-direction:row;align-items:center;align-self:stretch;justify-content:flex-end;gap:7px;min-height:44px;padding:6px 14px;border-top:1px solid #e9eef4;background:#fff}.market-message-pagination .market-button{flex:0 0 auto;width:auto;min-height:30px;margin:0;padding:4px 9px;border-radius:8px;font-size:11px}.market-message-page-number{min-width:48px;margin:0;color:#74849a;font-size:11px;text-align:center}
.market-message-list-pagination{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-top:1px solid #e5ebf1;background:#fff}.market-message-list-pagination .market-button{flex:0 0 auto;width:auto;min-height:32px;margin:0;padding:5px 9px;border-radius:8px;font-size:11px}.market-message-list-pagination .market-message-page-number{min-width:44px}

/* Unread markers use backend counts and remain visually distinct in every menu. */
[data-message-unread]:not(.hidden),.market-message-unread-dot{display:inline-block;flex:none;width:8px;height:8px;border:0;border-radius:50%;background:#e24f5b;box-shadow:0 0 0 2px #fff;vertical-align:middle}
[data-message-unread].hidden{display:none!important}
[data-message-unread].has-count{width:auto;min-width:18px;height:18px;padding:0 5px;border-radius:999px;color:#fff;font-size:10px;font-weight:700;line-height:18px;text-align:center}
.market-message-unread-dot{margin-top:5px}
/* Bulk catalogue import preview and validation */
.market-import-dialog { width: min(980px, calc(100vw - 2rem)); max-width: none; max-height: min(88vh, 900px); overflow: auto; }
.market-import-template-actions, .market-import-controls, .market-import-strategies { display:flex; flex-wrap:wrap; gap:.6rem; margin:.8rem 0; }
.market-import-form { display:grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap:.8rem; align-items:end; }
.market-import-form label { display:grid; gap:.35rem; font-size:.8rem; }
.market-import-form input, .market-import-form select { min-width:0; width:100%; }
.market-import-table-wrap { max-width:100%; overflow:auto; margin:.75rem 0; border:1px solid #d9e2ef; border-radius:.75rem; }
.market-import-table { width:100%; border-collapse:collapse; font-size:.78rem; }
.market-import-table th, .market-import-table td { padding:.55rem; border-bottom:1px solid #e6edf5; text-align:left; vertical-align:top; }
.market-import-table th { position:sticky; top:0; background:#f4f8fc; }
.market-import-validation { min-width:14rem; color:#a53327; }
.market-import-feedback { font-weight:600; }
@media (max-width:600px) { .market-import-dialog { padding:.9rem; } .market-import-table { min-width:680px; } }
