/* 047: public catalog space, identity, product details and inventory editor. */
.catalog-theme .public-hero__logo { width: 100px; height: 100px; }
.catalog-theme .public-hero__logo.is-landscape { width: 190px; height: 100px; }
.catalog-theme .public-hero__logo img { width: 100%; height: 100%; object-fit: contain; }
.catalog-theme .public-hero__mobile-actions { display: none; }
.catalog-theme .public-toolbar__filters { grid-template-columns: 1.3fr 1.2fr .85fr .85fr 1.2fr; }
.catalog-theme .public-filter-toggle { display: none; }
.catalog-theme .public-card__actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.catalog-theme .public-card .public-detail-button { width: auto; background: var(--shop-soft); color: var(--shop-accent-dark); border: 1px solid var(--shop-border); padding: 10px; }
.catalog-theme .public-detail-button span { font-size: .72rem; }
.catalog-theme .public-card .public-detail-button:disabled { opacity: .7; }
.catalog-theme .public-card__actions .public-add-button { min-width: 0; font-size: .72rem; padding: 10px 6px; }
.catalog-theme .public-card__actions .public-add-button > svg { display: none; }
.catalog-storefront .catalog-product-dialog {
 font-family: var(--shop-font); color: var(--shop-text); width: min(940px, 96vw);
 max-height: 92dvh; background: var(--shop-surface); border: 1px solid var(--shop-border);
 border-radius: var(--shop-radius); overflow: hidden; display: flex; flex-direction: column;
 box-shadow: 0 25px 80px #00000020;
}
.catalog-product-dialog > header { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--shop-soft); flex: none; }
.catalog-product-dialog > header small { color: var(--shop-accent-dark); font-size: .67rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.catalog-product-dialog > header h2 { font: 700 1.4rem/1.35 var(--shop-heading); margin: 7px 0 0; overflow-wrap: anywhere; }
.catalog-product-close { background: var(--shop-surface); color: var(--shop-text); border: 1px solid var(--shop-border); border-radius: 9px; font-size: 1.5rem; width: 38px; height: 38px; flex: none; cursor: pointer; }
.catalog-product-detail-body { padding: 24px; overflow: auto; min-height: 0; overscroll-behavior: contain; }
.catalog-product-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.catalog-product-gallery, .catalog-product-copy { min-width: 0; }
.catalog-product-main-photo { height: 330px; border: 1px solid var(--shop-border); background: var(--shop-bg); border-radius: 12px; display: grid; place-items: center; padding: 20px; }
.catalog-product-main-photo img { width: 100%; height: 100%; object-fit: contain; }
.catalog-product-main-photo .public-card__fallback { font-size: 1rem; color: var(--shop-muted); text-align: center; }
.catalog-product-main-photo .public-card__fallback svg { width: 44px; height: 44px; }
.catalog-photo-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.catalog-photo-navigation span { font-size: .8rem; color: var(--shop-muted); }
.catalog-photo-navigation button { width: 38px; height: 34px; border: 1px solid var(--shop-border); border-radius: 8px; color: var(--shop-accent-dark); background: var(--shop-soft); cursor: pointer; }
.catalog-product-thumbnails { display: flex; gap: 8px; overflow: auto; padding: 4px 0; }
.catalog-product-thumbnails button { width: 58px; height: 62px; flex: none; border: 1px solid var(--shop-border); border-radius: 8px; background: var(--shop-surface); cursor: pointer; padding: 5px; }
.catalog-product-thumbnails button[aria-pressed=true] { border: 2px solid var(--shop-accent); }
.catalog-product-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.catalog-product-copy h3 { font: 700 1.5rem/1.35 var(--shop-heading); margin: 10px 0; overflow-wrap: anywhere; }
.catalog-detail-price { font-size: 1.8rem; font-weight: 750; color: var(--shop-accent-dark); }
.catalog-detail-stock { display: inline-block; margin: 10px 0; font-size: .75rem; color: var(--shop-success); }
.catalog-product-copy section { margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--shop-border); }
.catalog-product-copy h4 { margin: 0 0 9px; font-size: .9rem; }
.catalog-product-copy p, .catalog-product-copy li { font-size: .85rem; line-height: 1.6; color: var(--shop-muted); overflow-wrap: anywhere; }
.catalog-product-copy p { white-space: pre-wrap; }
.catalog-product-copy ul { padding-left: 18px; margin: 0; }
.catalog-product-copy li + li { margin-top: 7px; }
#catalogDetailAdd, #catalogDetailRetry { background: var(--shop-accent); color: white; border: 0; border-radius: 9px; font: 650 .85rem var(--shop-font); padding: 14px 18px; cursor: pointer; }
#catalogDetailAdd { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
#catalogDetailAdd:disabled { background: #e7e9ed; color: #687180; cursor: not-allowed; }
.catalog-product-dialog button:focus-visible { outline: 3px solid var(--shop-accent-dark); outline-offset: 3px; }
/* Inventory: public information is an independent fourth tab. */
.market-product-tabs-reference { overflow-x: auto; flex-wrap: nowrap; }
.market-product-tabs-reference button { white-space: nowrap; flex: none; }
.market-catalog-note { background: #edf6ff; border: 1px solid #d7e8fb; border-radius: 10px; padding: 13px; font-size: 12px; color: #416485; line-height: 1.6; }
.market-catalog-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.market-catalog-fields .market-span-2 { grid-column: 1 / -1; }
.market-catalog-fields textarea { min-height: 110px; line-height: 1.5; resize: vertical; }
.market-catalog-gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.market-catalog-gallery-head p, [data-market-product-panel=catalog] > small { color: #63768b; font-size: 12px; line-height: 1.5; }
.market-catalog-upload { cursor: pointer; padding: 11px 15px; background: #edf4ff; border: 1px solid #bed6f5; color: #175fae; border-radius: 9px; font-size: 12px; font-weight: 650; white-space: nowrap; }
#marketGalleryMessage { font-size: 12px; color: #23588a; }
.market-catalog-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.market-catalog-photo { padding: 10px; border: 1px solid #dce6f1; border-radius: 12px; background: #f8fafc; }
.market-catalog-photo img { width: 100%; height: 135px; object-fit: contain; border-radius: 8px; background: white; }
.market-catalog-photo > div { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.market-catalog-photo span { margin-right: auto; font-size: 11px; color: #536b84; }
.market-catalog-photo button { width: 29px; height: 29px; border: 1px solid #d5e2f1; border-radius: 7px; background: white; color: #1d5ea2; cursor: pointer; }
.market-catalog-photo button:last-child { background: #fff1f1; color: #a72d2d; }
.market-catalog-photo button:disabled { opacity: .35; cursor: not-allowed; }
.market-catalog-gallery-empty { grid-column: 1 / -1; border: 1px dashed #c5d6e8; padding: 25px; border-radius: 12px; text-align: center; font-size: 12px; color: #63768b; }
/* Sales: seven cards on wide desktop; no changes to checkout or cart layouts. */
.main:has(.pos-compact-header) .productgrid-modern { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; padding: 12px; }
.main:has(.pos-compact-header) .productcard-modern { border-radius: 12px; border: 1px solid #dce6f1; background: white; min-height: 226px; transition: border-color .16s, box-shadow .16s; }
.main:has(.pos-compact-header) .productcard-modern:hover:not(:disabled) { border-color: #80b3ff; box-shadow: 0 6px 16px #1739690a; }
.main:has(.pos-compact-header) .productgrid-modern .productcard-modern .productcard-media { height: 126px; flex-basis: 126px; padding: 10px; background: #f6f9fc; display: grid; place-items: center; }
.main:has(.pos-compact-header) .productgrid-modern .productcard-modern .productcard-media > img.product-image { width: 100%; height: 100%; max-height: 106px; max-width: 100%; object-fit: contain; }
.main:has(.pos-compact-header) .productcard-modern .productcard-body { padding: 11px; gap: 7px; }
.main:has(.pos-compact-header) .productcard-modern .productcard-body b { font-size: 12px; line-height: 1.4; min-height: 34px; }
.main:has(.pos-compact-header) .productcard-modern .productcard-price { font-size: 18px; color: #0d61cf; }
.main:has(.pos-compact-header) .productcard-modern .productcard-category { font-size: 10px; color: #728299; }
.main:has(.pos-compact-header) .productcard-modern .stock-pill { background: #d8f574; color: #294710; border: 1px solid #b3d64c; font-size: 17px; font-weight: 800; min-width: 35px; text-align: center; padding: 5px 8px; border-radius: 10px; line-height: 1.1; box-shadow: none; }
.main:has(.pos-compact-header) .productcard-modern .stock-pill.sold-out { background: #ffe9e6; color: #ad3831; border-color: #efc2bc; }
.pos-equivalent-price-modal .pos-presentation-choice { min-height: 75px; }
.pos-equivalent-price-modal .pos-presentation-choice .pos-choice-text { gap: 6px; }
@media (max-width: 1280px) {
 .main:has(.pos-compact-header) .productgrid-modern { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
 .main:has(.pos-compact-header) .productgrid-modern { grid-template-columns: repeat(4, minmax(0, 1fr)); }
 .catalog-theme .public-card__actions { grid-template-columns: auto minmax(0, 1fr); gap: 6px; }
 .catalog-theme .public-detail-button span { display: none; }
}
@media (max-width: 720px) {
 .main:has(.pos-compact-header) .productgrid-modern { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 .market-catalog-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .market-catalog-fields { grid-template-columns: 1fr; }
 .market-catalog-gallery-head { align-items: flex-start; flex-direction: column; }
 .catalog-theme .public-hero { padding: 15px; gap: 12px; min-height: 0; margin-bottom: 12px; }
 .catalog-theme .public-hero__identity { align-items: center; gap: 12px; }
 .catalog-theme .public-hero__logo { width: 76px; height: 76px; padding: 8px; }
 .catalog-theme .public-hero__logo.is-landscape { width: 132px; height: 76px; }
 .catalog-theme .public-hero__copy { min-width: 0; flex: 1; }
 .catalog-theme .public-hero__copy h1 { font-size: 1.17rem; line-height: 1.25; margin: 7px 0 0; }
 .catalog-theme .public-badge { font-size: .54rem; padding: 3px 6px; letter-spacing: .09em; }
 .catalog-theme .public-hero__copy p, .catalog-theme .public-hero__contact { display: none; }
 .catalog-theme .public-hero.show-contact .public-hero__copy p { display: block; margin-top: 10px; }
 .catalog-theme .public-hero.show-contact .public-hero__contact { display: grid; grid-template-columns: 1fr; gap: 7px; }
 .catalog-theme .public-hero__contact .public-contact { display: none; }
 .catalog-theme .public-hero__mobile-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
 .catalog-theme .public-hero__mobile-actions .public-contact { min-height: 36px; margin: 0; padding: 8px 11px; font-size: .72rem; }
 .catalog-theme .public-company-toggle { border: 1px solid #ffffff35; border-radius: 9px; padding: 9px 11px; min-height: 36px; font: 500 .68rem var(--shop-font); background: transparent; color: var(--shop-hero-text); cursor: pointer; }
 .catalog-theme--elegant .public-company-toggle { border-color: var(--shop-border); }
 .catalog-theme .public-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; margin-bottom: 16px; align-items: end; }
 .catalog-theme .public-toolbar__search { min-width: 0; }
 .catalog-theme .public-field > span { font-size: .68rem; }
 .catalog-theme .public-search-input input { min-height: 42px; font-size: .75rem; }
 .catalog-theme .public-filter-toggle { display: block; background: var(--shop-soft); border: 1px solid var(--shop-border); color: var(--shop-accent-dark); height: 42px; padding: 0 12px; font: 650 .75rem var(--shop-font); border-radius: 9px; cursor: pointer; }
 .catalog-theme .public-toolbar__filters { display: none; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 10px; }
 .catalog-theme .public-toolbar__filters.is-open { display: grid; }
 .catalog-theme .public-resultsbar { padding-bottom: 12px; }
 .catalog-theme .public-resultsbar p { display: none; }
 .catalog-theme .public-resultsbar h2 { font-size: 1.07rem; margin-bottom: 4px; }
 .catalog-theme .public-resultsbar span { font-size: .71rem; }
 .catalog-theme .public-card .public-detail-button { padding: 10px 8px; }
 .catalog-theme .public-card .public-detail-button > svg { display: inline-block; width: 18px; height: 18px; }
 .catalog-product-detail-grid { grid-template-columns: 1fr; gap: 18px; }
 .catalog-product-dialog > header { padding: 15px; }
 .catalog-product-dialog > header h2 { font-size: 1.05rem; }
 .catalog-product-detail-body { padding: 16px; }
 .catalog-product-main-photo { height: 235px; }
 .catalog-product-copy h3 { font-size: 1.2rem; }
}
@media (max-width: 480px) {
 .main:has(.pos-compact-header) .productgrid-modern { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Keep the dialog inside the overlay's padded area, including narrow phones. */
.catalog-storefront .catalog-product-dialog { width: min(940px, 100%); }
.catalog-product-main-photo { min-width: 0; min-height: 0; overflow: hidden; }
.catalog-product-main-photo img { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; }
.market-product-modal [data-market-product-panel=catalog], .pos-equivalent-price-modal { font-family: 'Segoe UI', Roboto, Arial, sans-serif; }
.market-catalog-fields .field { display: grid; gap: 8px; }
.market-catalog-fields .field > span { font-size: 12px; font-weight: 650; color: #315571; }
.market-catalog-fields textarea { display: block; width: 100%; padding: 12px; border: 1px solid #cadcec; border-radius: 9px; background: #fff; color: #213e54; font: 400 13px/1.6 'Segoe UI', Roboto, Arial, sans-serif; }
.market-catalog-fields textarea:focus { outline: 3px solid #e4f0ff; border-color: #529cff; }
.main:has(.pos-compact-header) .productcard-modern { font-family: 'Segoe UI', Roboto, Arial, sans-serif; }

/* Catalog readability: consistent stock/contact colors and themed purchase dialogs. */
.catalog-theme .public-stock { font: 800 1rem/1.3 var(--shop-font); padding: 8px 12px; letter-spacing: 0; }
.catalog-theme .public-stock.in-stock { background: #c5f52b; color: #18320b; }
.catalog-theme .public-hero .public-contact { background: #25d366 !important; border: 1px solid #128c7e !important; color: #fff !important; font-weight: 800; }
.catalog-theme .public-hero .public-contact .catalog-symbol { color: inherit !important; }
.catalog-theme .public-hero .public-contact:hover { background: #1ec45c !important; }
.catalog-storefront .checkout-form__header { background: var(--shop-soft); color: var(--shop-text); padding: 18px; border: 1px solid var(--shop-border); border-radius: 12px; }
.catalog-storefront .checkout-form__header h2 { color: inherit; overflow-wrap: anywhere; }
.catalog-storefront .tiktok-color-row .tiktok-color-available { font: 800 1.125rem/1.4 var(--shop-font); color: var(--shop-text); }
.catalog-storefront .tiktok-color-row label { font-size: 1rem; font-weight: 800; }
.catalog-storefront .tiktok-color-row input, .catalog-storefront .tiktok-presentation-modal [name=quantity] { font-size: 1.25rem; font-weight: 800; }
.catalog-storefront .checkout-form [data-presentation-total], .catalog-storefront .checkout-form .catalog-checkout-total { font: 800 2.55rem/1.25 var(--shop-font); color: var(--shop-text); text-align: center; overflow-wrap: anywhere; margin: 16px 0; }
.catalog-storefront .catalog-checkout-total strong { font-weight: inherit; }
@media (min-width: 1000px) {
 .catalog-theme .public-toolbar__filters { grid-template-columns: repeat(5,minmax(0,1fr)); }
 .catalog-theme .public-toolbar__filters--tiktok { grid-template-columns: 1.15fr 1.15fr 1fr .8fr .8fr 1fr; }
 .catalog-theme .public-toolbar__filters .public-field { min-width: 0; }
}
@media (max-width: 420px) {
 .catalog-storefront .tiktok-color-row { grid-template-columns: 36px minmax(0,1fr) 76px; }
 .catalog-storefront .tiktok-color-row img,.catalog-storefront .tiktok-color-photo { width: 36px; }
 .catalog-storefront .tiktok-color-row input { padding-left: 8px; padding-right: 4px; }
}
/* Clear product typography and a quieter, readable purchase form. */
.catalog-theme .public-card,.catalog-theme .public-card *{font-family:'Segoe UI',Roboto,Arial,sans-serif!important;text-shadow:none}
.catalog-theme .public-card h3{font-weight:650;letter-spacing:0;line-height:1.45}
.catalog-theme .public-card__sku{font-weight:500;font-size:.75rem;color:var(--shop-muted);line-height:1.5}
.catalog-theme .public-card__price strong{letter-spacing:0;font-weight:750}
.catalog-theme .tiktok-card-rates{font-size:15px;line-height:1.5}
.catalog-theme .public-stock.in-stock{color:#245da2}
.catalog-storefront .tiktok-color-row .tiktok-color-available{color:color-mix(in srgb,var(--shop-text) 20%,#337bd0)}
.catalog-storefront .checkout-form input:not([type=checkbox]),.catalog-storefront .checkout-form select,.catalog-storefront .checkout-form textarea{background:#fff9e9;color:#18365a}
.catalog-storefront .checkout-form [data-presentation-total]{font-size:calc(2.55rem - 3px);line-height:1.25}
.catalog-storefront .checkout-form [data-presentation-total]>span{display:block}
.catalog-storefront .checkout-form .catalog-checkout-total{font-size:clamp(.75rem,3.8vw,1.5rem);white-space:nowrap;line-height:1.4;overflow-wrap:normal}
.catalog-storefront .tt-payment-contact{display:grid;gap:4px;padding:14px 16px;margin:14px 0;background:var(--shop-soft);border:1px solid var(--shop-border);border-radius:12px;min-width:0}
.catalog-storefront .tt-payment-contact small{font-size:13px;color:var(--shop-text)}
.catalog-storefront .tt-payment-contact a{font:800 clamp(26px,5vw,32px)/1.25 'Segoe UI',Arial,sans-serif;color:var(--shop-accent-dark);text-decoration:none;overflow-wrap:anywhere}
.catalog-storefront .tt-payment-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr);gap:12px;align-items:center}
.catalog-storefront .tt-payment-fields{display:grid;gap:12px;min-width:0}
.catalog-storefront .tt-yape-symbol{min-width:0;display:grid;place-items:center}
.catalog-storefront .tt-yape-symbol img{width:100%;max-width:110px;height:auto;object-fit:contain}
.catalog-storefront .tt-payment-grid:has(.tt-yape-symbol[hidden]){grid-template-columns:minmax(0,1fr)}
.catalog-storefront .checkout-form input[type=file]{padding:5px;min-height:54px;font-size:12px}
.catalog-storefront .checkout-form input[type=file]::file-selector-button{min-height:42px;padding:10px 14px;margin-right:10px;border:0;border-radius:8px;background:#286cb5;color:#fff;font:700 13px 'Segoe UI',Arial,sans-serif;cursor:pointer}
.catalog-storefront .checkout-form input[type=file]::file-selector-button:hover{background:#205b9a}
/* Reserved checkout: temporary stock, persisted form and a copyable payment number. */
.catalog-storefront .tt-payment-contact{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
.catalog-storefront .tt-payment-contact>div{display:grid;gap:5px;min-width:0}
.catalog-storefront .tt-payment-contact [data-copy-number]{background:#246bb0;color:#fff;min-height:42px;padding:10px 12px;font-size:12px;white-space:normal}
.tt-payment-toast{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2147483647;background:#173b60;color:white;border-radius:14px;padding:20px 30px;font:750 18px/1.4 'Segoe UI',Arial,sans-serif;box-shadow:0 12px 35px #112c4b44;text-align:center;pointer-events:none}
.catalog-storefront .tt-hold-status{display:grid;gap:10px;background:#edf7ff;border:1px solid #bfddf4;border-radius:12px;padding:15px;color:#214e78}
.catalog-storefront .tt-hold-status strong{font-size:16px}.catalog-storefront .tt-hold-status small{font-size:12px;line-height:1.6}
.catalog-storefront .tt-held-products{font-size:13px;border:1px solid var(--shop-border);border-radius:9px;padding:12px}.catalog-storefront .tt-held-products summary{font-weight:750;cursor:pointer}
.catalog-storefront .tt-checkout-return{background:#eaf8ef;color:#176344;border-radius:9px;padding:12px;font-weight:650}
.catalog-storefront .tt-proof-ready{outline:3px solid #77a8dc;outline-offset:2px}
.catalog-storefront .tt-cancel-hold{border:1px solid #efced0!important;color:#a73442!important;background:#fff7f7!important}
.tt-checkout-resume{position:fixed;right:18px;bottom:92px;z-index:40;border:2px solid white;border-radius:999px;padding:15px 20px;color:white;background:#1767d7;box-shadow:0 5px 20px #173b6033;font:750 14px 'Segoe UI',Arial,sans-serif;cursor:pointer;max-width:calc(100vw - 36px)}
@media(min-width:769px){.tt-checkout-resume{bottom:24px}}
@media(max-width:420px){.catalog-storefront .tt-payment-contact{gap:8px;padding:12px}.catalog-storefront .tt-payment-contact a{font-size:24px}.catalog-storefront .tt-payment-contact [data-copy-number]{max-width:95px;font-size:11px;padding:9px}}
/* Consolidated shipping: compact order preview and readable incident entry. */
.catalog-storefront .tt-buyer-action .tt-consolidation-preview{display:grid;gap:10px}
.catalog-storefront .tt-buyer-action .tt-consolidation-preview .tt-order-section{padding:12px;margin:0}
.catalog-storefront .tt-buyer-action .tt-consolidation-preview p{margin:8px 0 0}
.catalog-storefront .tt-buyer-action textarea{width:100%;min-height:110px;padding:12px 14px;border:1px solid var(--shop-border);border-radius:12px;box-sizing:border-box;font:inherit;resize:vertical}
