/* UpsellWP «frequently bought together» («هذا العرض فيه تخفيض معا») restyled from the outside; no plugin file touched.
   Values come from the dashboard section «العرض المجمّع» through the --up-* custom properties printed in <head> by inc/pdp/upsell.php.
   The plugin writes inline styles on almost everything, hence the !important rules. Loaded on product, cart and checkout pages. */
.cuw-template{
	--up-acc:var(--pal-accent,var(--primary,#ff8a00));
	--up-ink:var(--pal-ink,var(--ink,#111));
	--up-muted:var(--muted,#6b6b6b);
	--up-bg:color-mix(in srgb,var(--up-acc) 5%,#fffdf9);
	--up-bd:color-mix(in srgb,var(--up-acc) 16%,#eadfd2);
	--up-r:24px;
	--up-sh:0 18px 40px -28px rgba(60,30,20,.35);
	--up-card-bg:#fff;
	--up-card-bd:color-mix(in srgb,var(--up-acc) 14%,#ece3d8);
	--up-card-r:18px;
	--up-new:var(--up-ink);
	--up-old:var(--up-muted);
	--up-tot-bg:color-mix(in srgb,var(--up-acc) 9%,#fff);
	--up-tot-bd:color-mix(in srgb,var(--up-acc) 30%,transparent);
	--up-tot-ink:var(--up-ink);
	--up-btn-bg:var(--cod-grad,linear-gradient(135deg,var(--pal-accent-hi,color-mix(in srgb,var(--up-acc) 62%,#fff)) 0%,var(--up-acc) 48%,color-mix(in srgb,var(--up-acc) 84%,#000) 100%));
	--up-btn-ink:var(--cod-on-gold,#111);
	--up-btn-r:16px;
	--up-btn-h:58px;
	--up-gap:14px;
	--up-img-m:88px;
	--up-img-d:150px;
	--up-title-s:20px;
	--up-title-c:var(--up-ink);
	--up-title-a:center;
	--up-ease:cubic-bezier(.22,.8,.3,1);
}

/* ---- exactly ONE block per breakpoint (768px), not depending on the plugin's own CSS ---- */
@media(max-width:768px){body .cuw-fbt-products.cuw-desktop-block{display:none!important}body .cuw-fbt-products.cuw-mobile-block{display:block!important}}
@media(min-width:769px){body .cuw-fbt-products.cuw-mobile-block{display:none!important}body .cuw-fbt-products.cuw-desktop-block{display:block!important}}

/* ---- the container: one calm rounded panel ---- */
body.sz-up-on .cuw-fbt-products{
	box-sizing:border-box;margin:22px 0!important;padding:20px 16px 18px!important;
	border:1px solid var(--up-bd)!important;border-radius:var(--up-r);background:var(--up-bg);color:var(--up-ink);
	box-shadow:var(--up-sh);font-family:inherit;line-height:1.6;text-align:start;
}
body.sz-up-on .cuw-fbt-products *{box-sizing:border-box;font-family:inherit}
body.sz-up-on .cuw-fbt-products .cuw-heading{
	margin:0 0 16px!important;padding:0;text-align:var(--up-title-a);color:var(--up-title-c);font-size:var(--up-title-s);font-weight:800;line-height:1.5;letter-spacing:0;
}
body.sz-up-on .cuw-fbt-products .cuw-form{display:flex!important;flex-direction:column!important;gap:var(--up-gap)!important;margin:0!important}

/* ---- product cards (phone block) ---- */
body.sz-up-on .cuw-mobile-block .cuw-gird{display:flex!important;flex-direction:column!important;gap:var(--up-gap);width:100%!important}
body.sz-up-on .cuw-mobile-block .cuw-gird>.cuw-product{
	position:relative;margin:0!important;padding:12px 56px 12px 12px;border:1.5px solid var(--up-card-bd);border-radius:var(--up-card-r);background:var(--up-card-bg);
	box-shadow:0 8px 20px -18px rgba(0,0,0,.4);transition:border-color .25s var(--up-ease),box-shadow .25s var(--up-ease);
}
body.sz-up-on .cuw-mobile-block .cuw-gird>.cuw-product:has(.cuw-product-checkbox:checked){border-color:var(--up-acc)}
body.sz-up-on .cuw-mobile-block .cuw-gird>.cuw-product>div{display:flex!important;align-items:center;gap:14px!important}
body.sz-up-on .cuw-mobile-block .cuw-product-image{flex:0 0 auto;width:var(--up-img-m)!important;height:var(--up-img-m)!important;max-height:none!important;overflow:hidden;border-radius:calc(var(--up-card-r) - 4px);background:#f4f1ec}
body.sz-up-on .cuw-mobile-block .cuw-gird>.cuw-product>div>div:not(.cuw-product-image){width:auto!important;flex:1 1 auto;min-width:0;padding:0!important}

/* ---- shared card parts ---- */
body.sz-up-on .cuw-fbt-products .cuw-product-image img{display:block;width:100%!important;height:100%!important;object-fit:contain;background:#fff;border-radius:inherit;margin:0}
body.sz-up-on .cuw-fbt-products .cuw-product-title{margin:0;padding-inline-end:0;color:var(--up-ink);font-size:14.5px;font-weight:700;line-height:1.55;text-align:start;overflow-wrap:anywhere}
body.sz-up-on .cuw-fbt-products .cuw-product-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;margin:0;font-size:15.5px;font-weight:800;color:var(--up-new)}
body.sz-up-on .cuw-fbt-products .cuw-product-price ins,body.sz-up-on .cuw-fbt-products .cuw-total-price ins{background:none;text-decoration:none;color:var(--up-new);font-weight:800}
body.sz-up-on .cuw-fbt-products .cuw-product-price del,body.sz-up-on .cuw-fbt-products .cuw-total-price del{color:var(--up-old);font-size:.82em;font-weight:500;opacity:.9;text-decoration-thickness:1.5px}
body.sz-up-on .cuw-fbt-products .cuw-product-price .screen-reader-text{position:absolute!important}

/* ---- the round check in the accent colour ---- */
body.sz-up-on .cuw-fbt-products input.cuw-product-checkbox{
	-webkit-appearance:none;appearance:none;position:absolute!important;inset-block-start:50%;margin-top:-14px!important;inset-inline-end:14px;float:none!important;flex:none;
	width:28px;height:28px;padding:0;border:2px solid color-mix(in srgb,var(--up-acc) 55%,#c9bfb2);border-radius:50%;background:#fff center/16px 16px no-repeat;cursor:pointer;
	transition:background-color .2s var(--up-ease),border-color .2s,transform .2s var(--up-ease),box-shadow .2s;
}
body.sz-up-on .cuw-fbt-products input.cuw-product-checkbox:checked{
	border-color:var(--up-acc);background-color:var(--up-acc);
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.6 4.6L19 7.5'/%3E%3C/svg%3E");
	box-shadow:0 0 0 4px color-mix(in srgb,var(--up-acc) 20%,transparent);
}
body.sz-up-on .cuw-fbt-products input.cuw-product-checkbox:active{transform:scale(.9)}
body.sz-up-on .cuw-fbt-products input.cuw-product-checkbox:focus-visible{outline:2px solid var(--up-ink);outline-offset:3px}
body.sz-up-on .cuw-fbt-products input.cuw-product-checkbox::before,body.sz-up-on .cuw-fbt-products input.cuw-product-checkbox::after{content:none!important}
/* the checkbox row inside the phone card: the box sits in the card corner, the title keeps clear of it */
body.sz-up-on .cuw-mobile-block .cuw-gird>.cuw-product>div>div>div:first-child{display:block!important}

/* ---- desktop block: a centred row of cards (theme JS moves each picture into its row), then total + button ---- */
body.sz-up-on .cuw-desktop-block .cuw-form{align-items:center}
body.sz-up-on .cuw-desktop-block .cuw-form>.cuw-buy-section{order:1;width:100%;padding:0!important;align-items:center!important}
body.sz-up-on .cuw-desktop-block .cuw-form>.cuw-gird{order:2;display:block!important;width:100%}
body.sz-up-on .cuw-desktop-block .cuw-product-actions{display:flex!important;flex-direction:row!important;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:calc(var(--up-gap) + 6px)!important;width:100%}
body.sz-up-on .cuw-desktop-block .cuw-product-row{
	position:relative;flex:0 1 230px!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start;gap:10px!important;margin:0!important;padding:14px 14px 16px;text-align:center;
	border:1.5px solid var(--up-card-bd);border-radius:var(--up-card-r);background:var(--up-card-bg);box-shadow:0 8px 20px -18px rgba(0,0,0,.4);transition:border-color .25s var(--up-ease);
}
body.sz-up-on .cuw-desktop-block .cuw-product-row:has(.cuw-product-checkbox:checked){border-color:var(--up-acc)}
body.sz-up-on .cuw-desktop-block .cuw-product-row .cuw-product-image{order:-1;flex:0 0 auto;width:var(--up-img-d)!important;height:var(--up-img-d)!important;overflow:hidden;border-radius:calc(var(--up-card-r) - 4px);background:#f4f1ec}
body.sz-up-on .cuw-desktop-block .cuw-product-row .cuw-product-title{padding-inline-end:0;text-align:center;order:1}
body.sz-up-on .cuw-desktop-block .cuw-product-row .cuw-product-price{order:2;justify-content:center}
/* the «+» between cards */
body.sz-up-on .cuw-desktop-block .cuw-product-row:not(:last-child)::after{
	content:"+";position:absolute;inset-inline-end:calc((var(--up-gap) + 6px) / -2 - 11px);top:calc(var(--up-img-d) / 2 + 14px);z-index:2;
	display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--up-bg);border:1.5px solid var(--up-card-bd);color:var(--up-acc);font:800 15px/1 inherit;pointer-events:none;
}
body.sz-up-no-sep .cuw-product-row::after{display:none!important}
body.sz-up-on .cuw-desktop-block .cuw-product-row input.cuw-product-checkbox{inset-block-start:12px;margin-top:0!important;inset-inline-end:12px}
/* until the theme script has moved the pictures, the plugin's own picture row stays as it is */
body.sz-up-on .cuw-desktop-block.sz-up-merged .cuw-gird>.cuw-product{display:none!important}

/* ---- total + button (both blocks) ---- */
body.sz-up-on .cuw-fbt-products .cuw-buy-section{width:100%!important;max-width:none!important;padding:0!important;margin:0!important;justify-content:center;align-items:stretch!important}
body.sz-up-on .cuw-fbt-products .cuw-actions{width:100%;margin:0!important}
body.sz-up-on .cuw-desktop-block .cuw-actions[style*="display: block"],body.sz-up-on .cuw-desktop-block .cuw-actions[style*="display:block"]{display:flex!important;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px 18px}
body.sz-up-on .cuw-fbt-products .cuw-total-price-section{
	display:flex!important;flex-wrap:nowrap!important;align-items:baseline;justify-content:space-between!important;gap:10px!important;margin:0 0 10px!important;padding:12px 18px;
	border:1px solid var(--up-tot-bd);border-radius:calc(var(--up-card-r) - 2px);background:var(--up-tot-bg);color:var(--up-tot-ink);font-size:15px;font-weight:700;
}
body.sz-up-on .cuw-desktop-block .cuw-total-price-section{margin:0!important;min-width:260px}
body.sz-up-on .cuw-fbt-products .cuw-total-price{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;font-size:19px!important;font-weight:800}
body.sz-up-no-total .cuw-total-price-section{display:none!important}
body.sz-up-on .cuw-fbt-products .cuw-actions>div:not(.cuw-total-price-section){margin:0!important}
body.sz-up-on .cuw-desktop-block .cuw-actions>div:not(.cuw-total-price-section){flex:0 1 340px}
body.sz-up-on .cuw-fbt-products .cuw-add-to-cart{
	display:flex!important;align-items:center;justify-content:center;gap:10px;width:100%!important;min-height:var(--up-btn-h);margin:0!important;padding:10px 20px!important;
	border:0!important;border-radius:var(--up-btn-r)!important;background:var(--up-btn-bg)!important;color:var(--up-btn-ink)!important;
	font-size:16px;font-weight:800;line-height:1.35;text-transform:none!important;text-align:center;white-space:normal!important;cursor:pointer;
	box-shadow:0 12px 24px -12px color-mix(in srgb,var(--up-acc) 60%,transparent),inset 0 1px 0 rgba(255,255,255,.5);
	transition:transform .15s var(--up-ease),box-shadow .25s var(--up-ease),filter .2s,opacity .2s;
}
body.sz-up-on .cuw-fbt-products .cuw-add-to-cart:hover{filter:brightness(1.03)}
body.sz-up-on .cuw-fbt-products .cuw-add-to-cart:active{transform:scale(.97)}
body.sz-up-on .cuw-fbt-products .cuw-add-to-cart:focus-visible{outline:2px solid var(--up-ink);outline-offset:3px}
body.sz-up-on .cuw-fbt-products .cuw-add-to-cart:disabled,body.sz-up-on .cuw-fbt-products .cuw-add-to-cart.loading{opacity:.6;cursor:progress}
body.sz-up-on .cuw-fbt-products .cuw-message{width:100%;text-align:center;color:var(--up-muted);font-size:14px}
body.sz-up-on .cuw-fbt-products .cuw-message p{padding:8px 0!important;margin:0!important}

/* ---- «clean list» layout: no cards, thin separators, small pictures ---- */
body.sz-up-list .cuw-fbt-products .cuw-product-row,body.sz-up-list .cuw-mobile-block .cuw-gird>.cuw-product{
	border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;border-bottom:1px solid var(--up-card-bd)!important;padding:12px 6px!important;
}
body.sz-up-list .cuw-desktop-block .cuw-product-actions{flex-direction:column!important;flex-wrap:nowrap;gap:0!important;max-width:620px;margin-inline:auto}
body.sz-up-list .cuw-desktop-block .cuw-product-row{flex:0 0 auto!important;flex-direction:row!important;align-items:center!important;text-align:start;gap:16px!important;width:100%}
body.sz-up-list .cuw-desktop-block .cuw-product-row .cuw-product-image{order:0;width:84px!important;height:84px!important}
body.sz-up-list .cuw-desktop-block .cuw-product-row .cuw-product-title{text-align:start;flex:1}
body.sz-up-list .cuw-desktop-block .cuw-product-row .cuw-product-price{justify-content:flex-start}
body.sz-up-list .cuw-desktop-block .cuw-product-row::after{display:none!important}

/* ---- checkout bumps and cart offers share the look ---- */
body.sz-up-on .cuw-template:not(.cuw-fbt-products){border-radius:var(--up-card-r);border:1px solid var(--up-bd);background:var(--up-bg);color:var(--up-ink)}
body.sz-up-on .cuw-template:not(.cuw-fbt-products) :where(button,.button,a.button){border-radius:var(--up-btn-r)}

@media(min-width:769px){
	body.sz-up-on .cuw-fbt-products{padding:26px 26px 24px!important}
}
@media(prefers-reduced-motion:reduce){body.sz-up-on .cuw-fbt-products *{transition:none!important}}
