#merchant-browser{margin:20px 0;border:1px solid #e8dfd9;border-radius:14px;padding:16px;background:#faf7f2}#merchant-browser summary{cursor:pointer;font-weight:700;color:#64162e;font-size:18px}.store-search-label{display:block;margin:14px 0;max-width:420px}.store-search-label input{display:block;width:100%;margin-top:8px;padding:11px;border:1px solid #e8dfd9;border-radius:8px;font:inherit}.customer-store-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.customer-store-grid button{padding:14px;border:1px solid #e8dfd9;border-radius:10px;background:white;color:#64162e;text-align:start;font:inherit;cursor:pointer}.customer-store-grid button[aria-pressed=true]{border-color:#64162e;background:#f5e9ed}.customer-store-grid strong,.customer-store-grid small{display:block;overflow-wrap:anywhere}.customer-store-grid small{font-size:12px;margin-top:6px;color:#796d71}.selected-store-note{display:flex;align-items:center;gap:15px;justify-content:space-between;margin-top:15px}.selected-store-note button,.customer-store-link{background:transparent;color:#64162e;border:1px solid #64162e;padding:8px 12px;border-radius:8px;font:inherit;cursor:pointer}.customer-store-link{margin:0 0 18px}#product-detail .thumbs{display:flex!important;gap:10px;overflow-x:auto;max-width:100%;margin:0 0 14px;padding:4px}#product-detail .thumbs button{flex:0 0 65px;padding:3px;border:1px solid #e8dfd9;border-radius:8px;background:white;cursor:pointer}#product-detail .thumbs button[aria-pressed=true]{border:2px solid #64162e}#product-detail .thumbs img{display:block;width:100%;height:82px;object-fit:contain;position:static!important}.product-photos-label{font-size:13px;margin:0 0 8px;color:#64162e}#detail-image{cursor:zoom-in}.trial-media.single-photo img,.product-card .trial-media.single-photo img,#product-detail .trial-media.single-photo img{left:0!important;top:0!important;width:100%!important;height:100%!important;object-fit:contain!important}#customer-image-viewer{width:min(1000px,calc(100vw - 24px));max-height:94dvh;overflow:auto;border:0;border-radius:16px;padding:16px;background:#fff}#customer-image-viewer::backdrop{background:rgb(25 10 17 / .8)}.customer-image-toolbar{position:sticky;top:0;background:white;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:8px 0 16px;color:#64162e}.customer-image-toolbar button{padding:10px 15px;font:inherit;border:1px solid #64162e;background:white;color:#64162e;border-radius:8px;cursor:pointer}#customer-image-viewer>img{display:block;width:100%;max-height:80dvh;object-fit:contain}[hidden]{display:none!important}
@media(max-width:700px){.customer-store-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-store-grid button{padding:12px}.selected-store-note{align-items:start;flex-direction:column}.customer-image-toolbar strong{font-size:14px}}

#product-dialog{max-height:90dvh!important;overflow:auto!important}#product-dialog .customer-product-header{position:sticky;top:0;z-index:5;display:flex;justify-content:flex-start;align-items:center;width:100%;background:#fffdf9;padding:10px 0 16px;margin-bottom:16px;border-bottom:1px solid #e8dfd9}#product-dialog .customer-product-header .close{position:static!important;inset:auto!important;transform:none!important;width:auto!important;height:auto!important;min-height:44px;padding:10px 20px;margin:0;border:1px solid #64162e;border-radius:8px;background:#fff;color:#64162e;font:inherit;font-weight:700;cursor:pointer}

#product-detail .thumbs{justify-content:center;margin:0 0 10px;padding:4px}#product-detail .thumbs[hidden]{display:none!important}.product-photos-label{text-align:center;margin:12px 0 6px}#product-detail .trial-media{width:min(100%,34dvh);aspect-ratio:2/3;max-height:51dvh;margin-inline:auto}#product-detail .detail>div:first-child>img{display:block;max-height:51dvh;width:100%;object-fit:contain;margin-inline:auto}#product-detail .photo-modes{justify-content:center;flex-wrap:wrap;margin:10px 0}#product-detail .thumbs button{flex-basis:58px}#product-detail .thumbs img{height:72px}

#merchant-browser .customer-store-grid{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x proximity;padding:5px 2px 12px;scrollbar-width:thin;scrollbar-color:#64162e #eee6e0;cursor:grab}#merchant-browser .customer-store-grid button{flex:0 0 180px;scroll-snap-align:start;padding:0 0 14px;border-radius:12px;overflow:hidden;text-align:center}#merchant-browser .customer-store-grid strong{padding:10px 10px 0;font-size:15px}#merchant-browser .customer-store-grid small{padding:0 8px}.store-preview,.store-all-cover{display:block;position:relative;width:100%;height:210px;background:#f4eee8;overflow:hidden}.store-preview img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}.store-preview.paired-store-photo img{position:absolute;inset-block-start:0;inset-inline-start:0;width:200%;max-width:none;height:100%;object-fit:fill}.store-preview.paired-store-photo{direction:ltr}.store-all-cover{display:flex;flex-direction:column;justify-content:center;align-items:center;background:#64162e;color:white;font-size:40px}.store-all-cover small{color:white;font-size:10px;letter-spacing:4px}.store-rail-controls{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:13px;color:#796d71}.store-rail-controls span{margin-inline-end:auto}.store-rail-controls button{border:1px solid #e8dfd9;background:white;color:#64162e;border-radius:8px;padding:8px 12px;font:inherit;cursor:pointer}#merchant-browser details>summary{list-style:none;pointer-events:none}#merchant-browser summary::-webkit-details-marker{display:none}
@media(max-width:700px){#merchant-browser .customer-store-grid button{flex-basis:145px}.store-preview,.store-all-cover{height:175px}.store-rail-controls{flex-wrap:wrap}}

.store-browser-content>h2{font-size:20px;color:#64162e;margin:0 0 12px}

/* Abayas first, followed by store cards and their search. */
#catalog{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}#catalog .empty{grid-column:1/-1}.store-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.store-section-heading h2,.store-section-heading h1{margin:0;color:#64162e}.store-section-heading a,.browse-all-abayas{color:#64162e;font-weight:700;text-decoration:none;border-bottom:1px solid #64162e;padding:8px 0}.browse-all-abayas{display:table;margin:24px auto}#stores{padding-block:30px}#stores .store-directory{grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}#stores .customer-store-grid button{padding:0 0 14px;overflow:hidden;text-align:center}#stores .customer-store-grid strong{padding:10px 8px 0}#merchant-browser .store-search-label,#stores .store-search-label{margin:24px auto 0;max-width:460px;width:100%}#selected-store-note{margin:0 0 18px}
@media(max-width:1000px){#catalog,#stores .store-directory{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){#catalog,#stores .store-directory{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.store-section-heading h2,.store-section-heading h1{font-size:20px}.store-section-heading a{font-size:13px}}

#remaining-catalog{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}#remaining-abayas{margin:34px 0}#merchant-browser .all-stores-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid #b38a50;border-radius:28px;background:#64162e;color:#fff;padding:12px 20px;min-height:48px;white-space:nowrap;box-shadow:0 6px 24px #0003;transition:background .15s,box-shadow .15s}#merchant-browser .all-stores-button:hover{background:#761c38;box-shadow:0 6px 24px #0003}#merchant-browser .all-stores-button:focus-visible{outline:3px solid #b38a50;outline-offset:4px}@media(max-width:1000px){#remaining-catalog{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){#remaining-catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#merchant-browser .all-stores-button{padding:10px 14px}}

.product-choice-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}.product-choice-controls label{display:grid;gap:8px}.product-choice-controls select{width:100%;padding:14px;border:1px solid #dbc9b4;border-radius:10px;color:#64162e;background:#fff;font:inherit}.product-size-help{grid-column:1/-1;font-size:13px;margin:0}@media(max-width:480px){.product-choice-controls{grid-template-columns:1fr}}

#product-detail .thumbs button{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:90px;height:auto;padding:7px;border:1px solid #dbc9b4;border-radius:10px;background:#fff;color:#64162e}#product-detail .thumbs button[aria-pressed=true]{border:2px solid #64162e;background:#f4e8ed}#product-detail .thumbs button span{font-size:12px;line-height:1.4}#product-detail .thumbs button img{width:74px;height:90px;object-fit:contain}
/* Keep the close bar outside the scrollable product body. */
#product-dialog[open]{display:flex!important;flex-direction:column;box-sizing:border-box;padding:0!important;max-height:90dvh!important;overflow:hidden!important}
#product-dialog .customer-product-header{position:relative!important;top:auto!important;flex:0 0 auto;box-sizing:border-box;margin:0!important;padding:14px 22px!important;width:100%;background:#fffdf9;z-index:2}
#product-dialog #product-detail{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding:22px;scrollbar-width:thin;scrollbar-color:#64162e #eee6e0}
#product-dialog #product-detail::-webkit-scrollbar{width:8px}#product-dialog #product-detail::-webkit-scrollbar-thumb{background:#64162e;border-radius:8px}#product-dialog #product-detail::-webkit-scrollbar-track{background:#eee6e0}
@media(max-width:700px){#product-dialog .customer-product-header{padding:10px 14px!important}#product-dialog #product-detail{padding:16px}}


/* Customer order history: compact cards, persistent categories and optional details. */
#orders.narrow{max-width:1120px;width:100%;margin-inline:auto}#orders>h1{font-size:clamp(32px,5vw,48px);margin-bottom:10px}.customer-orders-intro{color:#786b6f;margin:0 0 24px}.customer-order-filters{display:flex;gap:8px;flex-wrap:wrap;padding:8px;background:#f0e8e5;border-radius:16px}.customer-order-filters button{display:flex;align-items:center;gap:10px;border:0;border-radius:11px;padding:12px 18px;font:inherit;background:transparent;color:#64162e;cursor:pointer}.customer-order-filters button[aria-pressed=true]{background:#64162e;color:white;box-shadow:0 4px 12px #64162e20}.customer-order-filters button span{font-size:12px;background:#ffffff60;border-radius:20px;min-width:24px;padding:2px 6px;text-align:center}.customer-order-filters button:focus-visible{outline:2px solid #64162e;outline-offset:3px}.customer-orders-count{font-size:13px;color:#786b6f;margin:18px 4px}.customer-order-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}.customer-order-card{border:1px solid #e8dfd9;border-radius:20px;background:#fffdf9;padding:24px;box-shadow:0 6px 24px #39212b06;min-width:0;overflow-wrap:anywhere}.customer-order-top{display:flex;justify-content:space-between;align-items:start;gap:12px}.customer-order-top small,.customer-order-top time{font-size:12px;color:#786b6f}.customer-order-top h3{font-size:20px;margin:4px 0 6px;color:#64162e}.customer-order-status{font-size:12px;white-space:nowrap;font-weight:600;border-radius:30px;padding:7px 12px;background:#f3e6eb;color:#64162e}.customer-order-status.delivered{background:#e7f0e9;color:#35664c}.customer-order-status.cancelled{background:#f6e8e6;color:#93483e}.customer-order-status.refunded{background:#eeeaf7;color:#6a5589}.customer-order-progress{list-style:none;padding:0;margin:24px 0;display:flex;gap:4px}.customer-order-progress li{position:relative;flex:1;text-align:center;font-size:10px;color:#8e8186;line-height:1.6}.customer-order-progress li:before{content:'';position:absolute;top:13px;inset-inline-start:50%;width:100%;height:2px;background:#e7dfe2}.customer-order-progress li:last-child:before{display:none}.customer-order-progress li.done:before{background:#b68192}.customer-order-progress li span{position:relative;display:grid;place-items:center;width:28px;height:28px;margin:0 auto 6px;background:#f0ebed;border:2px solid #fffdf9;border-radius:50%;color:#85777e;box-sizing:border-box}.customer-order-progress li.done{color:#64162e}.customer-order-progress li.done span{background:#64162e;color:white}.customer-order-progress li[aria-current=step] span{box-shadow:0 0 0 3px #f0e0e6}.customer-order-summary{display:flex;justify-content:space-between;gap:18px;margin-top:20px}.customer-order-summary strong{font-size:14px}.customer-order-summary p{font-size:13px;line-height:1.8;color:#64595e;margin:5px 0}.customer-order-summary small{font-size:12px;color:#786b6f}.customer-order-total{flex-shrink:0;text-align:end}.customer-order-total strong{display:block;font-size:18px;color:#64162e;white-space:nowrap;margin-top:5px}.customer-order-arrival{background:#f7f1ee;border-radius:10px;font-size:12px;padding:12px;margin:18px 0;line-height:1.8}.customer-order-arrival strong{display:block;font-weight:500}.customer-order-arrival.delivered{background:#eff5ef;color:#35664c}.customer-order-delay{border-inline-start:3px solid #b08950;padding:10px 12px;font-size:12px;background:#faf3e8;border-radius:8px}.customer-order-details{border-top:1px solid #eee5df;margin-top:18px}.customer-order-details summary{cursor:pointer;padding:16px 0;font-size:13px;color:#64162e;font-weight:600}.customer-order-items,.customer-order-fulfilments{list-style:none;padding:0;margin:0}.customer-order-items li{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #eee5df;font-size:13px}.customer-order-items strong,.customer-order-items small,.customer-order-items span{display:block;margin-bottom:5px}.customer-order-items small,.customer-order-items span{color:#786b6f;font-size:12px}.customer-order-facts{font-size:12px;margin:16px 0}.customer-order-facts>div{display:flex;justify-content:space-between;gap:12px;margin:8px 0}.customer-order-facts dd{margin:0}.customer-order-fulfilments li{font-size:12px;display:flex;justify-content:space-between;gap:12px;margin:10px 0}.customer-order-fulfilments span{color:#786b6f}.customer-order-demo{font-size:11px;color:#897551;background:#faf4e9;padding:10px;border-radius:8px}.customer-order-actions{display:flex;flex-wrap:wrap;gap:10px}.customer-order-actions .button{font-size:12px;min-height:40px;padding:10px 14px;border-radius:10px}.customer-orders-empty{grid-column:1/-1;text-align:center;padding:50px 20px;border:1px dashed #d9c7cd;border-radius:20px;color:#786b6f}.customer-orders-empty>span{font-size:40px;color:#a57687}.customer-orders-empty h3{color:#64162e;font-size:20px}.customer-orders-empty p{font-size:14px}
@media(max-width:740px){.customer-order-grid{grid-template-columns:1fr}.customer-order-card{padding:20px}.customer-order-filters{flex-wrap:nowrap;overflow-x:auto;padding:7px;scrollbar-width:thin}.customer-order-filters button{flex-shrink:0;padding:10px 12px;font-size:13px}.customer-order-summary{gap:12px}.customer-order-total strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){.customer-order-card *{scroll-behavior:auto}}

/* Keep account exit visible above profile editors. */
#signed-in>.account-bottom{position:sticky;top:12px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 20px;padding:12px 16px;background:#fffdf9;border:1px solid #e8dfd9;border-radius:14px;box-shadow:0 4px 16px #64162e08}#signed-in>.account-bottom #logout{background:#64162e;color:white;border:1px solid #64162e;border-radius:10px;padding:10px 18px;font:inherit;font-weight:600;min-height:44px;cursor:pointer}#signed-in>.account-bottom #logout:focus-visible{outline:2px solid #64162e;outline-offset:3px}#signed-in>.account-bottom>span{color:#796d71;font-size:11px;letter-spacing:1px}@media(max-width:480px){#signed-in>.account-bottom>span{display:none}#signed-in>.account-bottom{top:8px}}

#account-exit{display:none!important}body:has(#signed-in:not(.hidden)) #account-exit{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;background:#64162e;color:#fff;border:1px solid #64162e;border-radius:10px;min-height:44px;padding:9px 12px;font:inherit;font-size:13px;cursor:pointer}#account-exit svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}#account-exit:focus-visible{outline:2px solid #64162e;outline-offset:3px}.header-actions{flex-wrap:wrap}@media(max-width:480px){#account-exit{padding:8px!important;font-size:11px!important;gap:4px!important}}
