/* EGYPT'M — GEOMETRIC DESIGN SYSTEM V2.0.3
   Non-destructive, scoped finishing layer. Loaded after existing page styles.
   8px rhythm, fluid gutters, measured typography, accessible motion. */
:is(#pmg-egm-home-v1,#egms-shop,#egmc-categories,#pmg-egm-about-v13,#pmg-egm-contact-v14,#pmg-egm-policy-center,.ega-root,.pmg-egm-footer){
 --emg-black:#080808;--emg-gold:#d5a348;--emg-gold-light:#f3d17a;--emg-ivory:#f7f5f0;
 --emg-line:#e6dfd4;--emg-muted:#645d54;--emg-gutter:clamp(16px,3.1vw,56px);
 --emg-max:1360px;--emg-ease:cubic-bezier(.22,1,.36,1);--emg-shadow:0 18px 48px rgba(14,11,7,.10);
 font-feature-settings:'kern' 1; text-rendering:optimizeLegibility;
}
:is(#pmg-egm-home-v1,#egms-shop,#egmc-categories,#pmg-egm-about-v13,#pmg-egm-contact-v14,#pmg-egm-policy-center,.ega-root,.pmg-egm-footer) :is(img,svg){max-width:100%}
:is(#pmg-egm-home-v1,#egms-shop,#egmc-categories,#pmg-egm-about-v13,#pmg-egm-contact-v14,#pmg-egm-policy-center,.ega-root,.pmg-egm-footer) :is(h1,h2,h3){text-wrap:balance;overflow-wrap:break-word}
:is(#pmg-egm-home-v1,#egms-shop,#egmc-categories,#pmg-egm-about-v13,#pmg-egm-contact-v14,#pmg-egm-policy-center,.ega-root,.pmg-egm-footer) p{text-wrap:pretty}
:is(#pmg-egm-home-v1,#egms-shop,#egmc-categories,#pmg-egm-about-v13,#pmg-egm-contact-v14,#pmg-egm-policy-center,.ega-root,.pmg-egm-footer) :is(a,button,input,select,textarea):focus-visible{outline:3px solid var(--emg-gold)!important;outline-offset:3px}
/* Unified content geometry without changing template ownership */
#pmg-egm-home-v1 .pmg-egm-wrap{width:min(var(--emg-max),calc(100% - 2 * var(--emg-gutter)))}
#egms-shop .egms-inner{width:min(var(--emg-max),calc(100% - 2 * var(--emg-gutter)))}
#egmc-categories .egmc-shell{width:min(var(--emg-max),calc(100% - 2 * var(--emg-gutter)))}
.ega-root .ega-inner{width:min(var(--emg-max),calc(100% - 2 * var(--emg-gutter)))}
#pmg-egm-policy-center .egp-wrap{max-width:var(--emg-max);padding-inline:var(--emg-gutter)}
/* Measured grid spacing: generous on desktop, useful density on mobile */
#pmg-egm-home-v1 .pmg-egm-category-grid{gap:clamp(12px,1.6vw,24px)}
#pmg-egm-home-v1 .pmg-egm-product-grid{gap:clamp(12px,1.5vw,22px)}
#egms-shop .egms-grid{gap:clamp(12px,1.5vw,22px)}
#pmg-egm-home-v1 .pmg-egm-section{padding-block:clamp(56px,6.8vw,108px)}
#egms-shop .egms-catalog{padding-block:clamp(48px,6.5vw,96px)}
/* Image safety: product isolation and no distorted media */
#pmg-egm-home-v1 .pmg-egm-product-visual,#egms-shop .egms-product-media{aspect-ratio:4/4.7;display:flex;align-items:center;justify-content:center}
#pmg-egm-home-v1 .pmg-egm-product-visual img,#egms-shop .egms-product-media .egms-product-image{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;object-position:center}
#pmg-egm-home-v1 .pmg-egm-category-photo img{object-fit:cover;object-position:center}
/* Precision card surfaces with non-layout-shifting hover */
#pmg-egm-home-v1 .pmg-egm-product,#egms-shop .egms-product{border:1px solid var(--emg-line);border-radius:12px;box-shadow:0 4px 18px rgba(14,11,7,.035);transition:transform .4s var(--emg-ease),box-shadow .4s var(--emg-ease),border-color .3s ease}
#pmg-egm-home-v1 .pmg-egm-category{border-radius:12px;outline-offset:4px}
#pmg-egm-home-v1 .pmg-egm-product-info,#egms-shop .egms-product-info{gap:clamp(8px,1vw,12px)}
#pmg-egm-home-v1 .pmg-egm-product-title,#egms-shop .egms-product-title{line-height:1.65;overflow-wrap:anywhere}
#pmg-egm-home-v1 .pmg-egm-product-action,#egms-shop .egms-btn{min-height:44px;border-radius:6px}
#pmg-egm-home-v1 .pmg-egm-product-price,#egms-shop .egms-product-price{font-variant-numeric:tabular-nums}
#egms-shop .egms-filters{border:1px solid var(--emg-line);border-radius:12px;gap:clamp(8px,1vw,14px)}
/* Smooth interaction only on devices that support hover */
@media(hover:hover) and (pointer:fine){
 #pmg-egm-home-v1 .pmg-egm-product:hover,#egms-shop .egms-product:hover{transform:translateY(-4px);box-shadow:var(--emg-shadow);border-color:#d8c5a5}
 #pmg-egm-home-v1 .pmg-egm-category:hover{box-shadow:0 22px 50px rgba(15,11,6,.19)}
}
@media(max-width:767px){
 :is(#pmg-egm-home-v1,#egms-shop,#egmc-categories,#pmg-egm-about-v13,#pmg-egm-contact-v14,#pmg-egm-policy-center,.ega-root,.pmg-egm-footer){--emg-gutter:clamp(14px,4.4vw,24px)}
 #pmg-egm-home-v1 .pmg-egm-section{padding-block:clamp(44px,11vw,72px)}
 #pmg-egm-home-v1 .pmg-egm-category-grid,#pmg-egm-home-v1 .pmg-egm-product-grid,#egms-shop .egms-grid{gap:10px}
 #pmg-egm-home-v1 .pmg-egm-product-info,#egms-shop .egms-product-info{padding:12px 10px}
 #pmg-egm-home-v1 .pmg-egm-product-title,#egms-shop .egms-product-title{font-size:clamp(11.5px,3.3vw,13px)}
 #pmg-egm-home-v1 .pmg-egm-product-action,#egms-shop .egms-btn{font-size:11px;line-height:1.4;min-height:44px}
 #egms-shop .egms-filters{padding:12px}
}
@media(max-width:360px){
 #pmg-egm-home-v1 .pmg-egm-product-info,#egms-shop .egms-product-info{padding:10px 8px}
 #pmg-egm-home-v1 .pmg-egm-product-action,#egms-shop .egms-btn{padding-inline:7px}
}
@media(prefers-reduced-motion:reduce){
 :is(#pmg-egm-home-v1,#egms-shop,#egmc-categories,#pmg-egm-about-v13,#pmg-egm-contact-v14,#pmg-egm-policy-center,.ega-root,.pmg-egm-footer) :is(a,button,img,.pmg-egm-product,.egms-product,.pmg-egm-category){animation:none!important;transition:none!important}
}
