/* Shared storefront components: R2. The same file is bundled in app previews. */
body:not(.preview-palette):not(.preview-overview)>header{min-height:56px;padding-block:6px;gap:8px}
body:not(.preview-palette):not(.preview-overview)>header .header-icon{width:40px;height:40px;min-height:40px;padding:8px;border-radius:13px}
body>header #cartButton .cart-3d{width:29px;height:29px;overflow:visible;filter:drop-shadow(0 2px 1px #0003)}
body:not(.preview-palette):not(.preview-overview)>#root{padding-top:6px}
body:not(.preview-palette):not(.preview-overview) .merchant-card{margin-block:0 6px!important;padding:11px 12px;border-radius:16px}
.merchant-card .builder-name,.merchant-info h1{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45}
.merchant-social{min-width:0;margin:0 0 14px}

/* A low capsule with labelled, pastel contact actions. Extra links scroll sideways. */
body .social.contact-actions{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:0;width:100%;max-width:100%;min-width:0;margin:0;padding:4px 10px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;border:1px solid var(--stroke);border-radius:999px;background:color-mix(in srgb,var(--brand) 3%,var(--surface));color:var(--ink);box-shadow:0 2px 8px #102f5305}
body .social.contact-actions [data-platform]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;flex:1 0 68px;width:auto;min-width:68px;height:52px;min-height:52px;padding:3px 5px!important;border:0!important;border-radius:16px!important;background:transparent!important;color:var(--ink)!important;box-shadow:none!important;text-decoration:none}
body .social.contact-actions [data-platform]+[data-platform]::before{content:"";position:absolute;inset-inline-start:0;top:12px;bottom:12px;width:1px;background:var(--stroke)}
body .social.contact-actions .contact-icon{position:static;display:grid;place-items:center;width:27px;height:27px;flex:none;overflow:visible;clip-path:none;border-radius:10px;background:color-mix(in srgb,var(--tile,var(--brand)) 12%,var(--surface));color:var(--tile,var(--price-ink))}
body .social.contact-actions [data-platform] .contact-icon img.brand-mark,body .social.contact-actions .contact-icon svg{width:18px!important;height:18px!important;padding:0!important;filter:none!important;background:transparent!important;object-fit:contain}
body .social.contact-actions [data-platform=copy] .contact-icon{color:var(--price-ink,var(--brand))}
body .social.contact-actions .contact-label{position:static;display:block;width:auto;max-width:12ch;height:auto;clip-path:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:15px;font-weight:700;color:var(--ink)}
.builder-header .contact-actions{max-width:280px!important}
.drawer-identity .contact-actions{margin-top:8px!important}

/* One card geometry for the catalog and all collection rails. */
body .product.store-product{display:flex;flex-direction:column;position:relative;min-width:0;padding:0;overflow:hidden;border:1px solid #dce1e9;border-radius:14px;background:#fff;color:#1e2d41;container-type:inline-size}
body .product.store-product .product-visual{position:relative;width:100%;padding:0;flex:none}
body .product.store-product .product-image{display:block;width:100%;aspect-ratio:1;padding:0;margin:0;min-height:0;overflow:hidden}
body .product.store-product .product-image img{width:100%;height:100%;aspect-ratio:1;object-fit:cover;object-position:center}
body .product.store-product .body{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;padding:10px!important;gap:12px;border-top:1px solid #f0f2f6}
body .product.store-product h3{display:block;height:1.5em;min-height:1.5em;margin:0;font-size:14px;line-height:1.5;overflow:hidden}
body .product.store-product .product-title{display:block;width:100%;max-height:none;min-height:0;padding:0;font:inherit;color:inherit;text-align:start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:unset}
.product-purchase{display:grid;grid-template-columns:minmax(0,1fr)38px;direction:rtl;align-items:center;gap:6px;margin-top:auto;min-height:46px}
body .store-product .product-purchase .prices{display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:46px;gap:2px;margin:0;direction:rtl;line-height:1.4}
body .store-product .prices strong{font-size:clamp(11px,calc((100cqi - 62px) / var(--price-width,6)),18px);font-weight:800;white-space:nowrap}
body .store-product .prices del{font-size:clamp(10px,7cqi,13px);white-space:nowrap}
.prices strong,.prices.is-discounted strong{color:var(--price-ink,var(--brand))!important}
.prices del,.prices.is-discounted del,.compact-product .prices.is-discounted del{color:#bd3449;text-decoration-color:currentColor;text-decoration-thickness:1px}
body .product.store-product .quick-view{position:static;display:grid;place-items:center;width:38px;min-width:38px;height:42px;min-height:42px;padding:0;margin:0;border:1px solid var(--brand);border-radius:10px;background:var(--brand);color:var(--solid-ink,#fff);font-size:27px;line-height:1;font-weight:500;box-shadow:0 2px 5px #102f5310}
body .product.store-product .quick-view:disabled{background:#e8ebef;color:#8a949f;border-color:#dfe3e8;box-shadow:none;opacity:1}
.store-product .product-badges{inset:6px;bottom:auto;display:flex;align-items:flex-start;gap:4px;direction:rtl}
.store-product .discount-badge{margin-inline-start:0;background:#c3344d;color:#fff}
.store-product .discount-badge,.store-product .free-delivery-badge,.unavailable-badge{font-size:10px;line-height:1.4;padding:4px 6px;border-radius:7px;max-width:100%;margin-bottom:0}
.unavailable-badge{margin-inline-start:0;background:#e5e8ed;color:#64717f;font-weight:700}
.store-product.is-unavailable .product-image img{opacity:.46;filter:grayscale(.35)}
body .product.store-product.is-unavailable .product-title{color:#7a8793}
body .prices.is-unavailable strong,body .prices.is-unavailable del{color:#7a8793!important;text-decoration-color:currentColor}
.collection-rail>.product.store-product{flex:0 0 calc((100% - 12px)/2)}
@media(min-width:700px){.collection-rail>.product.store-product{flex-basis:calc((100% - 36px)/4)}}
@media(max-width:350px){body .product.store-product .body{padding:8px!important;gap:9px}.product-purchase{grid-template-columns:minmax(0,1fr)32px;gap:4px}body .product.store-product .quick-view{width:32px;min-width:32px;font-size:24px}}

/* Product sheet: physical right close/inquiry, physical left primary purchase. */
#dialog.product-detail{padding:14px;width:min(560px,calc(100% - 20px));max-width:560px;max-height:94dvh;border-radius:22px;background:var(--surface);overflow-x:hidden}
.product-detail .detail-toolbar{display:flex;direction:ltr;align-items:flex-start;justify-content:space-between;gap:10px;min-height:40px;margin-bottom:12px}
#dialog.product-detail .detail-toolbar .close{position:static;float:none;width:38px;height:38px;min-height:38px;flex:none;margin:0;padding:8px;background:var(--surface);border:1px solid var(--stroke);border-radius:12px;color:var(--ink)}
.product-detail .detail-toolbar .detail-status-strip{display:flex;direction:rtl;flex:1;justify-content:flex-end;align-items:center;gap:5px;flex-wrap:wrap;margin:0;padding:0;background:none;font-size:11px}
.detail-toolbar .detail-status-strip #available,.detail-toolbar .discount-badge,.detail-toolbar .free-delivery-badge{display:inline-flex;align-items:center;padding:6px 8px;min-height:30px;margin:0;border:0;border-radius:10px;font-size:11px;font-weight:700;line-height:1.3;max-width:none;white-space:nowrap}
.detail-toolbar .detail-status-strip #available{background:#e7f6ed;color:#197340}
.detail-toolbar .detail-status-strip .discount-badge{background:#fff0f2;color:#b42b44}
.detail-toolbar .detail-status-strip .free-delivery-badge{background:color-mix(in srgb,var(--brand) 9%,var(--surface));color:var(--price-ink,var(--brand))}
.is-unavailable .detail-toolbar .detail-status-strip #available{background:#e8ebef;color:#6f7c89}
.product-detail .gallery{margin:0 0 10px;line-height:0}
.product-detail .gallery img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:1;object-fit:contain;border-radius:14px;background:var(--soft)}
.product-detail h2{margin:12px 0 0;font-size:20px;line-height:1.5;overflow-wrap:anywhere}
.product-detail .detail-price-quantity{direction:rtl;display:flex;align-items:center;gap:12px;margin:12px 0 16px}
.product-detail #detailPrice{min-width:0;margin:0;flex:1}
.product-detail #detailPrice .prices{gap:0;line-height:1.3;align-items:flex-start}
.product-detail #detailPrice .prices strong{font-size:clamp(25px,7vw,32px);white-space:nowrap}
.product-detail #detailPrice .prices del{font-size:16px;line-height:1.5}
.product-detail .quantity.product-quantity{width:114px;flex:0 0 114px;gap:3px;align-items:center;direction:ltr;overflow:visible;margin:0}
#dialog.product-detail .product-quantity #qtyMinus,#dialog.product-detail .product-quantity #qtyPlus,#dialog.product-detail .product-quantity input{width:36px;min-width:36px;flex:0 0 36px;height:42px;min-height:42px;border:1.5px solid color-mix(in srgb,var(--brand) 50%,var(--stroke));border-radius:10px;background:var(--surface);color:var(--ink);text-align:center;padding:3px;font-size:18px;opacity:1}
#dialog.product-detail .product-quantity input{width:36px!important}
.product-detail .product-quantity button:disabled,.product-detail .product-quantity button[aria-disabled=true]{color:var(--muted);border-color:var(--stroke);background:var(--soft)}
.product-detail .product-quantity input{font-size:16px;font-weight:700;border-color:var(--stroke);appearance:textfield;-moz-appearance:textfield}
.product-detail .product-quantity input::-webkit-inner-spin-button,.product-detail .product-quantity input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.product-detail .variant-cards:not([hidden]){display:flex;flex-wrap:nowrap;gap:0;overflow:auto;padding:0;margin:8px 0 16px;border:1px solid var(--stroke);border-radius:12px;background:var(--surface)}
.product-detail .variant-cards button{flex:1 0 auto;max-width:100%;min-height:40px;border:0;border-inline-end:1px solid var(--stroke);border-radius:0;padding:8px 12px;background:transparent;color:var(--ink);font-size:13px;line-height:1.4;box-shadow:none}
.product-detail .variant-cards button:last-child{border-inline-end:0}
.product-detail .variant-cards button[aria-pressed=true]{border-radius:0;box-shadow:inset 0 0 0 1.5px var(--brand);color:var(--price-ink,var(--brand));background:color-mix(in srgb,var(--brand) 10%,var(--surface))}
.product-detail .variant-cards button[aria-pressed=true]::after{content:'✓';font-size:12px}
.product-detail .variant-cards button:disabled{color:var(--muted);background:var(--soft);text-decoration:line-through}
.product-detail .product-description-panel{margin:12px 0;padding-top:12px;border-top:1px solid var(--stroke)!important}
.product-detail .product-buy{display:flex;direction:ltr;gap:8px;align-items:stretch;position:sticky;bottom:-14px;padding:10px 0 max(10px,env(safe-area-inset-bottom));margin-top:14px;background:var(--surface);box-shadow:0 -5px 12px color-mix(in srgb,var(--surface) 85%,transparent)}
.product-detail .product-buy #add{flex:1;min-height:48px;border-radius:12px;font-size:15px;direction:rtl}
.product-detail .product-buy a.whatsapp.inquiry{flex:0 0 auto;min-height:48px;max-width:42%;padding:10px 12px;border:1px solid #26945b;border-radius:12px;background:var(--surface);color:#21814d;direction:rtl;font-size:13px}
.product-detail .product-buy .brand-mark{background:none;padding:0}
@media(max-width:350px){.product-detail #detailPrice .prices strong{font-size:24px}.product-detail .quantity.product-quantity{width:102px;flex-basis:102px}#dialog.product-detail .product-quantity #qtyMinus,#dialog.product-detail .product-quantity #qtyPlus,#dialog.product-detail .product-quantity input{width:32px!important;min-width:32px;flex-basis:32px}.detail-toolbar .detail-status-strip #available,.detail-toolbar .discount-badge,.detail-toolbar .free-delivery-badge{padding:5px 6px;font-size:10px}.product-detail .product-buy #add{font-size:13px}.product-detail .product-buy a.whatsapp.inquiry{padding:8px;font-size:12px}}

/* Interactions are short and only animate opacity/transform; never block checkout. */
@media(prefers-reduced-motion:no-preference){
 .store-product{transition:box-shadow .18s ease,transform .18s ease}
 .store-product .quick-view,.contact-actions [data-platform],.product-buy>*{transition:transform .16s ease,background-color .16s ease}
 .store-product .quick-view:not(:disabled):active,.product-buy>*:active{transform:scale(.97)}
 #dialog.product-detail[open]{animation:product-sheet-in .22s cubic-bezier(.2,.7,.2,1)}
 #dialog.product-detail::backdrop{animation:product-backdrop-in .2s ease}
 @media(hover:hover){.store-product:hover{transform:translateY(-2px);box-shadow:0 6px 18px #102f5314!important}}
}
@keyframes product-sheet-in{from{opacity:0;transform:translateY(10px) scale(.99)}to{opacity:1;transform:none}}
@keyframes product-backdrop-in{from{opacity:0}to{opacity:1}}

/* Preserve the compact 330px color preview; controls remain passive there. */
.preview-palette .product.store-product .body{padding:5px!important;gap:2px}
.preview-palette .product.store-product h3{font-size:12px;line-height:1.4;height:1.4em;min-height:1.4em}
.preview-palette .product-purchase{display:block;min-height:0}
.preview-palette .store-product .product-purchase .prices{min-height:0;gap:0;line-height:1.2}
.preview-palette .store-product .prices strong{font-size:13px;line-height:1.4}
.preview-palette .store-product .prices del{font-size:10px;line-height:1.3}
.preview-overview .merchant-social{display:none}

:root[data-theme=dark] .product-detail{--price-ink:color-mix(in srgb,var(--brand) 55%,#fff)}
:root[data-theme=dark] .product-detail .prices del{color:#f3a2af}
