/*! EFM Sports © 2026 – כל הזכויות שמורות. הקוד, העיצוב והמבנה הם קניין של EFM Sports; אסור להעתיק, לשכפל או להשתמש בהם ללא אישור בכתב. */
/* EFM – side cart and cart page (inc/cart.php, js/cart.js). */

/* Header icon */
.efm-cart{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:#fff}
.efm-cart:hover,.efm-cart:focus{color:#fff}
.efm-cart .efm-i{width:26px;height:26px}
.efm-cart__count{position:absolute;top:0;inset-inline-end:-4px;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:var(--efm-red);color:#fff;font-size:11px;font-weight:800;line-height:19px;text-align:center}

/* Side cart: a modal dialog from the cart icon's side */
.efm-minicart{position:fixed;inset-block:0;inset-inline-start:auto;inset-inline-end:0;display:flex;flex-direction:column;width:min(92vw,420px);max-width:none;height:100%;max-height:none;margin:0;padding:0;border:0;background:#fff;color:var(--efm-ink);box-shadow:10px 0 30px rgba(0,0,0,.3)}
.efm-minicart:not([open]){display:none}
.efm-minicart::backdrop{background:rgba(0,0,0,.5)}
html:has(.efm-minicart[open]){overflow:hidden}
@media (prefers-reduced-motion:no-preference){
	.efm-minicart[open]{animation:efm-minicart-in .25s ease-out}
	@keyframes efm-minicart-in{from{transform:translateX(-100%)}}
}
.efm-minicart__head{display:flex;align-items:center;justify-content:space-between;flex:none;padding:6px 16px;background:var(--efm-dark);color:#fff}
.efm-minicart__head h2{display:flex;align-items:center;gap:8px;margin:0;color:#fff;font-size:18px}
.efm-minicart__head h2 span{min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--efm-red);font-size:12px;line-height:22px;text-align:center}
.efm-minicart__close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin-inline-end:-10px;padding:0;border:0;background:none;color:#fff}
.efm-minicart__close:hover,.efm-minicart__close:focus{background:none;color:#fff}
.efm-minicart__close .efm-i{width:24px;height:24px}
.efm-minicart__body{display:flex;flex:1;flex-direction:column;min-height:0}
.efm-minicart__body:empty::before{content:"";width:28px;height:28px;margin:40px auto;border:3px solid var(--efm-line);border-top-color:var(--efm-red);border-radius:50%;animation:efm-spin .8s linear infinite}
@keyframes efm-spin{to{transform:rotate(360deg)}}
.efm-minicart :focus-visible{outline:2px solid var(--efm-red);outline-offset:2px}

/* Contents */
.efm-mc{display:flex;flex:1;flex-direction:column;min-height:0}
.efm-mc--empty{align-items:center;justify-content:center;gap:12px;padding:40px 16px;text-align:center}
.efm-mc--empty .efm-i{width:48px;height:48px;color:var(--efm-muted)}
.efm-mc--empty p{margin:0;font-size:17px;font-weight:700}

.efm-mc__ship{flex:none;padding:12px 16px;background:var(--efm-soft);font-size:14px}
.efm-mc__ship p{display:flex;align-items:center;gap:6px;margin:0 0 8px}
.efm-mc__ship .efm-i{width:20px;height:20px;color:var(--efm-red)}
.efm-mc__ship.is-free .efm-i{color:#1a7f37}
.efm-mc__bar{display:block;height:6px;border-radius:3px;background:var(--efm-line);overflow:hidden}
.efm-mc__bar span{display:block;height:100%;border-radius:3px;background:var(--efm-red);transition:width .3s}
.efm-mc__ship.is-free .efm-mc__bar span{background:#1a7f37}

.efm-mc__scroll{flex:1;min-height:0;padding:0 16px;overflow-y:auto;overscroll-behavior:contain}
.efm-mc__items{margin:0;padding:0;list-style:none}
.efm-mc__item{position:relative;display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;padding:14px 0;border-bottom:1px solid var(--efm-line);transition:opacity .15s}
.efm-mc__item:last-child{border-bottom:0}
.efm-mc__item.is-busy{opacity:.5;pointer-events:none}
.efm-mc__item.is-added .efm-mc__img{box-shadow:0 0 0 2px var(--efm-red)}
.efm-mc__item.is-child{grid-template-columns:48px minmax(0,1fr);padding:8px 0 8px;margin-inline-start:24px;border-bottom:0}
.efm-mc__img{display:block;aspect-ratio:1;border:1px solid var(--efm-line);border-radius:8px;background:#fff;overflow:hidden}
.efm-mc__img img{display:block;width:100%;height:100%;object-fit:contain}
.efm-mc__info{display:flex;flex-direction:column;gap:4px;min-width:0;padding-inline-end:30px}
.efm-mc__name{margin:0;font-size:14px;font-weight:700;line-height:1.35}
.efm-mc__name a{color:inherit;text-decoration:none}
.efm-mc__name a:hover{color:var(--efm-red)}
.efm-mc__details{margin:0;color:var(--efm-muted);font-size:13px}
.efm-mc__row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:4px}
.efm-mc__price{font-size:15px;font-weight:800;white-space:nowrap}
.efm-mc__price del{margin-inline-end:4px;color:var(--efm-muted);font-weight:400}
.efm-mc__qty{display:inline-flex;align-items:center;border:1px solid var(--efm-line);border-radius:8px;overflow:hidden}
.efm-mc__qty button{width:34px;height:34px;padding:0;border:0;border-radius:0;background:#fff;color:var(--efm-ink);font-size:18px;line-height:1}
.efm-mc__qty button:hover,.efm-mc__qty button:focus{background:var(--efm-soft);color:var(--efm-ink)}
.efm-mc__qty button:disabled{opacity:.35}
.efm-mc__qty input{width:38px;height:34px;padding:0;border:0;border-inline:1px solid var(--efm-line);border-radius:0;font-size:16px;font-weight:700;text-align:center;-moz-appearance:textfield;appearance:textfield}
.efm-mc__qty input::-webkit-inner-spin-button,.efm-mc__qty input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}
.efm-mc__qty-solo{color:var(--efm-muted);font-size:13px}
.efm-mc__remove{position:absolute;top:10px;inset-inline-end:-8px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:0;background:none;color:var(--efm-muted)}
.efm-mc__remove:hover,.efm-mc__remove:focus{background:none;color:var(--efm-red)}
.efm-mc__remove .efm-i{width:18px;height:18px}

/* Complementary products */
.efm-mc__recs{--efm-rail-arrow-top:46%;margin:4px 0 16px;padding-top:14px;border-top:1px solid var(--efm-line)}
.efm-mc__recs h3{margin:0 0 10px;color:var(--efm-ink);font-size:15px}
.efm-mc__recs ul{display:flex;gap:10px;margin:0;padding:0 0 6px;list-style:none;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:thin} /* up to 10, three in view, the rest a swipe away */
.efm-mc__recs li{flex:0 0 calc((100% - 20px) / 3.2);scroll-snap-align:start}
.efm-mc__recs a{display:flex;flex-direction:column;gap:4px;height:100%;color:var(--efm-ink);text-decoration:none}
.efm-mc__recs img{display:block;width:100%;aspect-ratio:1;object-fit:contain;border:1px solid var(--efm-line);border-radius:8px;background:#fff}
.efm-mc__recs a:hover img{border-color:var(--efm-ink)}
.efm-mc__recs-name{display:-webkit-box;overflow:hidden;font-size:12px;line-height:1.35;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.efm-mc__recs-price{margin-top:auto;font-size:13px;font-weight:800}
.efm-mc__recs-price del{color:var(--efm-muted);font-weight:400}
.efm-mc__recs-price ins{text-decoration:none}

.efm-mc__foot{flex:none;display:flex;flex-direction:column;gap:10px;padding:14px 16px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--efm-line);background:#fff;box-shadow:0 -6px 16px rgba(0,0,0,.05)}
.efm-mc__totals{margin:0}
.efm-mc__totals div{display:flex;justify-content:space-between;gap:10px;font-size:15px}
.efm-mc__totals dt{font-weight:700}
.efm-mc__totals dd{margin:0;font-size:18px;font-weight:800}
.efm-mc__totals .is-discount dd{color:#1a7f37;font-size:15px}
.efm-mc small.tax_label{display:none} /* "(כולל מע״מ)" – all prices include it */
.efm-mc__note{margin:0;color:var(--efm-ink);font-size:13px;font-weight:700;line-height:1.4;text-align:center}
/* Opened at once on "הוספה לסל" (js/cart.js), until the cart with the new line arrives */
.efm-minicart [data-efm-cart-body].is-adding{pointer-events:none}
.efm-minicart [data-efm-cart-body].is-adding>*{opacity:.45}
.efm-minicart [data-efm-cart-body].is-adding::before{content:"מוסיפים לעגלה…";display:block;padding:12px 16px;background:var(--efm-soft,#f6f6f6);color:var(--efm-ink);font-size:14px;font-weight:700;text-align:center}
.efm-mc__checkout{gap:8px;width:100%;min-height:52px;border-radius:10px;font-size:17px}
.efm-mc__checkout .efm-i{width:18px;height:18px}
.efm-mc__more{display:block;width:100%;min-height:40px;padding:0;border:0;background:none;color:var(--efm-ink);font-size:14px;font-weight:700;text-align:center;text-decoration:underline;line-height:40px}
.efm-mc__more:hover,.efm-mc__more:focus{background:none;color:var(--efm-red)}

/* Messages next to the add-to-cart button and in the cart */
.efm-atc-error{flex-basis:100%;margin:0 0 10px;padding:10px 12px;border-radius:8px;background:#fdecee;color:#9e1824;font-size:14px;font-weight:700}
.efm-mc .efm-atc-error,[data-efm-cart-body]>.efm-atc-error{margin:10px 16px 0}
form.cart .button.is-loading{opacity:.7;cursor:progress}

/* Cart page: the same contents, items beside the summary on wide screens */
.efm-cartpage{max-width:1100px;margin:0 auto;padding:24px 16px 48px}
.efm-cartpage h1{margin:0 0 16px;font-size:26px}
.efm-cartpage .efm-mc__scroll{padding:0;overflow:visible}
.efm-cartpage .efm-mc__ship{margin-bottom:8px;border-radius:10px}
.efm-cartpage .efm-mc__foot{position:sticky;bottom:0;margin:0 -16px;box-shadow:0 -6px 16px rgba(0,0,0,.08)}
@media (min-width:900px){
	.efm-cartpage .efm-mc--page{display:grid;grid-template-columns:minmax(0,1fr) 340px;grid-template-areas:"ship foot" "items foot";align-items:start;column-gap:32px}
	.efm-cartpage .efm-mc__ship{grid-area:ship}
	.efm-cartpage .efm-mc__scroll{grid-area:items}
	.efm-cartpage .efm-mc__recs li{flex-basis:160px}
	.efm-cartpage .efm-mc__foot{grid-area:foot;position:sticky;top:180px;margin:0;border:1px solid var(--efm-line);border-radius:12px;box-shadow:none}
	.efm-cartpage .efm-mc__item{grid-template-columns:110px minmax(0,1fr)}
}
