/* Shared editorial rhythm, controls and responsive overlays. */
:root { --muted:#77716A; --bronze:#9A7B5E; --warm-line:#d8cec2; --control-height:48px; }
html[data-theme="dark"] { --muted:#B7B0A6; --bronze:#C4A27D; --warm-line:#51483f; }
html { scroll-snap-type:none; }
body { line-height:1.6; }
body.has-dialog { overflow:hidden; }
button, input, select, textarea { font:inherit; }
button, a, select { touch-action:manipulation; }
:focus-visible { outline:2px solid var(--bronze); outline-offset:4px; }
.text-link { font-size:12px; text-decoration:underline; text-underline-offset:4px; color:var(--ink); min-height:36px; }
.eyebrow { font-family:'Manrope',sans-serif; color:var(--bronze); font-size:11px; line-height:1.5; letter-spacing:.16em; text-transform:uppercase; }
html[lang="ar"] .eyebrow { font-family:inherit; letter-spacing:0; }
.site-header.is-scrolled { border-color:var(--warm-line); }
.site-header .theme-picker-toggle { min-height:36px; height:36px; }
.theme-picker-current { transform:translateX(-3px); }
#collection > div { padding-block:80px; }
#collection-title { font-size:clamp(32px,3.2vw,46px); line-height:1.15; }
#collection .collection-controls { gap:20px; align-items:end; }
#collection .collection-controls label { font-size:11px; color:var(--muted); letter-spacing:.03em; }
#collection .collection-controls select { font-size:14px; min-height:44px; height:44px; margin-top:4px; padding-block:8px; color:var(--ink); }
#product-grid { gap:40px 24px; }
#collection .product-card > div:first-child { aspect-ratio:4/5; }
#collection .product-card > div:nth-child(2) { display:flex; flex-direction:column; padding-top:16px; }
#collection .product-card > div:nth-child(2) > div:first-child { min-height:52px; display:flex; flex-wrap:wrap; gap:8px 12px; align-items:baseline; }
#collection .product-card h3 { font-size:clamp(22px,1.65vw,27px); line-height:1.2; }
#collection .product-card [data-price-kwd] { color:var(--bronze); font-family:'Manrope',sans-serif; font-size:13px; font-weight:400; letter-spacing:.1em; }
#collection .product-card > div:nth-child(2) > button { width:100%; border-radius:0; margin:12px 0 0; height:44px; color:var(--ink); font-size:12px; letter-spacing:.035em; box-shadow:none; }
#collection .product-card > div:nth-child(2) > button:hover { background:var(--sandstone); transform:none; box-shadow:none; }
.product-card:hover .product-image { transform:scale(1.018); filter:none; }
.product-image { transition:transform .45s ease; }
.product-stock { font-size:10px; padding:6px 10px; letter-spacing:.1em; }
.store-dialog { padding:0; border:0; overflow:visible; max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); }
.store-dialog::backdrop { background:rgba(20,17,14,.62); backdrop-filter:blur(5px); }
.dialog-close { display:flex; align-items:center; justify-content:center; position:absolute; inset-inline-end:14px; top:14px; width:40px; height:40px; z-index:8; border:1px solid var(--warm-line); border-radius:50%; background:var(--paper); color:var(--ink); font-family:Arial,sans-serif; font-size:28px; line-height:1; }
.dialog-close:hover { background:var(--sandstone); }
#product-dialog.store-dialog { width:fit-content; margin:auto; max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); }
#product-dialog .store-panel { --gallery-width:min(520px, calc((100dvh - 120px)*.8), calc((100vw - 48px)*.5)); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:minmax(0,1fr) auto; width:calc(var(--gallery-width)*2); height:calc(var(--gallery-width)*1.25 + 76px); max-height:calc(100dvh - 32px); aspect-ratio:auto; overflow:hidden; }
#product-dialog .store-panel > .product-layout.grid { display:contents; }
#product-dialog #product-dialog-gallery { grid-column:1; grid-row:1/3; align-self:stretch; position:relative; width:100%; height:100%; max-height:none; aspect-ratio:auto; display:flex; flex-direction:column; overflow:hidden; background:var(--surface-alt); }
#product-dialog #product-gallery-frame { position:relative; inset:auto; width:100%; height:auto; min-height:0; flex:none; aspect-ratio:4/5; overflow:hidden; touch-action:pan-y pinch-zoom; }
#product-dialog-image { object-fit:cover; cursor:zoom-in; }
#product-dialog #product-gallery-thumbnails { position:relative; inset:auto; z-index:auto; display:flex; flex:none; width:100%; height:76px; max-height:none; padding:8px 12px; gap:8px; background:var(--paper); overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity; }
#product-dialog .gallery-thumb { flex:0 0 46px; height:58px; aspect-ratio:4/5; border:2px solid transparent; opacity:.65; padding:2px; background:transparent; }
#product-dialog .gallery-thumb[aria-current="true"] { border-color:var(--bronze); opacity:1; }
#product-dialog .gallery-thumb:hover { opacity:1; }
#product-dialog .gallery-control { width:40px; height:40px; border-color:rgba(255,255,255,.7); background:rgba(25,24,23,.76); color:#fff; box-shadow:none; }
#product-dialog .gallery-control:hover { background:#191817; }
#product-dialog #product-gallery-count { bottom:12px; font-size:11px; letter-spacing:.08em; }
#product-gallery-note { bottom:12px; inset-inline-start:12px; max-width:76%; }
.gallery-more-hint { position:absolute; top:8px; inset-inline-end:12px; z-index:3; font-size:10px; }
.image-enlarge { position:absolute; inset-inline-start:12px; top:12px; z-index:3; display:flex; align-items:center; gap:7px; min-height:36px; padding:7px 11px; color:#fff; background:rgba(25,24,23,.74); font-size:11px; }
#product-dialog .product-dialog-info { grid-column:2; grid-row:1; display:block; min-width:0; min-height:0; overflow:hidden; padding:0; }
#product-dialog .product-dialog-scroll { height:100%; overflow-y:auto; padding:38px 32px 24px; scrollbar-width:thin; overscroll-behavior:contain; }
#product-dialog-name { font-size:38px; line-height:1.15; margin-bottom:10px; }
#product-dialog-price { color:var(--bronze); font-size:15px; font-weight:400; letter-spacing:.06em; }
#product-detail-copy { margin-top:22px; display:grid; gap:12px; }
#product-detail-copy .product-detail-section { margin:0; border:0; border-inline-start:1px solid var(--warm-line); padding-inline-start:13px; display:block; }
#product-detail-copy h3 { font-family:'Cormorant Garamond',Georgia,serif; color:var(--bronze); font-size:11px; line-height:1.5; padding-top:0; letter-spacing:.14em; font-weight:400; text-transform:uppercase; }
html[lang="en"] #product-detail-copy h3 { letter-spacing:.14em; }
html[lang="ar"] #product-detail-copy h3 { font-family:inherit; font-size:13px; letter-spacing:0; }
#product-detail-copy p { color:var(--muted); margin:4px 0 0; font-size:13px; line-height:1.65; }
.size-label-row { margin-top:28px; display:flex; align-items:center; justify-content:space-between; }
#product-dialog label { font-size:12px; color:var(--ink); font-weight:500; }
#product-dialog .store-field { min-height:var(--control-height); background:var(--surface); border:1px solid var(--warm-line); border-radius:0; color:var(--ink); font-size:15px; padding-inline:12px; box-shadow:none; }
#product-dialog .store-field:focus { border-color:var(--bronze); outline:1px solid var(--bronze); outline-offset:0; }
#product-dialog .store-select-wrap select { padding-inline-end:36px; }
#product-dialog #product-notes { height:80px; resize:none; }
#product-dialog-status { min-height:0; margin-top:10px; color:var(--ink); font-size:12px; }
#product-dialog-status:empty { display:none; }
#product-customisations:empty { display:none; }
.customisation-field { margin-top:20px; }
.customisation-field label { display:block; margin-bottom:8px; }
#product-dialog .product-dialog-action { grid-column:2; grid-row:2; padding:16px 32px 22px; border-top:1px solid var(--warm-line); background:var(--paper); box-shadow:none; }
.product-order-note { color:var(--muted); font-size:11px; line-height:1.6; margin:0 0 12px; }
#add-to-bag, .cart-primary-action { min-height:48px; background:#76583e; color:#fff; font-size:13px; font-weight:500; letter-spacing:.02em; border:1px solid transparent; }
#add-to-bag:hover:not(:disabled), .cart-primary-action:hover { background:#5c422e; }
html[data-theme="dark"] #add-to-bag, html[data-theme="dark"] .cart-primary-action { background:#c9a780; color:#211c17; }
html[data-theme="dark"] #add-to-bag:hover:not(:disabled), html[data-theme="dark"] .cart-primary-action:hover { background:#dfc3a3; }
#add-to-bag:disabled, html[data-theme="dark"] #add-to-bag:disabled { background:var(--sandstone); color:var(--muted); cursor:not-allowed; }
.secondary-button, #copy-order { border:1px solid var(--warm-line); min-height:48px; padding:10px 18px; color:var(--ink); background:transparent; font-size:13px; }
.secondary-button:hover, #copy-order:hover { background:var(--sandstone); }
#cart-dialog.store-dialog { width:min(680px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); }
#cart-dialog .cart-panel { width:100%; padding:32px; max-height:calc(100dvh - 32px); overflow-y:auto; overscroll-behavior:contain; }
#cart-title { font-size:32px; }
.bag-steps { display:flex; justify-content:space-between; gap:12px; padding:18px 0; list-style:none; border-bottom:1px solid var(--warm-line); }
.bag-steps li { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--muted); }
.bag-steps li > span:first-child { font-size:10px; color:var(--bronze); }
.cart-item-row { display:grid; grid-template-columns:78px minmax(0,1fr); gap:16px; padding:22px 0; }
#cart-dialog .cart-item-image { width:78px; height:98px; object-fit:cover; }
.cart-item-top { display:flex; gap:12px; justify-content:space-between; align-items:baseline; }
.cart-item-title { font-size:16px; font-weight:500; }
.cart-item-price { font-size:13px; white-space:nowrap; }
.cart-item-meta { margin-top:6px; font-size:12px; line-height:1.7; color:var(--muted); overflow-wrap:anywhere; }
.cart-item-controls { display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:space-between; margin-top:14px; }
.quantity-controls { display:flex; align-items:center; border:1px solid var(--warm-line); }
.quantity-controls button { min-width:36px; min-height:36px; }
.quantity-controls span { min-width:30px; text-align:center; font-size:12px; }
.cart-item-links { display:flex; gap:14px; }
.cart-item-links button { font-size:12px; min-height:36px; text-decoration:underline; text-underline-offset:4px; color:var(--muted); }
#cart-dialog #order-summary { color:var(--ink); background:var(--surface); height:160px; min-height:160px; font-size:13px; line-height:1.7; border-color:var(--warm-line); }
#copy-status { font-size:12px; color:var(--ink); line-height:1.6; }
#copy-status:empty { display:none; }
.auxiliary-dialog .auxiliary-panel { position:relative; width:min(680px,calc(100vw - 32px)); padding:36px; max-height:calc(100dvh - 32px); overflow-y:auto; }
.auxiliary-panel h2 { font-size:34px; margin-top:6px; }
.auxiliary-intro { font-size:13px; color:var(--muted); margin:10px 0 24px; }
#modal-size-chart { overflow-x:auto; }
#modal-size-chart table { min-width:490px; width:100%; border-collapse:collapse; font-size:13px; }
#modal-size-chart th, #modal-size-chart td { padding:12px 8px; border-bottom:1px solid var(--warm-line); text-align:center; }
#modal-size-chart th { font-weight:500; }
.size-return { margin-top:24px; width:100%; }
.image-dialog.store-dialog { width:calc(100vw - 32px); max-width:1400px; height:calc(100dvh - 32px); max-height:calc(100dvh - 32px); background:#151412; color:#fff; }
.image-viewer { height:100%; position:relative; display:flex; flex-direction:column; }
.image-viewer-bar { height:56px; flex:none; display:flex; align-items:center; gap:20px; padding:0 18px; font-size:13px; }
#image-viewer-title { flex:1; }
.image-viewer-close { width:40px; height:40px; font-size:30px; }
.image-viewer-stage { flex:1; min-height:0; padding:0 48px 20px; overflow:auto; touch-action:pan-y pinch-zoom; }
#enlarged-product-image { width:100%; height:100%; object-fit:contain; }
.image-viewer .gallery-control { background:#292521; color:#fff; font-size:28px; border:1px solid #8b8278; }
.image-viewer [data-enlarged-prev] { left:12px; }
.image-viewer [data-enlarged-next] { right:12px; }
html[lang="ar"] #collection .product-card h3 { font-size:21px; line-height:1.5; }
html[lang="ar"] #product-dialog-name { font-size:30px; line-height:1.5; }
html[lang="ar"] #product-detail-copy p { font-size:13px; line-height:1.75; }
@media (max-width:899px) {
 #collection > div { padding-block:56px; }
 #collection .collection-controls { grid-template-columns:1.3fr 1fr 1fr; gap:12px; }
 #product-grid { gap:28px 18px; }
 #product-dialog .store-field, #cart-dialog #order-summary, #collection .collection-controls select { font-size:16px; }
}
@media (max-width:699px) {
 #product-dialog.store-dialog { width:calc(100vw - 24px); max-width:650px; max-height:calc(100dvh - 24px); }
 #product-dialog .store-panel { display:flex; flex-direction:column; width:100%; height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); }
 #product-dialog .store-panel > .product-layout.grid { display:block; flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
 #product-dialog #product-dialog-gallery { display:block; height:auto; width:100%; max-height:none; }
 #product-dialog #product-gallery-frame { width:100%; height:auto; aspect-ratio:4/5; }
 #product-dialog .product-dialog-info { display:block; overflow:visible; }
 #product-dialog .product-dialog-scroll { height:auto; overflow:visible; padding:28px; }
 #product-dialog .product-dialog-action { flex:none; padding:12px 24px max(12px,env(safe-area-inset-bottom)); }
 #product-dialog .dialog-close { position:absolute; top:12px; inset-inline-end:12px; margin:0; }
 .product-order-note { margin-bottom:8px; }
 #product-dialog .store-field, #cart-dialog #order-summary, #collection .collection-controls select { font-size:16px; }
}
@media (max-width:599px) {
 .site-navigation { gap:16px; scrollbar-width:none; }
 .site-navigation::-webkit-scrollbar { display:none; }
 .site-navigation .desktop-nav-link { font-size:12px; }
 #collection > div { padding:40px 16px; }
 #product-grid { gap:28px 14px; }
 #collection .collection-controls { grid-template-columns:1fr 1fr; gap:14px; }
 #collection .collection-controls > div:first-child { grid-column:1/-1; max-width:none; }
 #collection .collection-controls select { height:42px; min-height:42px; }
 #collection .product-card h3 { font-size:22px; }
 html[lang="ar"] #collection .product-card h3 { font-size:18px; }
 #collection .product-card > div:nth-child(2) > div:first-child { display:flex; flex-direction:column; gap:5px; min-height:67px; }
 #collection .product-card [data-price-kwd] { font-size:12px; }
 #collection .product-card > div:nth-child(2) > button { font-size:11px; margin-top:10px; }
 #product-dialog.store-dialog { width:100%; max-width:100%; max-height:100dvh; height:100dvh; margin:0; }
 #product-dialog .store-panel { height:100dvh; max-height:100dvh; }
 #product-dialog .product-dialog-scroll { padding:24px 20px; }
 #product-dialog .product-dialog-action { padding:10px 20px max(12px,env(safe-area-inset-bottom)); }
 #product-detail-copy .product-detail-section { grid-template-columns:85px minmax(0,1fr); gap:10px; }
 #product-dialog-name { font-size:34px; }
 #product-dialog #product-gallery-thumbnails { height:76px; }
 #cart-dialog.store-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
 #cart-dialog .cart-panel { padding:24px 18px; max-height:calc(100dvh - 16px); }
 .cart-item-row { grid-template-columns:64px minmax(0,1fr); gap:12px; }
 #cart-dialog .cart-item-image { width:64px; height:80px; }
 .cart-item-top { flex-wrap:wrap; gap:4px 12px; }
 .cart-item-title { font-size:15px; }
 .cart-item-links { gap:12px; }
 .bag-steps { gap:8px; }
 .bag-steps li { font-size:10px; gap:5px; }
 .auxiliary-dialog .auxiliary-panel { padding:28px 20px; }
 .image-dialog.store-dialog { width:100%; max-width:100%; height:100dvh; max-height:100dvh; }
 .image-viewer-stage { padding:0 0 16px; }
 .image-viewer-bar { padding-inline:12px; gap:10px; }
}
@media (prefers-reduced-motion:reduce) {
 html { scroll-behavior:auto; }
 *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
 .product-card:hover .product-image { transform:none; }
}
