/* ════════════════════════════════════════════════════════════
   WAAD — Single Product  (v3.0 — Refined Design)
   Modern Arabic bookstore UI with refined typography & layout
═══════════════════════════════════════════════════════════════ */

:root {
	--w-navy:        #11274a;
	--w-navy-deep:   #0b1c35;
	--w-navy-mid:    #1d3f6e;
	--w-red:         #9d1f2f;
	--w-red-soft:    #fdf0f2;
	--w-teal:        #0ea5a0;
	--w-teal-deep:   #0c8580;
	--w-gold:        #c49a46;
	--w-gold-mid:    #d9b96a;
	--w-gold-soft:   #fdf6e7;
	--w-cream:       #f7f3eb;
	--w-cream-lt:    #fdfaf5;
	--w-cream-mid:   #ede6d8;
	--w-white:       #ffffff;
	--w-ink:         #172033;
	--w-muted:       #52607a;
	--w-light:       #8a94a8;
	--w-border:      #e8e1d5;
	--w-border-soft: #f2ece3;
	--w-shadow-sm:   0 4px 16px rgba(17,39,74,.06);
	--w-shadow:      0 12px 40px rgba(17,39,74,.09);
	--w-shadow-lg:   0 20px 56px rgba(17,39,74,.13);
	--w-radius:      18px;
	--w-radius-sm:   12px;
}

body.single-product {
	background: var(--w-cream-lt);
}

.waad-sp, .waad-sp * { box-sizing: border-box; }

.waad-sp {
	font-family: Cairo, Tajawal, "Noto Kufi Arabic", Arial, sans-serif;
	color: var(--w-ink);
}

.waad-sp a {
	color: var(--w-navy);
	text-decoration: none;
	transition: color .18s, background .18s, border-color .18s, transform .18s;
}

.waad-sp a:hover { color: var(--w-red); }

.waad-sp__container {
	max-width: 1300px;
	margin: 0 auto;
	padding: 28px 20px 80px;
	direction: rtl;
}

/* ─── BREADCRUMBS ─── */
.waad-sp__crumbs {
	font-size: 13px;
	color: var(--w-muted);
	margin-bottom: 18px;
	padding: 10px 16px;
	background: var(--w-white);
	border: 1px solid var(--w-border-soft);
	border-radius: 10px;
	box-shadow: var(--w-shadow-sm);
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.waad-sp__crumbs a { color: var(--w-light); }
.waad-sp__crumbs a:hover { color: var(--w-navy); }
.waad-sp__crumbs .sep { color: var(--w-border); font-size: 11px; }

/* ─── HERO GRID ─── */
.waad-sp__hero {
	display: grid;
	grid-template-columns: 280px minmax(0,1fr) 320px;
	gap: 24px;
	align-items: start;
	background: var(--w-white);
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	padding: 24px;
	box-shadow: var(--w-shadow);
	margin-bottom: 24px;
}

/* ─── COVER ─── */
.waad-sp__cover-shell {
	background: linear-gradient(160deg, #fdfaf5, #f5edd9);
	border: 1px solid var(--w-border-soft);
	border-radius: 14px;
	padding: 20px;
	position: relative;
	text-align: center;
}

.waad-sp__cover-shell::after {
	content: "";
	display: block;
	width: 60%;
	height: 18px;
	margin: 16px auto 0;
	background: radial-gradient(ellipse, rgba(17,39,74,.2), transparent 65%);
	filter: blur(6px);
}

.waad-sp__media .woocommerce-product-gallery {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

.waad-sp__media img.wp-post-image,
.waad-sp__media .woocommerce-product-gallery__image img {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: 400px;
	margin: 0 auto !important;
	border-radius: 10px;
	box-shadow: 2px 6px 20px rgba(17,39,74,.14), 0 22px 40px rgba(17,39,74,.18);
	display: block;
	object-fit: contain;
	transition: transform .3s, box-shadow .3s;
}
.waad-sp__media img.wp-post-image:hover,
.waad-sp__media .woocommerce-product-gallery__image img:hover {
	transform: translateY(-4px);
	box-shadow: 2px 10px 28px rgba(17,39,74,.16), 0 30px 50px rgba(17,39,74,.22);
}

.waad-sp__media .flex-control-thumbs {
	list-style: none;
	padding: 0;
	margin: 14px 0 0 !important;
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
}
.waad-sp__media .flex-control-thumbs li { width: 48px !important; float: none !important; }
.waad-sp__media .flex-control-thumbs img {
	border-radius: 8px;
	border: 2px solid transparent;
	opacity: .6;
	cursor: pointer;
	transition: opacity .18s, border-color .18s;
}
.waad-sp__media .flex-control-thumbs img.flex-active,
.waad-sp__media .flex-control-thumbs img:hover {
	opacity: 1;
	border-color: var(--w-gold);
}

.waad-sp__media .onsale {
	position: absolute;
	top: 12px; right: 12px;
	z-index: 3;
	background: var(--w-red) !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 5px 12px !important;
	font-weight: 800;
	font-size: 12px;
	line-height: 1;
}

/* Trust badges under cover */
.waad-sp__trust { margin-top: 16px; display: grid; gap: 8px; }
.waad-sp__trust-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: var(--w-cream-lt);
	border: 1px solid var(--w-border-soft);
	border-radius: 10px;
	padding: 10px 12px;
}
.waad-sp__trust-icon {
	width: 28px; height: 28px;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: #e6f7f4;
	color: var(--w-teal-deep);
	font-weight: 800;
	flex: 0 0 28px;
	font-size: 13px;
}
.waad-sp__trust strong { display: block; font-size: 13px; color: var(--w-ink); margin-bottom: 2px; }
.waad-sp__trust small  { display: block; font-size: 11.5px; line-height: 1.5; color: var(--w-light); }

/* ─── MAIN DETAILS ─── */
.waad-sp__main { min-width: 0; padding: 6px 6px; }

.waad-sp__cats {
	display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px;
}
.waad-sp__cats a {
	display: inline-flex; align-items: center;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--w-red-soft);
	color: var(--w-red);
	font-size: 12px;
	font-weight: 800;
	border: 1px solid rgba(157,31,47,.10);
	transition: background .18s, color .18s;
}
.waad-sp__cats a:hover { background: var(--w-red); color: #fff; }

.waad-sp__header {
	border-bottom: 1px solid var(--w-border-soft);
	padding-bottom: 16px;
	margin-bottom: 18px;
}
.waad-sp__title {
	font-size: clamp(24px, 2.8vw, 36px);
	line-height: 1.35;
	font-weight: 900;
	letter-spacing: -.025em;
	color: var(--w-navy-deep);
	margin: 0 0 10px;
}
.waad-sp__author {
	font-size: 15px;
	color: var(--w-muted);
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.waad-sp__author a {
	font-weight: 800;
	border-bottom: 1px dashed rgba(196,154,70,.5);
	padding-bottom: 1px;
}

.waad-sp__ratingline {
	display: flex; align-items: center; gap: 10px; min-height: 24px;
}
.waad-sp__ratingline .woocommerce-product-rating {
	margin: 0 !important;
	display: flex; align-items: center; gap: 8px;
	font-size: 13px; color: var(--w-muted);
}
.waad-sp__ratingline .star-rating { float: none !important; margin: 0 !important; color: var(--w-gold); }

.waad-sp__lead {
	font-size: 15px;
	line-height: 1.95;
	color: var(--w-muted);
	background: var(--w-gold-soft);
	border-right: 3px solid var(--w-gold);
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 18px;
}
.waad-sp__lead p { margin: 0 0 8px; }
.waad-sp__lead p:last-child { margin: 0; }

.waad-sp__quick-specs {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 14px 0 22px;
}
.waad-sp__quick-specs div {
	background: var(--w-white);
	border: 1px solid var(--w-border-soft);
	border-radius: 12px;
	padding: 12px 14px;
	box-shadow: var(--w-shadow-sm);
}
.waad-sp__quick-specs span {
	display: block; font-size: 11px; color: var(--w-light); margin-bottom: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.waad-sp__quick-specs strong {
	display: block; font-size: 13.5px; color: var(--w-ink); font-weight: 900; line-height: 1.5;
}

.waad-sp__section-title {
	display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; font-weight: 900; color: var(--w-navy);
}
.waad-sp__section-title::after { content: ""; height: 1px; background: var(--w-border); flex: 1; }
.waad-sp__section-title span { padding-bottom: 4px; border-bottom: 3px solid var(--w-red); }

.waad-sp__prose { font-size: 15.5px; line-height: 2.05; color: var(--w-muted); }
.waad-sp__prose p { margin: 0 0 14px; }
.waad-sp__prose h2,.waad-sp__prose h3,.waad-sp__prose h4 { color: var(--w-navy); margin: 18px 0 8px; font-weight: 900; }
.waad-sp__prose--intro { max-height: 240px; overflow: hidden; position: relative; }
.waad-sp__prose--intro::after {
	content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 60px;
	background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%); pointer-events: none;
}

/* ─── BUY CARD ─── */
.waad-sp__buycard {
	background: var(--w-white);
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	padding: 20px;
	box-shadow: var(--w-shadow);
	position: sticky !important;
	top: 92px;
	align-self: start;
}

.waad-sp__buy-status {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.waad-sp__buy-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.waad-sp__buy-status.is-instock  { background: #ecfdf5; color: var(--w-teal-deep); }
.waad-sp__buy-status.is-outstock { background: var(--w-red-soft); color: var(--w-red); }

.waad-sp__price {
	font-size: 30px; line-height: 1.2; font-weight: 900; color: var(--w-navy); margin: 0 0 12px;
}
.waad-sp__price .price { color: inherit !important; margin: 0; }
.waad-sp__price del  { font-size: 16px; color: var(--w-light); font-weight: 700; margin-inline-start: 8px; opacity: .8; }
.waad-sp__price ins  { text-decoration: none; background: transparent; color: var(--w-red); }

.waad-sp__stock { font-size: 13px; color: var(--w-muted); margin-bottom: 14px; }
.waad-sp__stock .stock { margin: 0; font-weight: 800; }
.waad-sp__stock .in-stock    { color: var(--w-teal-deep); }
.waad-sp__stock .out-of-stock{ color: var(--w-red); }

.waad-sp__cartbox { margin: 14px 0 12px; }
.waad-sp__cartbox form.cart {
	margin: 0 !important; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch;
}
.waad-sp__cartbox form.cart::before,.waad-sp__cartbox form.cart::after { display: none !important; }
.waad-sp__cartbox .quantity { float: none !important; margin: 0 !important; display: flex; align-items: stretch; min-width: 88px; }
.waad-sp__cartbox .quantity .qty {
	width: 88px !important; height: 46px;
	border: 1.5px solid var(--w-border); border-radius: 10px;
	text-align: center; font-weight: 900; color: var(--w-navy); background: #fff;
	transition: border-color .18s;
}
.waad-sp__cartbox .quantity .qty:focus { border-color: var(--w-navy); outline: none; }

.waad-sp__cartbox .single_add_to_cart_button,
.waad-sp__cartbox button.button,
.waad-sp__cartbox .button.alt {
	flex: 1 1 160px; min-height: 46px;
	border: 0 !important; border-radius: 12px !important;
	background: linear-gradient(135deg, var(--w-teal), var(--w-teal-deep)) !important;
	color: #fff !important;
	font-family: inherit; font-size: 15px !important; font-weight: 900 !important;
	padding: 12px 20px !important; line-height: 1.25 !important;
	box-shadow: 0 8px 20px rgba(14,165,160,.28);
	transition: transform .18s, filter .18s;
}
.waad-sp__cartbox .single_add_to_cart_button:hover,
.waad-sp__cartbox button.button:hover,
.waad-sp__cartbox .button.alt:hover {
	transform: translateY(-2px); filter: brightness(1.05);
}
.waad-sp__cartbox .single_add_to_cart_button.disabled,
.waad-sp__cartbox .single_add_to_cart_button:disabled {
	opacity: .5 !important; cursor: not-allowed; transform: none;
}

.waad-sp__cartbox table.variations {
	width: 100%; margin: 0 0 14px !important; border: 0; border-collapse: separate; border-spacing: 0 8px;
}
.waad-sp__cartbox table.variations tr,
.waad-sp__cartbox table.variations td,
.waad-sp__cartbox table.variations th {
	display: block; padding: 0 !important; background: transparent !important; border: 0 !important; text-align: right;
}
.waad-sp__cartbox table.variations label {
	display: block; font-size: 12px; font-weight: 800; color: var(--w-muted); margin-bottom: 5px;
}
.waad-sp__cartbox table.variations select {
	width: 100%; min-height: 42px;
	border: 1.5px solid var(--w-border); border-radius: 10px; padding: 0 12px;
	font-family: inherit; background: #fff; color: var(--w-ink);
	transition: border-color .18s;
}
.waad-sp__cartbox table.variations select:focus { border-color: var(--w-navy); outline: none; }
.waad-sp__cartbox .reset_variations { display: inline-block; font-size: 12px; margin-top: 5px; color: var(--w-red); }
.waad-sp__cartbox .single_variation_wrap,
.waad-sp__cartbox .woocommerce-variation-add-to-cart { width: 100%; }
.waad-sp__cartbox .woocommerce-variation-price { font-size: 20px; font-weight: 900; color: var(--w-navy); margin-bottom: 10px; }

.waad-sp__vat-note {
	margin: 12px 0 14px; font-size: 11.5px; color: var(--w-light); font-style: italic; text-align: center;
}

.waad-sp__buy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.waad-sp__mini-action {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 38px; border-radius: 10px;
	background: var(--w-cream-lt); border: 1px solid var(--w-border);
	font-size: 12px; font-weight: 800; color: var(--w-navy) !important;
	gap: 5px; transition: background .18s, color .18s;
}
.waad-sp__mini-action:hover { background: var(--w-navy); color: #fff !important; border-color: var(--w-navy); }

.waad-sp__side-meta { margin: 16px 0 0; border: 1px solid var(--w-border-soft); border-radius: 12px; overflow: hidden; }
.waad-sp__side-meta div { display: grid; grid-template-columns: 92px 1fr; border-bottom: 1px solid var(--w-border-soft); }
.waad-sp__side-meta div:last-child { border-bottom: 0; }
.waad-sp__side-meta dt,.waad-sp__side-meta dd { margin: 0; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.waad-sp__side-meta dt { background: #f6f2eb; color: var(--w-muted); font-weight: 800; }
.waad-sp__side-meta dd { background: #fff; color: var(--w-ink); font-weight: 700; word-break: break-word; }

/* ─── TABS ─── */
.waad-sp__tabs,.waad-sp__author-bio,.waad-sp__tags,.waad-sp__related {
	background: var(--w-white); border: 1px solid var(--w-border); border-radius: var(--w-radius);
	box-shadow: var(--w-shadow-sm); margin-bottom: 22px; overflow: hidden;
}
.waad-sp__tabs-nav {
	display: flex; overflow-x: auto; background: #f5f1e9; border-bottom: 1px solid var(--w-border);
	scrollbar-width: none;
}
.waad-sp__tabs-nav::-webkit-scrollbar { display: none; }
.waad-sp__tab {
	appearance: none; border: 0; background: transparent; font-family: inherit;
	padding: 15px 22px; font-size: 14px; font-weight: 800; color: var(--w-muted); cursor: pointer;
	white-space: nowrap; border-bottom: 3px solid transparent; transition: background .18s, color .18s, border-color .18s;
}
.waad-sp__tab:hover { color: var(--w-navy); background: rgba(255,255,255,.6); }
.waad-sp__tab.is-active { background: #fff; color: var(--w-navy); border-bottom-color: var(--w-red); }
.waad-sp__tabs-body { padding: 26px; }
.waad-sp__tab-pane { display: none; }
.waad-sp__tab-pane.is-active { display: block; animation: waadFade .22s ease; }
@keyframes waadFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.waad-sp__specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.waad-sp__spec-row {
	display: grid; grid-template-columns: 130px 1fr;
	border: 1px solid var(--w-border-soft); border-radius: 10px; overflow: hidden;
}
.waad-sp__spec-row dt,.waad-sp__spec-row dd { margin: 0; padding: 12px 14px; font-size: 13px; line-height: 1.65; }
.waad-sp__spec-row dt { background: #f6f2ea; color: var(--w-muted); font-weight: 800; }
.waad-sp__spec-row dd { font-weight: 700; color: var(--w-ink); word-break: break-word; }

.waad-sp__shipping-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.waad-sp__shipping-grid div,.waad-sp__reviews-note,.waad-sp__empty {
	background: var(--w-cream-lt); border: 1px solid var(--w-border-soft); border-radius: 14px;
	padding: 18px; color: var(--w-muted); line-height: 1.8;
}
.waad-sp__shipping-grid strong,.waad-sp__reviews-note strong { display: block; font-size: 15px; color: var(--w-navy); margin-bottom: 8px; }
.waad-sp__shipping-grid p,.waad-sp__reviews-note p { margin: 0; }

.waad-sp__author-bio,.waad-sp__tags { padding: 24px 26px; }
.waad-sp__author-bio h2 { font-size: 20px; color: var(--w-navy); margin: 0 0 12px; }

.waad-sp__tags {
	display: flex; gap: 9px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--w-muted);
}
.waad-sp__tags strong { color: var(--w-navy); }
.waad-sp__tags a {
	display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
	background: var(--w-cream-lt); color: var(--w-muted); font-size: 12px; font-weight: 700;
	border: 1px solid var(--w-border-soft); transition: background .18s, color .18s;
}
.waad-sp__tags a:hover { background: var(--w-navy); color: #fff; }

/* ─── RELATED BOOKS ─── */
.waad-sp__related { padding: 24px 26px 28px; }
.waad-sp__related-title {
	font-size: 20px; font-weight: 900; color: var(--w-navy); margin: 0 0 20px;
	padding-right: 14px; border-right: 4px solid var(--w-gold);
}
.waad-sp__related-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }

.waad-sp__r-card {
	border: 1px solid var(--w-border-soft); border-radius: 14px; padding: 10px;
	background: var(--w-white); transition: transform .22s, box-shadow .22s, border-color .22s; min-width: 0;
}
.waad-sp__r-card:hover { transform: translateY(-5px); box-shadow: var(--w-shadow); border-color: rgba(196,154,70,.5); }

.waad-sp__r-cover {
	display: block; aspect-ratio: 2/3; background: var(--w-cream); border-radius: 10px; overflow: hidden; margin-bottom: 10px;
}
.waad-sp__r-cover img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .28s; image-rendering: auto; }
.waad-sp__r-card:hover .waad-sp__r-cover img { transform: scale(1.04); }

.waad-sp__r-title {
	font-size: 13px; font-weight: 800; line-height: 1.45; margin: 0 0 4px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.waad-sp__r-auth { font-size: 11px; color: var(--w-light); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.waad-sp__r-price { font-size: 13px; font-weight: 900; color: var(--w-red); margin-top: 4px; }

/* ─── WOO OVERRIDES ─── */
.aw-product__layout-3col,.aw-product__attr-strip,.aw-product__author-bio,
.aw-product__attr-slider,.aw-product__specs-sidebar,.product_meta { display: none !important; }

.waad-sp .woocommerce-product-gallery__trigger { left: 12px !important; right: auto !important; z-index: 4; }
.waad-sp .woocommerce-Price-amount { font-weight: inherit; }
.waad-sp .screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1140px) {
	.waad-sp__hero { grid-template-columns: 260px 1fr; }
	.waad-sp__buycard {
		grid-column: 1 / -1;
		position: static !important;
		display: grid;
		grid-template-columns: 1fr 1.3fr 1fr;
		gap: 16px; align-items: start;
	}
	.waad-sp__vat-note,.waad-sp__buy-actions { grid-column: 2; }
	.waad-sp__related-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 840px) {
	.waad-sp__container { padding: 16px 14px 60px; }
	.waad-sp__hero { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
	.waad-sp__media { max-width: 300px; margin: 0 auto; width: 100%; }
	.waad-sp__main { padding: 0; }
	.waad-sp__title { font-size: 24px; }
	.waad-sp__buycard { display: block; position: static !important; }
	.waad-sp__quick-specs,.waad-sp__specs,.waad-sp__shipping-grid { grid-template-columns: 1fr; }
	.waad-sp__spec-row { grid-template-columns: 115px 1fr; }
	.waad-sp__tabs-body,.waad-sp__author-bio,.waad-sp__related { padding: 18px; }
	.waad-sp__related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
	.waad-sp__quick-specs { grid-template-columns: 1fr 1fr; }
	.waad-sp__cartbox form.cart { display: block; }
	.waad-sp__cartbox .quantity { margin-bottom: 10px !important; width: 100%; }
	.waad-sp__cartbox .quantity .qty { width: 100% !important; }
	.waad-sp__cartbox .single_add_to_cart_button,.waad-sp__cartbox button.button,.waad-sp__cartbox .button.alt { width: 100%; }
	.waad-sp__related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.waad-sp__tabs-nav { scroll-snap-type: x mandatory; }
	.waad-sp__tab { padding: 12px 15px; font-size: 13px; scroll-snap-align: start; }
}

body.waad-app-mode .waad-sp__crumbs,
body.waad-app-mode .waad-sp__related,
body.waad-app-mode .waad-sp__trust { display: none; }
