/* ==========================================================================
   WABAR — single product page
   Loaded on is_product() only, after main.css.

   The whole summary column is emitted by the theme in a fixed order
   (functions.php, "Single product"): title+price row → rating → social proof
   → short description → size options + CTA → tags → share → accordion.
   ========================================================================== */

/* --- Title + price on one row ------------------------------------------- */
.single-product .wabar-pd-head{
	display:flex;
	align-items:flex-start;
	justify-content:space-between;
	gap:16px 24px;
	flex-wrap:wrap;
	margin:0 0 12px;
}
.single-product .wabar-pd-head .product_title{
	margin:0;
	flex:1 1 auto;
	min-width:0;
	font-size:30px;
	line-height:1.35;
	font-weight:700;
}
.single-product .wabar-pd-price{
	flex:0 0 auto;
	text-align:end;
	padding-top:4px;
}
/* Price markup comes from WooCommerce: <ins> = current, <del> = struck-through. */
.single-product .wabar-pd-price .price,
.single-product .wabar-pd-price > .amount,
.single-product .wabar-pd-price ins{
	display:block;
	margin:0;
	color:var(--primary);
	font-size:26px;
	font-weight:700;
	text-decoration:none;
	line-height:1.3;
	white-space:nowrap;
}
.single-product .wabar-pd-price del{
	display:block;
	margin:2px 0 0;
	color:var(--muted);
	font-size:17px;
	font-weight:400;
	opacity:.85;
	white-space:nowrap;
}
.single-product .wabar-pd-price del .amount{text-decoration:line-through;}
.single-product .wabar-pd-price .wabar-sar{width:.82em;height:.82em;vertical-align:-.04em;}
/* The discount badge/percentage was dropped on purpose — the owner wants the
   before/after price only. */

/* --- Gallery: flexslider, forced LTR --------------------------------------
   flexslider can't do RTL (the track transform sticks at 0, so thumbnail
   clicks never switch the photo — it used to "fix" this with a stacked-view
   hack that killed the slider entirely). functions.php passes rtl:false to
   woocommerce_single_product_carousel_options; the direction here keeps the
   container geometry consistent with that. */
.single-product .woocommerce-product-gallery{direction:ltr;overflow:hidden;}
.single-product .woocommerce-product-gallery__image img{width:100%;height:auto;border-radius:14px;}
.single-product .woocommerce-product-gallery__trigger{display:none !important;}

/* --- Gallery thumbnails --------------------------------------------------- */
/* FlexSlider/Astra float these at 25% each, so 4+ images wrapped onto a second
   row and each thumb was ~155px tall. Force a single non-wrapping row of small
   squares that shrink as the image count grows. !important: Astra's WooCommerce
   sheet sets width/float on the list items. */
.single-product .flex-control-thumbs{
	display:flex !important;
	flex-wrap:nowrap !important;
	gap:8px;
	margin:14px 0 0;
	padding:0;
	list-style:none;
}
.single-product .flex-control-thumbs li{
	flex:1 1 0;
	min-width:0;
	max-width:86px;
	width:auto !important;
	float:none !important;
	margin:0 !important;
	padding:0;
}
.single-product .flex-control-thumbs li img{
	width:100%;
	height:auto;
	aspect-ratio:1/1;
	object-fit:cover;
	border-radius:9px;
}

/* --- Rating -------------------------------------------------------------- */
/* --- Short description ---------------------------------------------------- */
.single-product .woocommerce-product-details__short-description{
	margin:0 0 20px;
	padding-bottom:20px;
	border-bottom:1px solid var(--line);
}
.single-product .woocommerce-product-details__short-description p:last-child{margin-bottom:0;}

/* --- Size options + CTA --------------------------------------------------- */
/* Compact: the size row was eating a lot of vertical space above the fold. */
.single-product form.cart{margin:0;}
.single-product .variations_form table.variations{margin:0 0 4px;}
.single-product .variations_form .variations th.label{padding:0;margin:0;}
.single-product .variations_form .variations td.value{padding:0;position:relative;}
/* WooCommerce only toggles this link's `visibility`, so it kept reserving a
   whole line above the size buttons. Take it out of the flow instead. */
/* !important: Astra's WooCommerce sheet pins this link to `position:static`. */
.single-product .variations_form .reset_variations{
	position:absolute !important;
	top:2px;
	inset-inline-start:0;
	font-size:12px;
	color:var(--muted);
}
.single-product .variations th.label label{
	font-weight:600;
	font-size:14px;
	color:var(--dark);
	margin:0;
	line-height:1.6;
}
.single-product .wabar-variation-buttons{gap:8px;margin:8px 0 0;}
.single-product .wabar-variation-buttons .vbtn{
	min-width:44px;
	padding:6px 12px;
	font-size:13.5px;
	line-height:1.6;
	border-radius:7px;
}
/* Quantity + add-to-cart on one row; the button takes the rest of the width.
   Astra's WooCommerce stylesheet beats a plain `width:100%` on the button. */
.single-product .woocommerce-variation-add-to-cart,
.single-product form.cart:not(.variations_form){
	display:flex;
	align-items:stretch;
	gap:12px;
	margin:12px 0 0;
}
.single-product .single_variation_wrap .woocommerce-variation{margin:0;}
.single-product form.cart .quantity{flex:0 0 auto;margin:0;}
.single-product form.cart .quantity input{height:100%;width:88px;text-align:center;}
/* Quantity stepper (buttons injected by product.js) */
.single-product form.cart .quantity.wabar-qty{
	display:flex;
	align-items:stretch;
	border:1px solid var(--line);
	border-radius:10px;
	overflow:hidden;
	background:#fff;
}
.single-product form.cart .quantity.wabar-qty input{
	width:54px;
	height:auto;
	border:0;
	background:transparent;
	font-size:16px;
	font-weight:700;
	-moz-appearance:textfield;
	appearance:textfield;
}
.single-product .quantity.wabar-qty input::-webkit-outer-spin-button,
.single-product .quantity.wabar-qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
/* Astra's form.cart button rules beat a bare class — match their specificity. */
.single-product form.cart .quantity.wabar-qty .wabar-qty-btn{
	flex:0 0 46px;
	width:46px;
	min-height:46px;
	padding:0;
	border:0;
	border-radius:0;
	background:var(--bg-soft);
	color:var(--dark);
	font-size:24px !important;
	font-weight:700;
	line-height:1;
	cursor:pointer;
	display:flex;
	align-items:center;
	justify-content:center;
	transition:background .15s,color .15s;
}
.single-product form.cart .quantity.wabar-qty .wabar-qty-btn:hover{background:var(--cream-soft,#fdf4e8);color:var(--primary);}
.single-product .single_add_to_cart_button,
.single-product button.single_add_to_cart_button{
	flex:1 1 auto;
	width:auto !important;
	min-width:0;
	margin:0 !important;
}

/* --- Closing block: tags + share (last thing in the column) ---------------- */
.wabar-pd-tags{
	margin:24px 0 0;
	padding-top:18px;
	border-top:1px solid var(--line);
	display:flex;
	flex-direction:column;
	gap:10px;
}
.wabar-pd-tagrow{
	display:flex;
	align-items:baseline;
	gap:12px;
	flex-wrap:wrap;
	font-size:14px;
}
.wabar-pd-tagkey{
	flex:0 0 84px;
	color:var(--muted);
	font-size:13px;
	font-weight:600;
}
.wabar-pd-taglist{display:flex;flex-wrap:wrap;gap:7px;}
.wabar-chip{
	display:inline-flex;
	align-items:center;
	background:var(--bg-soft);
	border:1px solid var(--line);
	border-radius:999px;
	padding:5px 13px;
	font-size:13px;
	font-weight:500;
	color:#4a4a4a;
	line-height:1.6;
}
.wabar-chip-link{transition:.15s;}
.wabar-chip-link:hover{
	border-color:var(--primary);
	background:var(--cream-soft,#fdf4e8);
	color:var(--primary) !important;
}
.wabar-pd-sku{font-size:13px;color:#4a4a4a;letter-spacing:.4px;}

/* --- Share --------------------------------------------------------------- */
.single-product .wabar-share{
	margin:14px 0 0;
	padding-top:0;
	border-top:none;
	text-align:start;
	display:flex;
	align-items:center;
	gap:10px;
	flex-wrap:wrap;
}
/* Same key column as the tag rows above, so the block reads as one table. */
.single-product .wabar-share h4{margin:0;font-size:13px;flex:0 0 84px;font-weight:600;}
.single-product .wabar-share a{
	width:36px;height:36px;margin:0;
	border:1px solid var(--line);
	border-radius:50%;
	transition:.15s;
}
.single-product .wabar-share a:hover{
	border-color:var(--primary);
	background:var(--cream-soft,#fdf4e8);
}

/* --- Accordion ----------------------------------------------------------- */
.wabar-acc{
	margin:26px 0 0;
	border:1px solid var(--line);
	border-radius:14px;
	overflow:hidden;
	background:#fff;
}
.wabar-acc-item + .wabar-acc-item{border-top:1px solid var(--line);}
.wabar-acc-head{
	display:flex;
	align-items:center;
	gap:12px;
	padding:16px 18px;
	cursor:pointer;
	list-style:none;
	font-weight:600;
	font-size:15px;
	color:var(--dark);
	transition:background .15s;
	user-select:none;
}
.wabar-acc-head::-webkit-details-marker{display:none;}
.wabar-acc-head:hover{background:var(--bg-soft);}
.wabar-acc-item[open] > .wabar-acc-head{background:var(--cream-soft,#fdf4e8);}
.wabar-acc-icon{font-size:19px;line-height:1;flex:0 0 auto;}
.wabar-acc-title{flex:1 1 auto;min-width:0;}
.wabar-acc-chevron{
	flex:0 0 auto;
	width:20px;height:20px;
	color:var(--primary);
	transition:transform .25s ease;
}
.wabar-acc-chevron svg{width:100%;height:100%;display:block;}
.wabar-acc-item[open] .wabar-acc-chevron{transform:rotate(180deg);}
.wabar-acc-body{
	padding:2px 18px 18px;
	font-size:14.5px;
	animation:wabar-acc-in .22s ease;
}
@keyframes wabar-acc-in{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
.wabar-acc-body > .wabar-size-guide > *:last-child{margin-bottom:0;}
.wabar-acc-body p{color:#555;line-height:1.9;margin:0 0 12px;}
.wabar-acc-body p:last-child{margin-bottom:0;}
/* The "تفاصيل المنتج" panel prints the product's own description, which is
   authored with headings and bullet lists. */
.wabar-acc-body h2,
.wabar-acc-body h3,
.wabar-acc-body h4{
	font-size:15px;
	font-weight:700;
	color:var(--dark);
	margin:16px 0 8px;
}
.wabar-acc-body > *:first-child,
.wabar-acc-body > div > *:first-child{margin-top:0;}
.wabar-acc-body ul{margin:0 0 14px;padding:0 20px 0 0;list-style:none;}
.wabar-acc-body li{
	position:relative;
	color:#555;
	line-height:1.95;
	margin:0 0 6px;
	padding-right:18px;
}
.wabar-acc-body li::before{
	content:"";
	position:absolute;
	right:0;top:13px;
	width:6px;height:6px;
	border-radius:50%;
	background:var(--primary);
}
.wabar-acc-body ul:last-child,
.wabar-acc-body li:last-child{margin-bottom:0;}
.wabar-policy-link a{color:var(--primary) !important;font-weight:600;}

/* --- Mobile -------------------------------------------------------------- */
@media (max-width:860px){
	.single-product .flex-control-thumbs{gap:6px;}
	.single-product .flex-control-thumbs li{max-width:64px;}

	.single-product .wabar-pd-head{
		flex-wrap:nowrap;
		align-items:flex-start;
		gap:14px;
	}
	.single-product .wabar-pd-head .product_title{font-size:22px;}
	.single-product .wabar-pd-price .price,
	.single-product .wabar-pd-price > .amount,
	.single-product .wabar-pd-price ins{font-size:21px;}
	.single-product .wabar-pd-price del{font-size:15px;}

	/* Full-bleed accordion: each row spans the screen width. */
	.wabar-acc{
		margin-inline:calc(var(--wabar-gutter, 16px) * -1);
		border-inline:none;
		border-radius:0;
	}
	.wabar-acc-head{padding:16px var(--wabar-gutter,16px);}
	.wabar-acc-body{padding:2px var(--wabar-gutter,16px) 18px;}

	.wabar-pd-tagkey{flex-basis:100%;}
}

/* --- عرض التيشيرتات box (inc/oso-bundle-offer.php, summary @8) ----------
   Light and quiet on purpose: cream card, hairline gold border, two tiles. */
.single-product .oso-deal{
	margin:6px 0 20px;padding:14px;border-radius:16px;
	background:#F8F5EF;border:1px solid rgba(199,154,74,.38);
}
.single-product .oso-deal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;}
.single-product .oso-deal-badge{font-size:14px;font-weight:800;color:#173F53;}
.single-product .oso-deal-head small{font-size:12.5px;color:#7C8587;}
.single-product .oso-deal-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.single-product .oso-deal-tile{
	display:flex;flex-direction:column;align-items:flex-start;gap:2px;
	padding:10px 14px;border-radius:12px;background:#fff;border:1px solid #ece5d6;
}
.single-product .oso-deal-tile span{font-size:13px;color:#5f676a;}
.single-product .oso-deal-tile strong{font-size:22px;line-height:1.3;font-weight:800;color:#102A38;}
.single-product .oso-deal-tile .wabar-sar{width:.72em;height:.72em;vertical-align:-.02em;}
