/* A denser layout throughout the storefront, with readable mobile controls. */
html{scroll-padding-top:96px}
/* Avoid resampling the moving page through several stacked glass layers. */
.site-header,.site-header :is(.language-toggle,.icon-link,.menu-button,.desktop-nav.mobile-open){backdrop-filter:none;-webkit-backdrop-filter:none}
@media(prefers-reduced-motion:reduce){html,body{scroll-behavior:auto!important}}
body{font-size:14px}
html.locale-ar body{font-size:15px;line-height:1.65}
.page-shell{padding:28px clamp(16px,2.5vw,36px) 40px}
.page-head{margin-bottom:28px}
.page-head h1{font-size:clamp(28px,4vw,52px)}
html.locale-ar .page-head h1{font-size:clamp(25px,2.6vw,32px);line-height:1.4}
.page-head p{font-size:15px}
.section-heading{margin:30px 0 18px}
.section-heading h2{font-size:clamp(24px,2.6vw,34px)}
.btn{min-height:44px;padding-inline:18px;gap:14px}
html.locale-ar :is(.btn,.back-system){font-size:14px;line-height:1.5}
.breadcrumbs{margin:8px 0 20px;gap:7px}
.catalog-context{margin-bottom:20px;padding:10px 14px}
.mode-tabs{margin-bottom:24px}
.search-console{padding:24px;margin-bottom:24px}
.category-card{min-height:120px;padding:15px}
.catalog-list a,.list-stack a{min-height:76px;padding:14px}
.entry-strip,.premium-garage,.marketing-band{padding-block:52px}
.parts-showcase{padding-block:48px}
.vehicle-configurator{margin-block:42px;min-height:440px}
.configurator-main{padding:28px}
.configurator-visual{min-height:440px}
.site-footer{padding-block:36px;gap:30px}
.page-navigation{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.page-back,.cart-close{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:42px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);font-size:14px;font-weight:600;padding:8px 14px}
.page-back:hover,.cart-close:hover{border-color:var(--green);color:var(--green)}
.cart-close{width:42px;padding:0;font:26px/1 Arial,sans-serif}
html[dir="rtl"] .back-arrow{transform:rotate(180deg)}
.part-detail-grid{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:26px;align-items:start}
.part-detail .detail-visual{min-height:0;height:clamp(300px,57vh,470px)}
.part-detail .detail-visual img{width:100%;height:100%;min-height:0;max-height:100%;padding:14px;object-fit:contain}
.part-detail .detail-visual>span{bottom:12px;left:12px;font-size:10px;padding:6px 9px;max-width:calc(100% - 24px)}
html .part-detail .detail-copy h1{font-size:clamp(24px,2.4vw,32px);line-height:1.3;margin:12px 0 16px}
.part-detail .detail-price{font-size:25px;margin:14px 0}
.part-detail .fitment-state{padding:12px 14px;margin:14px 0;font-size:14px;line-height:1.6}
.part-detail .quantity-line{margin:16px 0;align-items:end;gap:12px}
.part-detail .quantity-line input{height:44px;width:76px;margin-top:4px;padding:8px 10px}
.part-detail .quantity-line .btn{min-height:44px;align-self:end}
.part-detail .detail-copy dl{margin:14px 0 0;font-size:14px}
.part-detail .detail-copy dl div{padding:10px 0;grid-template-columns:110px minmax(0,1fr);gap:12px}
.part-detail .back-system{margin-top:14px}
.part-detail .fitment-matrix{margin-top:28px}
.cart-layout{grid-template-columns:minmax(0,1fr) minmax(290px,340px);gap:20px}
.cart-items article{grid-template-columns:52px minmax(0,1fr) auto auto;padding:14px;gap:14px}
.cart-marker{width:48px;height:48px}
.cart-items h2{font-size:16px;overflow-wrap:anywhere}
.order-summary{padding:20px}
.order-summary h2{font-size:22px}
.order-summary dl div{padding:10px 0}
@media(min-width:821px){
 .hero{padding-top:70px}
 html:not(.locale-ar) .hero h1{font-size:clamp(48px,6.5vw,96px)}
 .hero-stats{margin-top:50px}
}
@media(max-width:820px){
 .page-shell{padding:18px 15px 30px}
 .page-navigation{margin-bottom:12px}
 .part-detail-grid{grid-template-columns:1fr;gap:20px}
 .part-detail .detail-visual{height:clamp(240px,40vh,340px)}
 .part-detail .quantity-line{margin-inline:0;padding-inline:0;position:static;background:transparent}
 .cart-layout{grid-template-columns:1fr}
 .cart-items article{grid-template-columns:48px minmax(0,1fr) auto;gap:10px}
 .cart-items .qty-control{grid-column:2}
 .cart-items .remove{grid-column:3;grid-row:1}
 .configurator-main{padding:22px}
 .configurator-visual{min-height:320px}
 .order-summary{position:static}
 .site-footer{gap:24px}
}
@media print{.page-navigation{display:none}}

/* Show substantially more catalog content per desktop viewport. */
@media(min-width:821px){
 :root{--max:1920px}
 body{zoom:.95}
 .page-shell{min-height:0;padding:16px 26px 26px}
 .site-header{height:68px}
 .page-navigation{margin-bottom:10px}
 .page-head{margin-bottom:18px}
 html .page-shell .page-head h1{font-size:30px;margin-block:8px;line-height:1.3}
 .page-head p{margin-block:8px;font-size:14px;line-height:1.5}
 .breadcrumbs{margin-bottom:12px}
 .catalog-context{padding:8px 12px;margin-bottom:12px}
 .catalog-app .page-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 16px;max-width:none;margin:10px 0 14px}
 .catalog-app .page-head p{flex:1;min-width:180px}
 .catalog-app .section-heading{margin:12px 0}
 html .catalog-app .section-heading h2{font-size:25px;margin-block:6px;line-height:1.3}
 .category-grid,.subcategory-grid,.system-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
 .vehicle-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
 .category-card,.subcategory-card{min-height:100px;padding:12px}
 html .category-card h3,html.locale-ar .category-card h3{font-size:16px;line-height:1.35;margin:12px 0 4px}
 .subcategory-card>strong{font-size:13px;line-height:1.35;margin-top:12px}
 .system-card>div{height:112px}
 html .system-card h3,html.locale-ar .system-card h3{font-size:14px;line-height:1.35;margin:8px 3px 4px}
 .vehicle-card.vehicle-card-visual{min-height:110px}
 .vehicle-card-visual picture,.vehicle-card-visual picture:after{height:64px}
 .vehicle-card-visual>span{padding:7px 10px}
 .catalog-list a,.list-stack a{min-height:58px;padding:10px 12px}
 .system-layout{grid-template-columns:minmax(0,1fr) minmax(540px,1fr);gap:14px}
 .diagram-panel{min-height:430px}
 .diagram-stage img{max-height:430px}
 .part-row{padding:8px 10px;gap:10px}
 .part-main strong{font-size:12px;line-height:1.3}
 .part-main code{margin-top:4px}
 .part-detail .detail-visual{height:clamp(280px,48vh,380px)}
 .part-detail .detail-copy h1{font-size:26px;margin:8px 0 10px}
 .part-detail .detail-price{margin:10px 0;font-size:23px}
 .part-detail .fitment-state{margin:10px 0;padding:10px 12px}
 .part-detail .quantity-line{margin:12px 0}
 .part-detail .detail-copy dl div{padding:7px 0}
 .part-detail .fitment-matrix{margin-top:18px}
 .fitment-matrix .section-heading{margin:18px 0 12px}
 .cart-items article{padding:10px;gap:10px}
 .cart-items p{margin-block:7px}
 .search-results>article>a{padding-block:10px}
 .entry-strip,.premium-garage,.marketing-band,.parts-showcase{padding-block:36px}
 .vehicle-configurator{margin-block:28px}
 .site-footer{padding-block:24px}
 html:has(:fullscreen) body{zoom:1}
}
@media(min-width:821px) and (max-width:1100px){
 .category-grid,.subcategory-grid,.system-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .vehicle-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .system-layout{grid-template-columns:minmax(0,1fr) minmax(380px,1fr)}
}
@media(max-width:820px){
 .page-head{margin-bottom:18px}
 .page-head p{margin-block:8px}
 .category-card,.subcategory-card{min-height:100px;padding:12px}
 html .category-card h3,html.locale-ar .category-card h3{font-size:16px;line-height:1.4;margin:12px 0 4px}
 .subcategory-card>strong{margin-top:10px;font-size:13px}
 .system-card>div{height:100px}
 html .system-card h3,html.locale-ar .system-card h3{font-size:13px;line-height:1.4;margin-top:8px}
 .part-detail .detail-visual{height:220px}
 .part-detail .detail-copy h1{font-size:23px}
 .part-detail .fitment-state{margin-block:10px}
}
@media print{body{zoom:1}}

/* Missing artwork gets an intentional, light technical-document card. */
.diagram-placeholder.diagram-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;width:100%;height:100%;min-height:180px;padding:28px;text-align:center;background:linear-gradient(145deg,#fbfcf8,#eaf0e5);color:#3b4a36;border:1px dashed #c1ceb8;border-radius:18px;font:500 14px/1.6 Inter,Arial,sans-serif;letter-spacing:0;box-shadow:0 12px 36px rgba(40,58,30,.05)}
.diagram-empty-icon{display:grid;place-items:center;flex:none;width:84px;height:84px;border:1px solid #d3dfc9;border-radius:24px;background:#eef3e9;color:#6f865f;box-shadow:inset 0 1px #fff}
.diagram-empty-icon svg{width:60px;height:60px}
.diagram-empty strong{font-size:16px;font-weight:600;line-height:1.5}
.diagram-empty p{max-width:300px;margin:0;color:#77836f;font-size:13px;line-height:1.7}
html.locale-ar .diagram-empty{font-family:var(--font-ar)}
.diagram-stage>.diagram-empty{width:min(420px,calc(100% - 52px));height:auto;min-height:250px;margin:26px}
.diagram-panel:has(.diagram-empty) .diagram-tools{display:none}
.diagram-stage:has(.diagram-empty){cursor:default;touch-action:auto}
.system-card .diagram-empty{border-radius:10px;min-height:0;padding:10px;gap:6px;box-shadow:none}
.system-card .diagram-empty-icon{width:40px;height:40px;border-radius:12px}
.system-card .diagram-empty-icon svg{width:32px;height:32px}
.system-card .diagram-empty strong{font-size:11px}
.system-card .diagram-empty p{display:none}
.detail-visual>.diagram-empty{border:0;border-radius:inherit}
@media(max-width:560px){
 .diagram-stage>.diagram-empty{width:calc(100% - 32px);margin:16px;padding:20px;min-height:220px}
 .diagram-empty-icon{width:64px;height:64px;border-radius:18px}
 .diagram-empty-icon svg{width:46px;height:46px}
}

/* Equal outer columns keep the navigation at the exact center in both locales. */
.category-card{padding:16px;min-height:130px}
.category-card p{font-size:12px;line-height:1.6;margin:0 0 12px}
.category-card>.category-action{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding-top:10px;margin-top:auto;border-top:1px solid var(--line);color:var(--green);font-size:13px;line-height:1.5}
.category-card>.category-action>span{margin:0;font:inherit;letter-spacing:0}
.category-action svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
html[dir="rtl"] .category-action svg{transform:rotate(180deg)}
.category-card:hover>.category-action{color:var(--text);border-color:var(--green)}
.homepage-editor>header p,.homepage-columns>section>p{color:var(--muted);font-size:14px;line-height:1.7}
.homepage-editor label{display:grid;gap:8px;font-size:14px}
.homepage-editor select,.homepage-editor input{min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);max-width:100%}
.homepage-editor>label{max-width:300px}
.homepage-editor output{display:block;min-height:28px;margin-block:14px;color:var(--green);font-size:14px}
.homepage-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
.homepage-columns>section{min-width:0}
.homepage-columns h3{font-size:19px;margin-block:18px}
.homepage-product{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.homepage-product img{flex:none;object-fit:contain;background:#f4f5f0;border-radius:8px}
.homepage-product-copy{flex:1;min-width:0;display:grid;gap:5px}
.homepage-product-copy strong{font-size:14px;overflow-wrap:anywhere;line-height:1.5}
.homepage-product-copy code,.homepage-product-copy small{font-size:12px;color:var(--muted)}
.homepage-position{color:var(--green);font-size:18px}
.homepage-order{display:flex;gap:6px;flex-wrap:wrap;max-width:160px}
.homepage-editor button{cursor:pointer}
.homepage-order button,.homepage-actions>button:not(.btn){min-height:36px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font-size:12px}
.homepage-editor button:disabled{opacity:.45;cursor:default}
.homepage-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-block:18px}
[data-home-search]{display:flex;align-items:end;gap:10px;margin-bottom:18px}
[data-home-search] label{flex:1;min-width:0}
.part-showcase-card .diagram-empty{min-height:0;gap:8px;padding:12px}
.part-showcase-card .diagram-empty-icon{width:46px;height:46px;border-radius:14px;margin:0}
.part-showcase-card .diagram-empty-icon svg{width:36px;height:36px}
.part-showcase-card .diagram-empty strong{font-size:12px;min-height:0;margin:0}
.part-showcase-card .diagram-empty p{display:none}
.parts-rail:has(.featured-track){direction:ltr}
#parts-showcase-title,#most-used-title{scroll-margin-top:110px}
.featured-track{direction:ltr;gap:0;padding:4px 0;animation:mostUsedRail var(--rail-duration,36s) linear infinite}
.featured-group{display:flex;flex:none;width:max-content;gap:12px;padding-inline-end:12px}
.featured-group>.part-showcase-card{flex:none}
html.locale-ar .featured-group>.part-showcase-card{direction:rtl;text-align:right}
@media(prefers-reduced-motion:reduce){
 .featured-track{animation:none;transform:none}
 .parts-rail:has(.featured-track){overflow-x:auto}
 .featured-group[aria-hidden],.featured-repeat{display:none}
}
@media(max-width:1100px){.homepage-columns{grid-template-columns:1fr}}
@media(min-width:821px){
 .site-header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);height:80px;gap:20px}
 .site-header .brand-logo-link{grid-column:1;grid-row:1;justify-self:start;max-width:100%}
 .site-header .brand-logo{width:clamp(244px,20vw,280px);max-height:74px}
 .site-header .desktop-nav{grid-column:2;grid-row:1;justify-self:center;margin:0;gap:clamp(18px,2vw,32px)}
 .site-header .desktop-nav a{padding-block:24px;white-space:nowrap}
 .site-header .header-actions{grid-column:3;grid-row:1;justify-self:end;margin-inline:0}
}
@media(max-width:820px){
 .site-header{height:64px}
 .site-header .brand-logo{width:clamp(148px,39vw,180px);max-height:48px}
}

/* A compact, stable cart badge, with readable counts in either locale. */
.garage-grid{direction:ltr}
html.locale-ar .garage-grid>.garage-card{direction:rtl}
.site-header .cart-link{position:relative;overflow:visible}
.site-header .cart-count{inset:auto;inset-inline:auto;top:-3px;right:-3px;min-width:21px;height:21px;padding:0 5px;margin:0;display:grid;place-items:center;border:2px solid var(--black);border-radius:999px;background:var(--green);color:#172313;font:700 10px/1 Inter,Arial,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:0;direction:ltr;white-space:nowrap;box-shadow:0 0 0 1px rgba(198,232,175,.16),0 2px 6px rgba(0,0,0,.18);pointer-events:none}
.site-header .cart-count[hidden]{display:none}
.header-account{display:flex;align-items:center;gap:8px;flex-shrink:0}
.account-menu{position:relative}
.account-menu summary,.account-signin{display:flex;align-items:center;gap:7px;min-height:42px;padding:8px 10px;border:1px solid var(--line,#42483c);border-radius:10px;cursor:pointer;list-style:none;font-size:12px;white-space:nowrap}
.account-menu summary::-webkit-details-marker{display:none}
.account-menu summary:focus-visible,.account-signin:focus-visible,.account-popover a:focus-visible,.account-popover button:focus-visible,.account-shortcut:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.account-menu[open] summary{border-color:var(--green)}
.account-popover{position:absolute;inset-inline-end:0;top:calc(100% + 12px);width:240px;padding:8px;background:var(--black);color:var(--text);border:1px solid var(--line,#42483c);border-radius:14px;box-shadow:0 14px 40px #0004;z-index:60}
.account-popover a,.account-popover button{display:block;width:100%;padding:12px;border:0;border-radius:7px;background:transparent;color:inherit;text-align:start;font:inherit;font-size:13px;cursor:pointer}
.account-popover a:hover,.account-popover button:hover{background:var(--surface,#7772);color:var(--green)}
.account-popover output{display:block;padding-inline:10px;font-size:12px}
.account-popover output:empty{display:none}
.account-shortcut{background:transparent;color:var(--text);border:0;padding:8px 3px;font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
@media(max-width:1450px){.account-shortcut{display:none}.site-header .search-link{display:none}}
@media(min-width:821px) and (max-width:1100px){.account-menu summary span,.account-signin span{display:none}.account-menu summary,.account-signin{padding:8px}.site-header .header-actions{gap:5px}.site-header .desktop-nav{gap:16px}.site-header .brand-logo{width:220px}}
@media(max-width:820px){.account-menu summary span,.account-signin span{display:none}.account-menu summary,.account-signin{padding:7px;min-height:36px}.account-menu summary .nav-icon,.account-signin .nav-icon{width:19px;height:19px}.site-header{gap:10px}.site-header .header-actions{gap:4px}.account-popover{position:fixed;inset-inline:12px;top:70px;width:auto}}
@media(max-width:400px){.site-header .brand-logo{width:136px}.site-header{padding-inline:10px}.site-header .header-actions{gap:2px}.site-header .language-toggle{min-width:44px;padding-inline:5px}}
/* Reveal more detail from the same lightweight video, keeping text contrast. */
@media(min-width:821px){
 .hero-media:after{background:linear-gradient(90deg,rgba(4,6,4,.90) 0%,rgba(4,6,4,.64) 34%,rgba(4,6,4,.12) 68%,rgba(4,6,4,.10) 100%),linear-gradient(180deg,rgba(3,5,3,.28),transparent 54%,rgba(3,5,3,.54))}
}

.checkout-form [data-checkout-account][hidden]{display:none}
.checkout-form #checkout-password-help{font-size:11px;line-height:1.6;color:var(--muted)}

/* Keep every navigation control on the same compact visual grid. */
.site-header .header-actions{gap:6px}
/* The header dropdown must not inherit the account page's flex layout/gap. */
.site-header .header-account .account-menu{display:block;gap:0}
.site-header :is(.theme-toggle,.language-toggle,.icon-link,.menu-button,.account-signin,.account-menu summary){width:36px;min-width:36px;height:36px;min-height:36px;padding:0;align-items:center;justify-content:center;border-radius:11px;box-sizing:border-box}
.site-header :is(.account-signin,.account-menu summary) span{display:none}
.site-header .nav-icon,.site-header .language-toggle .nav-icon,.site-header .account-signin .nav-icon,.site-header .account-menu summary .nav-icon{width:16px;height:16px;stroke-width:1.6}
.site-header .language-toggle .nav-icon{display:none}
.site-header .language-toggle{font:600 10px/1 Inter,Arial,sans-serif}
.site-header .cart-count{min-width:17px;height:17px;padding-inline:3px;font-size:9px;top:-4px;right:-4px}
@media(min-width:821px){.site-header .brand-logo{width:clamp(254px,21vw,294px)}}
@media(min-width:821px) and (max-width:1100px){.site-header .brand-logo{width:228px}}
@media(max-width:820px){
 .site-header{gap:8px;padding-inline:12px}
 .site-header .brand-logo-link{flex:0 1 158px;min-width:0}
 .site-header .brand-logo{width:158px;max-width:100%;max-height:48px}
 .site-header .header-actions{gap:4px;margin-left:0;margin-inline-start:auto}
 .site-header :is(.theme-toggle,.language-toggle,.icon-link,.menu-button,.account-signin,.account-menu summary){width:32px;min-width:32px;height:32px;min-height:32px;border-radius:10px}
}
@media(max-width:350px){
 .site-header{padding-inline:8px;gap:6px}
 .site-header .brand-logo-link{flex-basis:134px}
 .site-header .brand-logo{width:134px}
 .site-header .header-actions{gap:2px}
}

/* Match the Arabic navigation size, weight and line box in both locales. */
.site-header .desktop-nav a{font-family:Inter,Arial,sans-serif;font-size:15px;font-weight:700;line-height:1.5;letter-spacing:0}

/* Hide the wallet separator when this device has no eligible express methods. */
.payment-page :is(.express-checkout,.payment-divider)[hidden]{display:none}

.payment-page [hidden]{display:none!important}
#payment-preparing output{display:block;min-height:28px;margin-bottom:18px;line-height:1.7}
#payment-load-retry{margin-top:12px;width:100%}
