/* ============================================================
   Digi4u storefront theme — design system + components
   ============================================================ */

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg-page: #eff3f6;
	--bg-card: #ffffff;
	--primary: #2f3ac9;
	--primary-600: #2530a8;
	--primary-50: #ecedfb;
	--text: #1e293b;
	--text-2: #475569;
	--text-3: #94a3b8;
	--border: #eef2f6;
	--border-2: #e2e8f0;
	--success: #16a34a;
	--danger: #dc2626;
	--radius: 16px;
	--radius-sm: 12px;
	--font: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font) !important;
	background: var(--bg-page);
	color: var(--text);
	direction: rtl;
	font-size: 14px;
	line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1380px; margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 24px; }
.hidden-sm { }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
	padding: 10px 20px; transition: all .15s ease; cursor: pointer; line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-light { background: #fff; color: var(--primary); border: 1px solid var(--border-2); }
.btn-light:hover { background: #f8fafc; }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover { background: #d6eafb; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.header-top { border-bottom: 1px solid var(--border); }
.header-top .container { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 800; color: var(--primary); }
.header-search { flex: 1; max-width: 620px; }
.header-search form { position: relative; }
.header-search input {
	width: 100%; height: 44px; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
	padding: 0 16px; font-family: inherit; font-size: 13px; background: #f8fafc;
}
.header-search input:focus { outline: none; border-color: var(--primary); background: #fff; }
.header-search button { position: absolute; inset-inline-start: 6px; top: 6px; height: 32px; width: 32px; border: none; background: transparent; color: var(--text-3); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.icon-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; color: var(--text-2); background: transparent; }
.icon-btn:hover { background: #f1f5f9; color: var(--text); }
.icon-btn svg { width: 24px; height: 24px; }
.cart-badge { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Bottom nav row */
.header-nav { background: #fff; border-bottom: 1px solid var(--border); }
.header-nav .container { display: flex; align-items: center; height: 48px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 0 14px; height: 48px; display: flex; align-items: center; font-size: 13px; color: var(--text-2); }
.nav-links a:hover { color: var(--primary); }

/* ── Mega menu ─────────────────────────────────────────────── */
.mega { position: relative; height: 48px; }
.mega-trigger {
	display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 16px;
	font-weight: 700; font-size: 13px; color: var(--primary); background: transparent; border: none;
	border-inline-end: 1px solid var(--border);
}
.mega-trigger svg { width: 18px; height: 18px; }
.mega-panel {
	position: absolute; top: 100%; inset-inline-start: 0; z-index: 50; display: none;
	width: 940px; max-width: 95vw; background: #fff; border: 1px solid var(--border-2); border-top: none;
	border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 20px 40px -16px rgba(15,23,42,.25);
}
.mega:hover .mega-panel, .mega.open .mega-panel { display: flex; }
.mega-parents { width: 220px; flex-shrink: 0; border-inline-end: 1px solid var(--border); padding: 8px 0; max-height: 460px; overflow-y: auto; }
.mega-parent { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.mega-parent svg { width: 20px; height: 20px; flex-shrink: 0; }
.mega-parent .chev { margin-inline-start: auto; opacity: .5; width: 16px; height: 16px; }
.mega-parent:hover, .mega-parent.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.mega-content { flex: 1; padding: 20px; display: none; grid-template-columns: repeat(3, 1fr); gap: 18px 24px; align-content: start; max-height: 460px; overflow-y: auto; }
.mega-content.active { display: grid; }
.mega-group > a { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border-2); padding-bottom: 8px; margin-bottom: 8px; }
.mega-group > a svg { width: 16px; height: 16px; color: var(--primary); }
.mega-group ul { list-style: none; margin: 0; padding: 0; }
.mega-group li a { display: block; font-size: 12px; color: var(--text-3); padding: 3px 0; }
.mega-group li a:hover { color: var(--primary); }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero { padding-top: 16px; }
.slider { position: relative; height: 420px; border-radius: var(--radius); overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-dots { position: absolute; bottom: 16px; inset-inline-start: 50%; transform: translateX(50%); display: flex; gap: 8px; z-index: 5; }
.slider-dots button { width: 8px; height: 8px; border-radius: 9px; border: none; background: rgba(255,255,255,.6); transition: all .2s; }
.slider-dots button.active { width: 24px; background: #fff; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.8); color: var(--text); display: flex; align-items: center; justify-content: center; }
.slider-arrow:hover { background: #fff; }
.slider-arrow svg { width: 20px; height: 20px; }
.slider-arrow.prev { inset-inline-start: 12px; }
.slider-arrow.next { inset-inline-end: 12px; }

/* ============================================================
   CATEGORY CARDS ROW
   ============================================================ */
.cat-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 12px; }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cat-card .thumb { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.05); transition: all .2s; }
.cat-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cat-card:hover .thumb { transform: translateY(-2px); border-color: #bfdbf3; box-shadow: 0 8px 18px -10px rgba(26,115,199,.4); }
.cat-card:hover .thumb img { transform: scale(1.05); }
.cat-card span { font-size: 12px; font-weight: 500; color: var(--text-2); text-align: center; }
.cat-card:hover span { color: var(--primary); }

/* ============================================================
   SECTION HEADER + PRODUCT GRID
   ============================================================ */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sec-title { display: flex; align-items: center; gap: 12px; }
.sec-title .ic { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: #fff; }
.sec-title .ic svg { width: 22px; height: 22px; }
.sec-title h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--text); }

.product-card-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.05); padding: 20px 24px; }
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }

/* ── Product card ──────────────────────────────────────────── */
.pcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: all .3s; }
.pcard:hover { transform: translateY(-2px); border-color: #bfdbf3; box-shadow: 0 10px 22px -12px rgba(26,115,199,.45); }
.pcard .wish { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--text-3); border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pcard .wish:hover { color: var(--danger); }
.pcard .wish svg { width: 16px; height: 16px; }
.pcard .avail { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.88); border-radius: 9px; padding: 2px 7px; box-shadow: 0 1px 2px rgba(0,0,0,.06); font-size: 9px; font-weight: 600; }
.pcard .avail .dot { width: 6px; height: 6px; border-radius: 50%; }
.pcard .pimg { position: relative; aspect-ratio: 1; background: linear-gradient(to bottom,#f8fafc,#fff); padding: 12px; }
.pcard .pimg img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.pcard:hover .pimg img { transform: scale(1.08); }
.pcard .pbody { display: flex; flex-direction: column; flex: 1; padding: 4px 10px 10px; }
.pcard .pcat { align-self: flex-start; background: #f1f5f9; color: var(--text-3); font-size: 10px; border-radius: 5px; padding: 1px 7px; margin-bottom: 4px; }
.pcard:hover .pcat { background: var(--primary-50); color: var(--primary); }
.pcard .ptitle { font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--text); margin: 0 0 8px; min-height: 2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard:hover .ptitle { color: var(--primary-600); }
.pcard .pfoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.pcard .price { font-size: 14px; font-weight: 800; color: var(--text); }
.pcard .price small { font-size: 10px; font-weight: 400; color: var(--text-3); }
.pcard .price.muted { font-size: 12px; font-weight: 500; color: var(--primary); }
.pcard .addcart { flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg,var(--primary),var(--primary-600)); color: #fff; border: none; display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.pcard .addcart:hover { transform: scale(1.1); }
.pcard .addcart svg { width: 18px; height: 18px; }
.pcard .reqbtn { flex-shrink: 0; font-size: 11px; padding: 6px 10px; border-radius: 9px; background: var(--primary-50); color: var(--primary); border: none; }

/* ============================================================
   BLOG / MAGAZINE
   ============================================================ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,.05); transition: all .3s; }
.bcard:hover { box-shadow: 0 10px 22px -12px rgba(15,23,42,.2); }
.bcard .bimg { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg,var(--primary),#1e3a8a); overflow: hidden; }
.bcard .bimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.bcard:hover .bimg img { transform: scale(1.05); }
.bcard .bimg .ph { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(255,255,255,.45); }
.bcard .bimg .ph svg { width: 48px; height: 48px; }
.bcard .bbadge { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(255,255,255,.9); color: var(--primary); font-size: 11px; font-weight: 500; border-radius: 8px; padding: 3px 9px; }
.bcard .bbody { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.bcard h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard:hover h3 { color: var(--primary); }
.bcard p { font-size: 12px; color: var(--text-3); margin: 0 0 12px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard .bmeta { margin-top: auto; font-size: 11px; color: var(--text-3); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #fff; border-top: 1px solid var(--border); margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; padding-block: 40px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand span { font-size: 18px; font-weight: 800; color: var(--primary); }
.footer-col h4 { font-size: 14px; font-weight: 700; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 13px; color: var(--text-2); }
.footer-col a:hover { color: var(--primary); }
.footer-about { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.footer-bottom { border-top: 1px solid var(--border); text-align: center; padding-block: 18px; font-size: 12px; color: var(--text-3); }

/* ============================================================
   WooCommerce archive / single (light touch)
   ============================================================ */
.page-title { font-size: 22px; font-weight: 700; margin: 24px 0 16px; }
.wc-empty { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 48px; text-align: center; color: var(--text-3); }
.woocommerce-breadcrumb { font-size: 12px; color: var(--text-3); margin: 16px 0; }
.woocommerce-breadcrumb a { color: var(--primary); }

/* Mobile menu drawer */
.menu-toggle { display: none; }
.mobile-only { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
	.cat-row { grid-template-columns: repeat(8, 1fr); }
	.product-grid { grid-template-columns: repeat(4, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
	.slider { height: 200px; }
	.cat-row { grid-template-columns: repeat(4, 1fr); }
	.product-grid { grid-template-columns: repeat(2, 1fr); }
	.blog-grid { grid-template-columns: 1fr; }
	.header-nav, .header-search.desktop { display: none; }
	.menu-toggle { display: flex; }
	.footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   WooCommerce pages (single product, shop archive, cart, checkout)
   ============================================================ */
.woo-wrap { padding-block: 24px; }
.card-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.05); padding: 24px 28px; }

/* Brand buttons across WooCommerce */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce .button.alt,
.woocommerce .single_add_to_cart_button, .wc-block-components-button.contained {
	background: var(--primary) !important; color: #fff !important; border: none !important;
	border-radius: var(--radius-sm) !important; font-weight: 700 !important; font-family: inherit !important;
	padding: 12px 22px !important; transition: background .15s ease !important; box-shadow: none !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce .button.alt:hover, .woocommerce .single_add_to_cart_button:hover,
.wc-block-components-button.contained:hover { background: var(--primary-600) !important; }

/* ── Single product ───────────────────────────────────────── */
.single-product .woo-wrap { max-width: 1100px; }
.single-product div.product {
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
	box-shadow: 0 1px 3px rgba(15,23,42,.05); padding: 28px; display: flex; flex-wrap: wrap; gap: 32px;
}
.single-product div.product .woocommerce-product-gallery { width: 46% !important; margin: 0 !important; float: none !important; }
.single-product div.product .summary { width: calc(54% - 32px) !important; margin: 0 !important; float: none !important; }
.single-product .product_title { font-size: 22px; font-weight: 800; line-height: 1.8; margin: 0 0 14px; color: var(--text); }
.single-product .summary .price,
.single-product .summary .price ins { color: var(--success) !important; font-weight: 800; font-size: 22px; }
.single-product .summary .price del { color: var(--text-3); font-weight: 400; font-size: 15px; }
.single-product .woocommerce-product-details__short-description { color: var(--text-2); line-height: 2; font-size: 13px; margin-bottom: 16px; }
.single-product form.cart { margin: 18px 0 !important; display: flex; gap: 12px; align-items: center; }
.single-product .quantity input { height: 46px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); width: 72px; text-align: center; }
.single-product .single_add_to_cart_button { height: 46px; font-size: 15px !important; }
.single-product .product_meta { font-size: 12px; color: var(--text-3); margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.single-product .woocommerce-tabs { width: 100%; margin-top: 8px; }
.single-product .woocommerce-tabs ul.tabs { list-style: none; display: flex; gap: 8px; padding: 0; border-bottom: 1px solid var(--border-2); margin: 0 0 16px; }
.single-product .woocommerce-tabs ul.tabs li { background: transparent; border: none; }
.single-product .woocommerce-tabs ul.tabs li a { color: var(--text-2); font-weight: 600; padding: 8px 14px; display: inline-block; }
.single-product .woocommerce-tabs ul.tabs li.active a { color: var(--primary); border-bottom: 2px solid var(--primary); }
.single-product table.shop_attributes th { color: var(--text-2); }
.single-product .related.products { width: 100%; }
.single-product .related.products > h2 { font-size: 18px; font-weight: 700; margin: 8px 0 16px; }

/* ── Shop / category archive grid (uses our .pcard inside li.product) ──────── */
.woocommerce ul.products, .woocommerce-page ul.products {
	display: grid !important; grid-template-columns: repeat(5, 1fr); gap: 12px;
	margin: 0 0 24px !important; padding: 0 !important; list-style: none !important;
}
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
	width: auto !important; margin: 0 !important; float: none !important; padding: 0 !important;
}
.woocommerce ul.products li.product::before { display: none; }
.woocommerce-result-count { color: var(--text-3); font-size: 13px; }
.woocommerce .woocommerce-ordering select { border: 1px solid var(--border-2); border-radius: 10px; padding: 8px; font-family: inherit; }
.woocommerce nav.woocommerce-pagination ul { border: none; gap: 6px; display: flex; justify-content: center; }
.woocommerce nav.woocommerce-pagination ul li { border: none; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span {
	border: 1px solid var(--border-2); border-radius: 10px; background: #fff; color: var(--text-2); padding: 8px 14px;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Cart / Checkout (block-based) ─────────────────────────── */
.wc-page-content { padding-bottom: 24px; }
.wp-block-woocommerce-cart .wc-block-cart-items,
.wp-block-woocommerce-cart .wc-block-cart__sidebar > .wc-block-components-totals-wrapper,
.wp-block-woocommerce-cart .wp-block-woocommerce-cart-order-summary-block,
.wc-block-checkout__main, .wc-block-checkout__sidebar {
	background: #fff !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important;
	box-shadow: 0 1px 3px rgba(15,23,42,.05) !important; padding: 20px 24px !important;
}
.woocommerce-cart .cart_totals, .woocommerce-checkout #order_review, .woocommerce-checkout #customer_details {
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
.wc-block-components-text-input input, .woocommerce form .input-text, .woocommerce form select {
	border-radius: 10px !important; border-color: var(--border-2) !important;
}

/* ── Features strip ────────────────────────────────────────── */
.features { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.05); padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { display: flex; align-items: center; gap: 14px; justify-content: center; }
.feature .fic { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.feature .fic svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--text); }
.feature p { margin: 0; font-size: 12px; color: var(--text-3); }
@media (max-width: 768px) { .features { grid-template-columns: 1fr; gap: 16px; } }

/* ============================================================
   Single product — Digi-style layout (.d4u-single)
   ============================================================ */
.single-product div.product.d4u-single { display: block !important; background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; }

/* 3-column top: gallery (right) | info (middle) | buybox (left) */
.d4u-top { display: grid; grid-template-columns: 360px 1fr 340px; gap: 20px; align-items: start; }
.d4u-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.05); padding: 18px; }

/* Gallery (right) */
.d4u-col-gallery { order: 1; position: sticky; top: 88px; }
.d4u-gallery-card { padding: 18px; }
.d4u-gal-main { width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.d4u-gal-main img { max-width: 92%; max-height: 92%; width: auto; height: auto; object-fit: contain; }
.d4u-gal-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.d4u-gal-thumb { width: 60px; height: 60px; padding: 5px; border: 1.5px solid var(--border-2); border-radius: 12px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: border-color .15s; }
.d4u-gal-thumb:hover { border-color: var(--primary); }
.d4u-gal-thumb.is-active { border-color: var(--primary); }
.d4u-gal-thumb img { width: 100%; height: 100%; object-fit: contain; }
.d4u-gal-more { width: 60px; height: 60px; border: 1.5px solid var(--border-2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--bg-page); }
.d4u-gallery-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.d4u-ga { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: #fff; border: 1px solid var(--border-2); color: var(--text-2); font-size: 13px; font-family: inherit; font-weight: 600; cursor: pointer; padding: 12px 10px; border-radius: 12px; transition: all .15s; }
.d4u-ga:hover { border-color: var(--primary); color: var(--primary); }
.d4u-ga svg { width: 18px; height: 18px; }
.d4u-ga.is-on { border-color: var(--danger, #dc2626); color: var(--danger, #dc2626); }
.d4u-ga.is-on svg { fill: currentColor; }

/* Info (middle) — stack of cards */
.d4u-col-info { order: 2; display: flex; flex-direction: column; gap: 16px; }
.d4u-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.d4u-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
.d4u-pill .d4u-dot { width: 7px; height: 7px; border-radius: 50%; }
.d4u-pill-soft { background: var(--primary-50); color: var(--primary); }
.d4u-title { font-size: 20px; font-weight: 800; line-height: 1.85; color: var(--text); margin: 0 0 6px; }
.d4u-subtitle { font-size: 13px; color: var(--text-3); font-family: monospace; }

/* Rating card */
.d4u-rating-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d4u-rating { display: flex; align-items: center; gap: 8px; }
.d4u-rating-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.d4u-rating-num { font-size: 12px; color: var(--text-3); }
.d4u-rating-empty { color: var(--text-3); }
.d4u-reviews-link { font-size: 12px; color: var(--primary); font-weight: 600; }
.d4u-stars { display: inline-block; width: 88px; height: 16px; background: linear-gradient(90deg, #f5a623 var(--rate, 0%), #e2e8f0 var(--rate, 0%)); -webkit-mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px); mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px); }

/* Color picker */
.d4u-colors { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.d4u-detail-card .d4u-colors:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.d4u-colors-label { display: flex; flex-direction: column; gap: 2px; }
.d4u-colors-label span { font-size: 12px; color: var(--text-3); }
.d4u-colors-label b { font-size: 14px; color: var(--text); }
.d4u-color-list { display: flex; flex-wrap: wrap; gap: 8px; }
.d4u-color { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid var(--border-2); border-radius: 10px; padding: 6px 12px 6px 8px; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; font-family: inherit; }
.d4u-color.is-active { border-color: var(--primary); color: var(--primary); }
.d4u-color-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }

/* Key specs */
.d4u-keyspecs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.d4u-keyspecs-head span { font-size: 14px; font-weight: 700; color: var(--text); }
.d4u-keyspecs-head a { font-size: 12px; color: var(--primary); font-weight: 600; }
.d4u-keyspecs-list { list-style: none; margin: 0; padding: 0; }
.d4u-keyspecs-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 13px; }
.d4u-keyspecs-list li + li { border-top: 1px dashed var(--border); }
.d4u-ks-label { color: var(--text-3); flex-shrink: 0; }
.d4u-ks-value { color: var(--text); font-weight: 600; text-align: left; }

/* Buy box (left) */
.d4u-col-buy { order: 3; position: sticky; top: 88px; }
.d4u-buybox { display: flex; flex-direction: column; gap: 0; }
.d4u-seller { border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 14px; }
.d4u-seller-meta { min-width: 0; }
.d4u-seller-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.d4u-seller-top svg { width: 26px; height: 26px; color: var(--primary); flex-shrink: 0; }
.d4u-seller-name { font-size: 13px; font-weight: 700; color: var(--text); }
.d4u-seller-sub { font-size: 11px; color: var(--text-3); }
.d4u-seller-line { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); padding: 4px 0; }
.d4u-seller-line svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }
.d4u-price-block { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.d4u-discount { display: inline-flex; align-items: center; gap: 3px; background: #fff; border: 1px solid var(--primary); color: var(--primary); font-size: 12px; font-weight: 700; border-radius: 8px; padding: 4px 8px; flex-shrink: 0; }
.d4u-discount svg { width: 13px; height: 13px; }
.d4u-price-wrap { display: flex; flex-direction: column; }
.d4u-price-label { font-size: 11px; color: var(--text-3); }
.d4u-price, .d4u-price .price { font-size: 22px !important; font-weight: 800 !important; color: var(--text) !important; }
.d4u-price del { color: var(--text-3); font-size: 13px; font-weight: 400; }
.d4u-callprice { font-size: 17px; font-weight: 700; color: var(--primary); }

.d4u-single form.cart { margin: 0 !important; }
.d4u-single form.cart .quantity { display: none; }
.d4u-single form.cart .single_add_to_cart_button { width: 100%; height: 50px; font-size: 15px !important; border-radius: var(--radius-sm) !important; display: flex; align-items: center; justify-content: center; }
.d4u-req-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; font-family: inherit; cursor: pointer; }
.d4u-req-btn:hover { background: var(--primary-600); }
.d4u-buy-notes { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.d4u-buy-notes > div { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); }
.d4u-buy-notes svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }

/* Section title */
.d4u-sec-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 16px; }
.d4u-sec-title svg { width: 22px; height: 22px; color: var(--primary); }

/* Sellers strip */
.d4u-sellers { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.05); padding: 20px 24px; margin-top: 20px; }
.d4u-seller-row { display: grid; grid-template-columns: 1.2fr 1.6fr 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 14px 16px; }
.d4u-seller-row-name b { display: block; font-size: 13px; color: var(--text); }
.d4u-seller-row-name span { font-size: 11px; color: var(--success); }
.d4u-seller-row-mid { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.d4u-seller-row-price { font-size: 17px; font-weight: 800; color: var(--text); }
.d4u-seller-row-price .price { font-size: 17px !important; font-weight: 800 !important; color: var(--text) !important; }
.d4u-seller-add { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: #fff !important; border-radius: var(--radius-sm); padding: 10px 22px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.d4u-seller-add:hover { background: var(--primary-600); }

/* Related */
.single-product .related.products { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.05); padding: 20px 24px; margin-top: 20px; }
.single-product .related.products > h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

/* Tabbed info section */
.d4u-info-tabs { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(15,23,42,.05); margin-top: 20px; overflow: hidden; }
.d4u-tabnav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.d4u-tab { background: transparent; border: none; border-bottom: 3px solid transparent; padding: 16px 14px; font-size: 14px; font-weight: 700; color: var(--text-3); font-family: inherit; cursor: pointer; white-space: nowrap; }
.d4u-tab:hover { color: var(--text); }
.d4u-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.d4u-tabpanes { padding: 24px; }
.d4u-pane { display: none; }
.d4u-pane.is-active { display: block; }
.d4u-pane-title { font-size: 16px; font-weight: 700; margin: 0 0 16px; color: var(--text); }
.d4u-spec-table { width: 100%; border-collapse: collapse; }
.d4u-spec-table tr { border-bottom: 1px solid var(--border); }
.d4u-spec-table tr:nth-child(even) { background: #fafbfc; }
.d4u-spec-table th { text-align: right; font-weight: 600; color: var(--text-3); font-size: 13px; padding: 13px 16px; width: 220px; vertical-align: top; }
.d4u-spec-table td { color: var(--text); font-size: 13px; padding: 13px 16px; line-height: 1.9; }
.d4u-desc-content { font-size: 14px; line-height: 2.1; color: var(--text-2); }
.d4u-desc-content h2, .d4u-desc-content h3 { color: var(--text); font-weight: 700; margin: 18px 0 10px; }
.d4u-empty { color: var(--text-3); font-size: 14px; text-align: center; padding: 30px 0; }

/* Toast */
.d4u-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13px; font-weight: 600; z-index: 9999; opacity: 0; transition: .25s; pointer-events: none; }
.d4u-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1080px) {
	.d4u-top { grid-template-columns: 1fr; }
	.d4u-col-gallery { order: 1; position: static; width: 100%; max-width: 460px; margin-inline: auto; }
	.d4u-col-buy { order: 2; position: static; }
	.d4u-col-info { order: 3; }
}
@media (max-width: 768px) {
	.d4u-spec-table th { width: 130px; }
}
