.is-customer-site {
    --muted: #586a74;
    --mobile-nav-height: calc(72px + env(safe-area-inset-bottom, 0px));
}
.is-customer-site .profile-layout > *,
.is-customer-site .cart-layout > *,
.is-customer-site .checkout-layout > *,
.is-customer-site .order-detail-grid > * {
    min-width: 0;
}
.is-customer-site .breadcrumb { flex-wrap: wrap; row-gap: 5px; }
.is-customer-site .field-hint { font-size: 13px; }
.is-customer-site .field-error { font-size: 14px; }
.is-customer-site .search-submit,
.is-customer-site .search-clear {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    color: var(--teal);
    border-radius: 9px;
}
.is-customer-site .search-clear { display: none; }
.is-customer-site .search-form.has-value .search-clear { display: grid; }
.is-customer-site .search-form { padding-inline: 3px 10px; gap: 5px; }
.is-customer-site .search-form input { min-width: 0; }
.is-customer-site .mobile-menu.open {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 16px max(16px, calc((100% - 1200px) / 2));
    border-top: 1px solid var(--line);
}
.is-customer-site .mobile-menu a { padding: 10px; min-height: 44px; }
.is-customer-site .product-info { display: flex; flex-direction: column; height: auto; }
.is-customer-site .product-grid:not(.list-view) .product-card { display: flex; flex-direction: column; }
.is-customer-site .product-grid:not(.list-view) .product-info { flex: 1; }
.is-customer-site .product-bottom { margin-top: auto; padding-top: 12px; }
.is-customer-site .product-name { overflow-wrap: anywhere; }
.is-customer-site .rating-empty { color: var(--muted); font-size: 13px; line-height: 1.8; }
.is-customer-site .product-stock-label { color: #92362c; font-size: 13px; margin-top: 5px; }
.is-customer-site .account-page-title { font-size: 24px; margin: 0 0 18px; }
.is-customer-site .auth-password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.is-customer-site .auth-card input:not([type=checkbox]) {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--canvas);
    border-radius: 10px;
    margin-top: 8px;
}
.is-customer-site .auth-card .text-button,
.is-customer-site .auth-password-toggle,
.is-customer-site .address-card-actions .button,
.is-customer-site .address-card-actions .text-button { min-height: 44px; padding: 8px 12px; }
.is-customer-site .auth-password-toggle { font-size: 13px; white-space: nowrap; }
.is-customer-site .address-card,
.is-customer-site .profile-card,
.is-customer-site .support-message,
.is-customer-site .ticket-thread { overflow-wrap: anywhere; }
.is-customer-site .address-card-actions,
.is-customer-site .profile-address-form .form-actions { flex-wrap: wrap; }
.is-customer-site .search-query-form { margin-bottom: 20px; }
.is-customer-site .search-query-form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.is-customer-site .search-query-controls { display: flex; gap: 8px; }
.is-customer-site .search-query-controls input { flex: 1; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.is-customer-site .store-toolbar-field { display: grid; gap: 6px; min-width: 0; }
.is-customer-site .store-toolbar-field label { font-size: 14px; }
.is-customer-site .store-toolbar-field input,
.is-customer-site .store-toolbar-field select { width: 100%; }
.is-customer-site .store-toolbar-search { flex: 1; }
.is-customer-site .store-results-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.is-customer-site .store-empty-state { text-align: center; padding: 28px 18px; }
.is-customer-site .cart-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; padding-block: 16px; }
.is-customer-site .qty-control button { width: 44px; height: 44px; }
.is-customer-site .qty-control span { min-width: 36px; }
.is-customer-site .add-cart { width: 44px; height: 44px; flex-shrink: 0; }
.is-customer-site .orders-table-wrapper { max-width: 100%; overflow-x: auto; }
.is-customer-site .orders-search label { min-width: 0; flex: 1 1 160px; }
.is-customer-site .orders-search input,
.is-customer-site .orders-search select { min-width: 0; max-width: 100%; width: 100%; }
.is-customer-site .checkout-page-title { font-size: 23px; margin: 0 0 18px; }
.is-customer-site .checkout-card .commerce-breakdown { grid-template-columns: minmax(75px, .35fr) minmax(0, 1fr); }
.is-customer-site .checkout-card .commerce-breakdown dd { text-align: start; overflow-wrap: anywhere; }
.is-customer-site .checkout-review-items article { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 10px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.is-customer-site .checkout-review-items article > div { min-width: 0; }
.is-customer-site .checkout-review-items strong { font-size: 14px; overflow-wrap: anywhere; }
.is-customer-site .checkout-review-items p { margin: 5px 0; }
.is-customer-site .checkout-review-items .section-link { display: inline-flex; align-items: center; min-height: 44px; }
.is-customer-site .registration-upfront-fee { margin-bottom: 20px; }
.is-customer-site .registration-review h3 { font-size: 18px; margin-block: 22px 12px; }
.is-customer-site .registration-review dl { display: grid; gap: 12px; }
.is-customer-site .registration-review dl > div { padding-block: 10px; border-bottom: 1px solid var(--line); }
.is-customer-site .registration-review dt { font-size: 13px; color: var(--muted); }
.is-customer-site .registration-review dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.is-customer-site .registration-review-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.is-customer-site .summary-row { gap: 12px; flex-wrap: wrap; }
.is-customer-site .summary-row > :last-child { margin-inline-start: auto; }
@media (max-width: 900px) {
    .is-customer-site input:not([type=checkbox]):not([type=radio]),
    .is-customer-site select,
    .is-customer-site textarea { font-size: 16px; }
    .is-customer-site .auth-code-input { font-size: 26px !important; }
    .is-customer-site .header-main { gap: 8px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
    .is-customer-site .header-actions { gap: 4px; }
    .is-customer-site .account-link,
    .is-customer-site .cart-link,
    .is-customer-site .mobile-menu-toggle,
    .is-customer-site .header-logout { min-width: 44px; min-height: 44px; justify-content: center; }
    .is-customer-site .cart-count { top: 0; right: 0; background: #b95b24; }
    .is-customer-site .mobile-cart-count { background: #b34d2c; }
    .is-customer-site .mobile-bottom-nav a { color: #586a63; }
    .is-customer-site .mobile-menu.open { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: calc(100dvh - 210px); padding: 10px 14px; }
    .is-customer-site .profile-nav { max-width: 100%; scroll-padding-inline: 10px; }
    .is-customer-site .profile-nav > a { flex-shrink: 0; min-height: 44px; }
    .is-customer-site .profile-nav-logout { min-height: 44px; }
    .is-customer-site .filters-header .filters-close,
    .is-customer-site .sort-options .sort-button,
    .is-customer-site .filter-chip,
    .is-customer-site .tabs .tab { min-height: 44px; }
    .is-customer-site .filter-toggle span { display: inline; }
    .is-customer-site .filter-toggle { width: auto; padding-inline: 12px; flex-shrink: 0; }
    .is-customer-site .filters-header .filters-close { width: 44px; height: 44px; }
    .is-customer-site .ticket-row { flex-wrap: wrap; gap: 8px; min-height: 44px; }
    .is-customer-site .ticket-row b { min-width: 0; }
    .is-customer-site .breadcrumb { scroll-margin-top: 130px; }
    .is-customer-site :is(input, select, textarea, button, a) { scroll-margin-top: 130px; scroll-margin-bottom: calc(var(--mobile-nav-height) + 20px); }
}
@media (max-width: 768px) {
    .is-customer-site .orders-table { display: table; white-space: normal; min-width: 0; }
    .is-customer-site .wallet-table .orders-table { min-width: 0; }
    .is-customer-site .orders-table thead { display: none; }
    .is-customer-site .orders-table tbody,
    .is-customer-site .orders-table tr { display: block; }
    .is-customer-site .orders-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; padding: 8px; }
    .is-customer-site .orders-table td { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 6px; overflow-wrap: anywhere; }
    .is-customer-site .orders-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
    .is-customer-site .orders-table td:last-child { border-bottom: 0; }
    .is-customer-site .orders-actions { flex-wrap: wrap; width: 100%; }
    .is-customer-site .orders-actions button { min-height: 44px; }
}
@media (max-width: 600px) {
    .is-customer-site .profile-card { padding: 18px; }
    .is-customer-site .profile-header { flex-wrap: wrap; }
    .is-customer-site .store-toolbar-field { flex: 1 1 140px; }
    .is-customer-site .store-toolbar-search { flex-basis: 100%; }
    .is-customer-site .store-banner { align-items: flex-start; }
    .is-customer-site .store-banner > div { min-width: 0; overflow-wrap: anywhere; }
    .is-customer-site .cart-footer > * { max-width: 100%; }
    .is-customer-site .cart-footer .button { flex-shrink: 0; }
    .is-customer-site .registration-review-actions .button { flex: 1 1 140px; }
}

/* Mobile space saving: the app header already names the page, so body-level
   repeats of that title and the breadcrumb chain are dropped on small screens.
   Headings that carry real data (order number, product name, query results)
   keep their class names out of these rules and stay visible. */
@media (max-width:900px){
    .is-customer-site .breadcrumb{display:none}
    .is-customer-site .page-heading h1{display:none}
    .is-customer-site .checkout-page-title{display:none}
    .is-customer-site .account-page-title{display:none}
    .is-customer-site .page-heading.order-details-page h1{display:block}
    .is-customer-site .wizard-intro .eyebrow,.is-customer-site .wizard-intro h1{display:none}
    .is-customer-site .wizard-intro{margin:0 0 10px}
}
/* The search heading carries the live query — exempt from the mobile title dedupe. */
@media (max-width:900px){
    .is-customer-site .page-heading.search-heading h1{display:block}
}

/* Sticky mobile total + CTA bar for cart and checkout (same shell as the
   product buy bar): the payable amount and the primary action stay reachable
   while the long item/step lists scroll underneath. */
.mobile-checkout-bar{display:none}
@media (max-width:900px){
    .mobile-checkout-bar{position:fixed;bottom:var(--mobile-nav-height, 71px);inset-inline:0;z-index:89;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;background:#fffffffa;border-top:1px solid #e1ebe6;backdrop-filter:blur(14px);box-shadow:0 -2px 14px #173d290d}
    .mobile-checkout-total{display:flex;flex-direction:column;line-height:1.5;min-width:0}
    .mobile-checkout-total span{font-size:11.5px;color:#6b7d76}
    .mobile-checkout-total strong{font-size:16.5px}
    .mobile-checkout-total small{font-size:11.5px;font-weight:400;color:#6b7d76}
    .mobile-checkout-cta{flex:none;min-height:44px;padding:10px 18px;font-size:14px}
    body:has(.mobile-checkout-bar).has-mobile-navigation{padding-bottom:calc(var(--mobile-nav-height, 71px) + 60px)}
}

/* Admin impersonation bar: fixed on top while browsing as another user */
.impersonation-bar{position:fixed;top:0;inset-inline:0;z-index:9999;display:flex;align-items:center;gap:10px;padding:9px 16px;background:#7a4a06;background:linear-gradient(90deg,#8a5305,#a56a10);color:#fff;box-shadow:0 6px 20px rgba(122,74,6,.35);font-size:13px}
.impersonation-bar p{margin:0;flex:1;line-height:1.8;min-width:0}
.impersonation-bar strong{font-weight:800}
.impersonation-bar__icon{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:rgba(255,255,255,.18);flex:none}
.impersonation-bar__icon .icon{width:16px;height:16px}
.impersonation-bar form{flex:none}
.impersonation-bar button{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:8px 14px;border:0;border-radius:10px;background:#fff;color:#7a4a06;font:800 13px/1.4 inherit;cursor:pointer}
.impersonation-bar button:hover{background:#f4ecdd}
.impersonation-bar button .icon{width:15px;height:15px}
body:has(.impersonation-bar){padding-top:52px}
@media (max-width:640px){.impersonation-bar p span{display:none}}

/* Status badges: pill + leading dot, one distinct hue per state so the
   customer reads progress at a glance (UX: color + shape, not color alone). */
.is-customer-site .status{display:inline-flex;align-items:center;gap:6px;border-radius:99px;padding:4px 11px;font-weight:700;line-height:1.8}
.is-customer-site .status::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.status-processing{color:#1d5f8a;background:#e3f0fa}
.status-shipped{color:#54449c;background:#ece9fb}
.status-return{color:#9c5a12;background:#fdeeda}
.status-refund{color:#8a3b74;background:#fae8f3}
