/* =====================================================================
   CarParts — Premium custom Product page (cp-pdp)
   Styles OUR own markup (product-template.php). Scoped to .carparts-product-page.
   Brand #eb2500 appears only on price, Add-to-Cart, discount + small accents.
   No web fonts, no images, inline SVG icons → fast.
   ===================================================================== */

body.carparts-product-page {
	--cp-ink:#14181f; --cp-body:#3a4250; --cp-muted:#6b7280;
	--cp-line:#ECEEF2; --cp-surface:#fff; --cp-soft:#f7f8fa;
	--cp-brand:#eb2500; --cp-brand-d:#c91f00; --cp-amber:#f5a623;
	--cp-r:14px; --cp-r-s:10px;
	--cp-sh:0 1px 2px rgba(20,24,31,.05);
	--cp-sh-l:0 10px 30px rgba(20,24,31,.07);
}

/* hide the theme's own product-page chrome that may leak around our template */
body.carparts-product-page .cz-sticky-add-to-cart,
body.carparts-product-page .codevz-product-live { display:none !important; }

/* KILL the theme's stock-photo hero banner — keep only a clean compact breadcrumb */
body.carparts-product-page .page_cover {
	background:transparent !important; background-image:none !important;
	min-height:0 !important; height:auto !important; padding:0 !important;
	margin:0 !important; box-shadow:none !important; border:0 !important;
}
body.carparts-product-page .page_cover::before,
body.carparts-product-page .page_cover::after { content:none !important; display:none !important; background:none !important; }
body.carparts-product-page .page_cover .codevz-section-title { display:none !important; }
body.carparts-product-page .page_cover .page_title,
body.carparts-product-page .page_cover .row,
body.carparts-product-page .page_cover [data-title-parallax] {
	background:transparent !important; background-image:none !important;
	padding-top:0 !important; padding-bottom:0 !important; min-height:0 !important; height:auto !important;
}
/* the theme's own breadcrumb duplicates our .cp-pdp__crumbs nav below (and
   wraps badly since its container is narrower than the page) — hide it */
body.carparts-product-page .page_cover .breadcrumbs_container { display:none !important; }

/* keep the scroll-to-top arrow clearly ABOVE the sticky add-to-cart bar */
body.carparts-product-page .backtotop { z-index:9992 !important; bottom:90px !important; }

.cp-pdp { background:var(--cp-soft); padding:0 0 56px; color:var(--cp-body); }
.cp-pdp *, .cp-pdp *::before, .cp-pdp *::after { box-sizing:border-box; }
.cp-pdp__wrap { max-width:1240px; margin:0 auto; padding:0 20px; }

/* breadcrumb */
.cp-pdp__crumbs { display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:13.5px; color:var(--cp-muted); padding:22px 2px 18px; }
.cp-pdp__crumbs a { color:var(--cp-muted); text-decoration:none; transition:color .15s; }
.cp-pdp__crumbs a:hover { color:var(--cp-brand); }

/* ===== layout grid: gallery / details / buybox ===== */
.cp-pdp__grid { display:grid; grid-template-columns:1.25fr 1.25fr .95fr; gap:24px; align-items:start; }
.cp-pdp__reading { min-width:0; }
.cp-pdp__reading > .cp-pdp__tabs { margin-top:0; }
@media (min-width:1025px) {
    .cp-pdp__grid { grid-template-rows:auto 1fr; }
    .cp-pdp__buybox { grid-column:3; grid-row:1 / span 2; }
    .cp-pdp__reading { grid-column:1 / span 2; grid-row:2; }
}
@media (max-width:1024px) {
    .cp-pdp__reading { order:4; width:100%; max-width:640px; margin-inline:auto; }
}

/* ===== gallery ===== */
.cp-pdp__gallery { background:var(--cp-surface); border:1px solid var(--cp-line); border-radius:var(--cp-r); padding:16px; box-shadow:var(--cp-sh); }
.cp-pdp__stage { position:relative; border-radius:var(--cp-r-s); overflow:hidden; }
.cp-pdp__stage-link { display:block; }
.cp-pdp__stage img { display:block; width:100%; height:auto; aspect-ratio:1/1; object-fit:contain; transition:transform .12s ease-out; }
.cp-pdp__stage.is-zoomable { cursor:zoom-in; }
.cp-pdp__off { position:absolute; top:12px; inset-inline-start:12px; z-index:2; background:var(--cp-brand); color:#fff; font-weight:700; font-size:12.5px; padding:5px 11px; border-radius:999px; box-shadow:0 4px 12px rgba(235,37,0,.28); }
.cp-pdp__thumbs { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }
.cp-pdp__thumb { width:66px; height:66px; padding:0; border:1px solid var(--cp-line); border-radius:10px; background:#fff; cursor:pointer; overflow:hidden; transition:border-color .15s, transform .15s; }
.cp-pdp__thumb img { width:100%; height:100%; object-fit:contain; }
.cp-pdp__thumb:hover { transform:translateY(-2px); }
.cp-pdp__thumb.is-active { border-color:var(--cp-brand); box-shadow:0 0 0 1px var(--cp-brand) inset; }

/* ===== details ===== */
.cp-pdp__info { padding-top:4px; }
.cp-pdp__info .cp-spec-heading { margin:0; font-size:18px; line-height:1.5; color:var(--cp-ink); }
.cp-pdp__info .cp-pdp__specs { margin-top:10px; }
.cp-fit-help { display:flex; align-items:center; gap:9px; min-height:44px; margin-top:16px; padding:8px 12px; border-radius:9px; background:#eef1f4; color:var(--cp-ink); font-size:13px; font-weight:600; text-decoration:none; }
.cp-fit-help .cp-pd-ic { width:17px; height:17px; flex:none; }
.cp-fit-help span:last-child { margin-inline-start:auto; }
.cp-fit-help:hover { background:#e5eaef; }
.cp-pdp :is(a,button,summary):focus-visible { outline:2px solid #344f80; outline-offset:2px; }
.cp-pdp__title { color:var(--cp-ink); font-weight:700; font-size:25px; line-height:1.7; margin:0 0 14px; }
.cp-pdp__rating { display:flex; align-items:center; gap:8px; margin:0 0 16px; font-size:13.5px; color:var(--cp-muted); }
.cp-pdp__stars { position:relative; display:inline-flex; line-height:0; }
.cp-pdp__stars-base, .cp-pdp__stars-fill { display:inline-flex; }
.cp-pdp__stars-base .cp-pd-ic { width:17px; height:17px; stroke:#d7dbe0; fill:none; }
.cp-pdp__stars-fill { position:absolute; inset-inline-start:0; top:0; overflow:hidden; white-space:nowrap; }
.cp-pdp__stars-fill .cp-pd-ic { width:17px; height:17px; stroke:var(--cp-amber); fill:var(--cp-amber); }
.cp-pdp__rnum { font-weight:700; color:var(--cp-ink); }
.cp-pdp__rcount { color:var(--cp-muted); text-decoration:none; }
.cp-pdp__rcount:hover { color:var(--cp-brand); }
/* right-aligned, not justified (justify stretches word gaps on narrow phones);
   text-wrap:balance evens the line lengths so the ragged left edge stays small */
.cp-pdp__short { color:var(--cp-body); font-size:15.5px; line-height:1.95; padding:16px 0; border-top:1px solid var(--cp-line); border-bottom:1px solid var(--cp-line); text-align:right; }
/* balance only on phones: on the wide desktop column it shortens every line
   and creates a big empty left field — desktop keeps natural wrapping */
@media (max-width:768px){ .cp-pdp__short, .cp-pdp__short p { text-wrap:balance; } }
.cp-pdp__short ul { padding-inline-start:18px; margin:6px 0; }
.cp-pdp__specs { list-style:none; margin:18px 0 0; padding:0; }
.cp-pdp__specs li { display:flex; justify-content:space-between; gap:12px; padding:11px 2px; border-bottom:1px dashed var(--cp-line); font-size:14.5px; }
.cp-pdp__specs li:last-child { border-bottom:0; }
.cp-pdp__spec-k { color:var(--cp-muted); }
.cp-pdp__spec-v { color:var(--cp-ink); font-weight:600; }

/* ===== buy box ===== */
.cp-pdp__buybox { background:var(--cp-surface); border:1px solid var(--cp-line); border-radius:var(--cp-r); padding:20px; box-shadow:var(--cp-sh); }
@media (min-width:1025px){ .cp-pdp__buybox { position:sticky; top:150px; } }
.cp-pdp__seller { display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--cp-muted); padding-bottom:16px; border-bottom:1px solid var(--cp-line); margin-bottom:16px; }
.cp-pdp__seller strong { color:var(--cp-ink); font-weight:700; }
.cp-pdp__seller .cp-pd-ic { width:20px; height:20px; color:var(--cp-brand); }

/* price — ink, not brand red: inside the buybox the red belongs to the CTA
   alone; a red price next to a red button competes with it. Discount badge
   keeps the red accent. */
.cp-pdp__price { margin:0 0 16px; line-height:1.4; }
.cp-pdp__price .woocommerce-Price-amount bdi,
.cp-stickybar__price .woocommerce-Price-amount bdi {
    display:inline-flex;
    flex-direction:row;
    direction:rtl;
    align-items:baseline;
    white-space:nowrap;
}
.cp-pdp__price .price, .cp-pdp__price ins { text-decoration:none; }
.cp-pdp__price .woocommerce-Price-amount { color:var(--cp-ink); font-weight:800; font-size:28px; }
.cp-pdp__price ins .woocommerce-Price-amount { color:var(--cp-ink); }
.cp-pdp__price .woocommerce-Price-currencySymbol { font-size:.6em; font-weight:600; color:var(--cp-muted); margin-inline-start:4px; }
.cp-pdp__price del { display:inline-block; margin-inline-start:10px; }
.cp-pdp__price del .woocommerce-Price-amount { color:var(--cp-muted); font-weight:500; font-size:17px; }
/* the struck-through old price doesn't need its own «تومان» — less clutter */
.cp-pdp__price del .woocommerce-Price-currencySymbol { display:none; }
/* A compact vector تومان for the buy box and sticky purchase bar.
   The WooCommerce text stays available if CSS masks are unsupported. */
@supports ((-webkit-mask-image: linear-gradient(#000, #000)) or (mask-image: linear-gradient(#000, #000))) {
    .cp-pdp__price .woocommerce-Price-amount,
    .cp-pdp__price .woocommerce-Price-amount bdi,
    .cp-stickybar__price .woocommerce-Price-amount,
    .cp-stickybar__price .woocommerce-Price-amount bdi {
        white-space: nowrap !important;
    }
    .cp-pdp__price .woocommerce-Price-currencySymbol,
    .cp-stickybar__price .woocommerce-Price-currencySymbol {
        --cp-toman-word: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA1NCAyNyc+PGcgZmlsbD0nbm9uZScgc3Ryb2tlPSdibGFjaycgc3Ryb2tlLXdpZHRoPScxLjY1JyBzdHJva2UtbGluZWNhcD0ncm91bmQnIHN0cm9rZS1saW5lam9pbj0ncm91bmQnPjxwYXRoIGQ9J00zLjIgOS43IEMyLjQgMTEuNSAyLjEgMTMuMSAyLjEgMTQuOCBDMi4xIDE4LjcgMy44IDIwLjkgNy4zIDIwLjkgTDEwLjIgMjAuOSBDMTMuNyAyMC45IDE1LjIgMTkuMSAxNS4yIDE1LjcgTDE1LjIgNS45IEMxNS4yIDQuMSAxNiAzIDE3LjUgMyBDMTkgMyAxOS44IDQuMSAxOS44IDUuOSBMMTkuOCAxNC42IEMxOS44IDE2LjggMjAuOCAxNy43IDIyLjggMTcuNyBMMjMuOSAxNy43IEMyNS43IDE3LjcgMjYuMiAxNi45IDI2LjUgMTUgQzI3IDExLjUgMjguNCA5LjUgMzAuNyA5LjUgQzMzLjEgOS41IDM0LjQgMTEuNSAzNC40IDE0LjMgQzM0LjQgMTYuOSAzMy41IDE4LjQgMzEuNyAxOC40IEMzMC4zIDE4LjQgMjguNyAxNy44IDI3LjQgMTcuNCBMMjUuNSAxNycvPjxwYXRoIGQ9J000OS43IDEwIEM1MC4zIDEyLjQgNTAuNiAxNC43IDQ5LjQgMTYuMyBDNDguNiAxNy40IDQ3LjMgMTcuNiA0NS42IDE3LjYgTDM5LjYgMTcuNiBDMzYuOCAxNy42IDM1LjcgMTYuMSAzNS43IDEzLjggQzM1LjcgMTEuMSAzNy4xIDkuNCAzOS4zIDkuNCBDNDEuOCA5LjQgNDMuMSAxMS4yIDQzLjEgMTQgTDQzLjEgMTguNSBDNDMuMSAyMi40IDQxLjMgMjMuOSAzNy45IDIzLjkgTDM1LjcgMjMuOScvPjxwYXRoIGQ9J000NCA1LjcgTDQ4IDUuNycvPjwvZz48Y2lyY2xlIGN4PSc5LjEnIGN5PSc5LjMnIHI9Jy45NScvPjwvc3ZnPg==");
        font-size: 0 !important;
        line-height: 0 !important;
        margin-inline-start: 4px;
    }
    .cp-pdp__price .woocommerce-Price-currencySymbol::after,
    .cp-stickybar__price .woocommerce-Price-currencySymbol::after {
        content: "";
        display: inline-block;
        width: 27px;
        height: 14px;
        vertical-align: -2px;
        background-color: currentColor;
        -webkit-mask-image: var(--cp-toman-word);
        mask-image: var(--cp-toman-word);
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: contain;
        mask-size: contain;
    }
    .cp-stickybar__price .woocommerce-Price-currencySymbol::after {
        width: 23px;
        height: 12px;
        vertical-align: -1px;
    }
}

/* add-to-cart form */
.cp-pdp__cart form.cart { display:flex; align-items:stretch; gap:10px; flex-wrap:wrap; margin:0; }
.cp-pdp__cart .quantity { display:inline-flex !important; align-items:stretch; width:auto !important; flex:0 0 auto; border:1px solid var(--cp-line); border-radius:var(--cp-r-s); overflow:hidden; height:52px; background:#fff; }
.cp-pdp__cart .quantity .qty { width:58px !important; height:50px !important; border:0 !important; text-align:center; font-weight:700; font-size:16px; color:var(--cp-ink) !important; background:transparent !important; box-shadow:none !important; -moz-appearance:textfield; }
.cp-pdp__cart .quantity .qty::-webkit-outer-spin-button,
.cp-pdp__cart .quantity .qty::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.cp-pdp__cart .quantity .quantity-up, .cp-pdp__cart .quantity .quantity-down { width:42px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--cp-ink); font-size:18px; border-inline:1px solid var(--cp-line); }
.cp-pdp__cart .quantity .quantity-up:hover, .cp-pdp__cart .quantity .quantity-down:hover { background:var(--cp-soft); color:var(--cp-brand); }
/* guarantee capsule (right) + quantity stepper (left) share one filled row;
   the CTA gets its own full-width line below — no half-empty strips */
.cp-pdp__cart form.cart { flex-direction:column; align-items:stretch; gap:12px; }
.cp-pdp__cart .cp-qty-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }

/* The label used to be screen-reader-only because the guarantee capsule sat in this
   row and filled it. With the capsule moved up under the price, space-between left the
   stepper floating alone against the far edge with a hand-width of nothing beside it —
   so the label becomes visible and does the job the capsule was accidentally doing. */
.cp-pdp__cart .cp-qty-row__label { position:static; width:auto; height:auto; clip:auto; overflow:visible; white-space:nowrap; font-size:13.5px; font-weight:700; color:#5b6472; }
.cp-pdp__cart .single_add_to_cart_button.button { flex:0 0 auto !important; width:100%; }
.cp-pdp__cart .cp-qty { display:inline-flex; align-items:center; flex:0 0 auto; height:52px; padding:4px; gap:2px; background:var(--cp-soft); border:1px solid var(--cp-line); border-radius:var(--cp-r-s); }
.cp-pdp__cart .cp-qty__btn { width:32px !important; height:42px !important; padding:0 !important; border:0 !important; border-radius:8px; background:transparent !important; font-size:20px; font-weight:600; line-height:1; color:var(--cp-ink) !important; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .15s, color .15s, box-shadow .15s; }
.cp-pdp__cart .cp-qty__btn:hover { background:#fff !important; color:var(--cp-brand) !important; box-shadow:0 1px 4px rgba(20,24,31,.10); }
.cp-pdp__cart .cp-qty__input { width:32px !important; height:40px; padding:0 !important; border:0 !important; text-align:center; font-weight:700; font-size:16px; color:var(--cp-ink) !important; background:transparent !important; box-shadow:none !important; -moz-appearance:textfield; }
.cp-pdp__cart .cp-qty__input::-webkit-outer-spin-button, .cp-pdp__cart .cp-qty__input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.cp-pdp__cart .single_add_to_cart_button.button {
	flex:1 1 160px; min-height:52px; background:var(--cp-brand) !important; color:#fff !important;
	border:0 !important; border-radius:var(--cp-r-s) !important; font-weight:700; font-size:16.5px;
	box-shadow:0 6px 18px rgba(235,37,0,.22); transition:background .2s, transform .15s, box-shadow .2s; cursor:pointer;
}
.cp-pdp__cart .single_add_to_cart_button.button:hover { background:var(--cp-brand-d) !important; transform:translateY(-1px); box-shadow:0 10px 24px rgba(235,37,0,.28); }
.cp-pdp__cart .single_add_to_cart_button.button:active { transform:translateY(0); }
.cp-pdp__cart .snapppay-widget,
.cp-pdp__cart .torobpay-widget {
	width:100% !important;
	min-height:0 !important;
	margin:10px 0 0 !important;
	padding:10px 12px !important;
	gap:10px !important;
	border-radius:14px !important;
	box-sizing:border-box;
	font-family:inherit !important;
}
.cp-pdp__cart .snapppay-widget-image,
.cp-pdp__cart .torobpay-widget-image {
	width:42px !important;
	height:42px !important;
	flex:0 0 42px;
	object-fit:contain;
	border-radius:12px !important;
}
.cp-pdp__cart .torobpay-widget-media {
	width:42px;
	height:42px;
	flex:0 0 42px;
}
.cp-pdp__cart .snapppay-widget-content,
.cp-pdp__cart .torobpay-widget-content,
.cp-pdp__cart .snapppay-widget-title,
.cp-pdp__cart .torobpay-widget-title,
.cp-pdp__cart .snapppay-widget-description,
.cp-pdp__cart .torobpay-widget-description {
	font-family:inherit !important;
}
.cp-pdp__cart .snapppay-widget-title,
.cp-pdp__cart .torobpay-widget-title {
	font-size:13px !important;
	font-weight:700 !important;
	line-height:1.6 !important;
	margin:0 0 1px !important;
}
/* Keep the installment amount and currency in the same visual order as the product price. */
.cp-pdp__cart .snapppay-widget-title .woocommerce-Price-amount bdi,
.cp-pdp__cart .torobpay-widget-title .woocommerce-Price-amount bdi {
	display:inline-flex;
	flex-direction:row;
	direction:rtl;
	align-items:baseline;
	white-space:nowrap;
}
.cp-pdp__cart .snapppay-widget-description,
.cp-pdp__cart .torobpay-widget-description {
	font-size:11px !important;
	font-weight:400 !important;
	line-height:1.6 !important;
	letter-spacing:0 !important;
}
.cp-pdp__cart .xtra-product-icons { display:none; } /* hide theme wishlist/compare inside our buy box for a clean look */

/* assurances inside buy box */
.cp-buy-summary { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; padding:16px; border:1px solid #e2e6ea; border-radius:14px; background:linear-gradient(145deg,#fff,#f7f8fa); }
.cp-buy-summary .cp-buy-price-label { color:#515b68; font-size:12px; font-weight:600; }
.cp-buy-summary .cp-pdp__price { min-width:0; margin:0; text-align:start; }
.cp-buy-summary .cp-pdp__price del { display:block; margin:0; }
.cp-buy-summary .cp-guarantee--pdp { display:flex; flex:1 0 100%; align-items:center; justify-content:flex-start; gap:7px; white-space:normal; box-sizing:border-box; margin:3px 0 0; padding:10px 0 0; border:0; border-top:1px solid #dfe5e8; border-radius:0; box-shadow:none; background:none; color:#236349; font-size:13px; }
.cp-buy-summary .cp-guarantee--pdp svg { flex:none; width:18px; height:18px; }
.cp-pdp__buybox .cp-qty-row { padding:14px 0 0; }
.cp-pdp__buybox .cp-qty-row__label { margin:0; color:var(--cp-ink); font-size:13px; }
.cp-pdp__buybox .cp-qty { height:auto; padding:2px; gap:0; background:#f5f6f8; border-color:#dce1e7; border-radius:12px; }
.cp-pdp__buybox .cp-qty__btn { width:38px !important; height:40px !important; border-radius:9px; }
.cp-pdp__buybox .cp-qty__input { height:34px; border-radius:7px; background:white !important; }
.cp-pdp__buybox .cp-qty :focus-visible { outline:2px solid var(--cp-brand); outline-offset:-2px; }
.cp-pdp__buybox .single_add_to_cart_button.button { box-shadow:none; }
.cp-installments { margin-top:18px; padding:14px; background:#f6f8fa; border-radius:14px; color:var(--cp-ink); }
.cp-installments__heading { display:block; font-size:15px; line-height:1.5; }
.cp-installments ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 8px; padding:0; margin:10px 0; list-style:none; }
.cp-installments li { display:flex; align-items:center; gap:7px; min-width:0; margin:0; padding:5px 0; font-size:13px; font-weight:600; }
.cp-installments li::before { display:none; }
.cp-installments img { width:22px; height:22px; object-fit:contain; flex:none; }
.cp-installments small { display:block; color:#596372; font-size:11px; line-height:1.8; }
.cp-installments details { margin-top:10px; padding-top:8px; border-top:1px solid #dce1e7; }
.cp-installments summary { cursor:pointer; color:var(--cp-ink); font-size:13px; font-weight:700; }
.cp-installments details > div { max-width:100%; box-sizing:border-box; }
.cp-pdp__assure { list-style:none; margin:18px 0 0; padding:16px 0 0; border-top:1px solid var(--cp-line); display:flex; flex-direction:column; gap:13px; }
.cp-pdp__assure li { display:flex; align-items:center; gap:10px; font-size:13.5px; color:var(--cp-body); font-weight:600; }
.cp-pdp__assure .cp-pd-ic { width:20px; height:20px; color:var(--cp-ink); flex:0 0 auto; }
.cp-pdp__assure li.cp-pdp__assure-free { color:#1d8a4e; }
.cp-pdp__assure li.cp-pdp__assure-free > span { font-weight:800; }
.cp-pdp__assure li.cp-pdp__assure-free .cp-pd-ic { color:#1d8a4e; }
.cp-pdp__assure-hint { display:block; font-size:11px; font-weight:500; color:#8a8f98; margin-top:2px; }

/* ===== tabs (WooCommerce markup, forced horizontal + light) ===== */
.cp-pdp__tabs { margin-top:24px; }
/* the theme's customizer sets a global `.woocommerce-tabs.wc-tabs-wrapper{margin-top:40px}`
   directly on the inner box; since .cp-pdp__tabs itself has no border/padding, that
   child margin collapses with (and wins over, being larger than) our wrapper's
   margin-top above — the actual source of the gap being bigger than the strip's.
   Zero it out so our own wrapper margin is the only one that counts. */
.cp-pdp__tabs .woocommerce-tabs { margin-top:0 !important; }
.cp-pdp__tabs .woocommerce-tabs { display:block !important; background:var(--cp-surface); border:1px solid var(--cp-line); border-radius:var(--cp-r); box-shadow:var(--cp-sh); overflow:hidden; }
.cp-pdp__tabs ul.tabs { display:flex !important; flex-wrap:wrap; justify-content:space-between; gap:4px; list-style:none; margin:0 !important; padding:8px 8px 0 !important; border-bottom:1px solid var(--cp-line) !important; background:transparent !important; float:none !important; width:auto !important; }
.cp-pdp__tabs ul.tabs::before, .cp-pdp__tabs ul.tabs::after { display:none !important; }
.cp-pdp__tabs ul.tabs li { float:none !important; width:auto !important; background:transparent !important; border:0 !important; margin:0 !important; padding:0 !important; border-radius:8px 8px 0 0; }
.cp-pdp__tabs ul.tabs li::before, .cp-pdp__tabs ul.tabs li::after { display:none !important; }
.cp-pdp__tabs ul.tabs li a { display:block; padding:12px 18px !important; color:var(--cp-body) !important; font-weight:600; font-size:14.5px; border-bottom:2px solid transparent; transition:color .15s, border-color .15s; }
.cp-pdp__tabs ul.tabs li a:hover { color:var(--cp-ink) !important; }
.cp-pdp__tabs ul.tabs li.active a { color:var(--cp-brand) !important; border-bottom-color:var(--cp-brand); }
.cp-pdp__tabs .panel, .cp-pdp__tabs .woocommerce-Tabs-panel, .cp-pdp__tabs .entry-content { background:transparent !important; float:none !important; width:auto !important; padding:24px !important; margin:0 !important; }
.cp-pdp__tabs .woocommerce-Tabs-panel, .cp-pdp__tabs .woocommerce-Tabs-panel p, .cp-pdp__tabs .woocommerce-Tabs-panel li, .cp-pdp__tabs .woocommerce-Tabs-panel td { color:var(--cp-body) !important; font-size:15.5px; line-height:2; }
.cp-pdp__tabs .woocommerce-Tabs-panel h1, .cp-pdp__tabs .woocommerce-Tabs-panel h2, .cp-pdp__tabs .woocommerce-Tabs-panel h3, .cp-pdp__tabs .woocommerce-Tabs-panel strong { color:var(--cp-ink) !important; }
.cp-pdp__tabs .woocommerce-Tabs-panel a { color:var(--cp-brand) !important; }
/* readable measure: constrain long-form copy to ~70–80 chars */
.cp-pdp__tabs .woocommerce-Tabs-panel > p,
.cp-pdp__tabs .woocommerce-Tabs-panel > ul,
.cp-pdp__tabs .woocommerce-Tabs-panel > ol,
.cp-pdp__tabs .woocommerce-Tabs-panel > h2,
.cp-pdp__tabs .woocommerce-Tabs-panel > h3 { max-width:760px; }
/* clean spec data table */
/* the warranty note is always the description's last paragraph — dress it as
   a green callout so it reads as a trust highlight, not a ragged afterthought */
.cp-pdp__tabs .woocommerce-Tabs-panel--description > p:last-child {
	background:linear-gradient(180deg,#effbf4,#e5f8ec); border:1px solid #cdeeda;
	border-radius:var(--cp-r-s); padding:14px 16px; margin-top:22px; max-width:760px;
}
.cp-pdp__tabs table.shop_attributes { width:100%; max-width:760px; border-collapse:collapse; margin:10px 0; border:1px solid var(--cp-line); border-radius:var(--cp-r-s); overflow:hidden; }
.cp-pdp__tabs table.shop_attributes th,
.cp-pdp__tabs table.shop_attributes td { padding:13px 16px !important; border-bottom:1px solid var(--cp-line); text-align:start; font-size:14.5px; line-height:1.7; }
.cp-pdp__tabs table.shop_attributes th { color:var(--cp-muted) !important; font-weight:600; width:36%; background:var(--cp-soft); }
.cp-pdp__tabs table.shop_attributes td { color:var(--cp-ink) !important; }
.cp-pdp__tabs table.shop_attributes tr:last-child th,
.cp-pdp__tabs table.shop_attributes tr:last-child td { border-bottom:0; }

/* ===== related ===== */
/* the theme's Slick carousel is suppressed (codevz-related-slick injected in
   product-template.php) — lay the cards out as a single-row, arrow-controlled
   slide (see .cp-pdp__related-nav) instead of a tall static multi-row grid */
.cp-pdp__related-track { position:relative; }
.cp-pdp__related ul.products { display:flex !important; overflow-x:auto; scroll-snap-type:x mandatory; gap:14px; width:100% !important; margin:0 !important; padding:0 0 4px !important; scrollbar-width:none; -webkit-overflow-scrolling:touch; scroll-behavior:smooth; }
.cp-pdp__related ul.products::-webkit-scrollbar { display:none; }
.cp-pdp__related ul.products::before, .cp-pdp__related ul.products::after { display:none !important; }
.cp-pdp__related ul.products li.product { width:auto !important; min-width:0 !important; margin:0 !important; float:none !important; flex:0 0 calc((100% - 14px*3) / 4); scroll-snap-align:start; }
.cp-pdp__related-nav { display:flex; align-items:center; justify-content:center; position:absolute; top:50%; width:38px; height:38px; margin-top:-42px; border-radius:50%; background:#fff; border:1px solid var(--cp-line); box-shadow:var(--cp-sh); color:var(--cp-ink); cursor:pointer; z-index:2; transition:background .15s, color .15s, opacity .15s; }
.cp-pdp__related-nav:hover { background:var(--cp-brand); color:#fff; border-color:var(--cp-brand); }
.cp-pdp__related-nav:disabled { opacity:0; pointer-events:none; }
.cp-pdp__related-nav svg { width:18px; height:18px; }
.cp-pdp__related-prev { right:-19px; }
.cp-pdp__related-next { left:-19px; }
/* the theme's global "boxed section" style (also used for cart totals /
   checkout details) boxes .related.products in a bordered card with its own
   30px bottom margin — redundant next to our own card-based layout and the
   source of the leftover gap/border here. Neutralize it on this page only. */
.cp-pdp__related .related.products { border:0 !important; box-shadow:none !important; padding:0 !important; margin:0 !important; background:transparent !important; }
.cp-pdp__related .related.products > h2, .cp-pdp__related .products-header h2 { color:var(--cp-ink); font-size:19px; font-weight:700; margin:36px 0 18px; }

/* ===== always-available sticky add-to-cart bar (desktop + mobile, built in JS) ===== */
.cp-stickybar { --cp-sb-hide:115%; position:fixed; inset-inline:0; bottom:0; z-index:9990; background:rgba(255,255,255,.98); backdrop-filter:saturate(1.1) blur(8px); border-top:1px solid var(--cp-line); box-shadow:0 -6px 24px rgba(20,24,31,.10); transform:translateY(var(--cp-sb-hide)); transition:transform .28s ease; }
.cp-stickybar.is-visible { transform:translateY(0); }
.cp-stickybar__inner { max-width:1240px; margin:0 auto; display:flex; align-items:center; gap:16px; padding:10px 20px calc(10px + env(safe-area-inset-bottom)); }
.cp-stickybar__info { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.cp-stickybar__img { width:48px; height:48px; object-fit:contain; border:1px solid var(--cp-line); border-radius:8px; background:#fff; flex:0 0 auto; }
.cp-stickybar__title { font-weight:700; font-size:15.5px; color:var(--cp-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cp-stickybar__buy { display:flex; align-items:center; gap:14px; flex:0 0 auto; }
.cp-stickybar__price { font-weight:800; font-size:20px; color:var(--cp-ink); white-space:nowrap; }
.cp-stickybar__price del { display:none; }
.cp-stickybar__price .woocommerce-Price-currencySymbol { font-size:.6em; color:var(--cp-muted); font-weight:600; }
.cp-stickybar__btn { min-width:220px; min-height:48px; padding:0 28px; border:0; border-radius:var(--cp-r-s); background:var(--cp-brand); color:#fff; font-weight:700; font-size:16.5px; cursor:pointer; transition:background .2s, transform .15s; box-shadow:0 6px 18px rgba(235,37,0,.22); }
.cp-stickybar__btn:hover { background:var(--cp-brand-d); transform:translateY(-1px); }
@media (max-width:768px){
	/* the floating bottom-nav dock (carparts-mobile-bottom-nav) hovers 10px off
	   the screen edge and is ~61px tall — park the sticky bar just above it.
	   Hidden state must clear the raised bottom offset too, or a strip of the
	   bar stays on screen behind the nav dock. */
	.cp-stickybar { left:10px; right:10px; inset-inline:10px; width:auto; bottom:calc(79px + env(safe-area-inset-bottom)); --cp-sb-hide:calc(100% + 81px + env(safe-area-inset-bottom)); border-radius:16px; border-top:0; box-shadow:0 10px 34px rgba(20,24,31,.16); }
	.cp-stickybar__inner { padding:9px 14px; gap:12px; }
	.cp-stickybar__info { display:none; }
	.cp-stickybar__buy { flex:1; gap:10px; }
	.cp-stickybar__btn { flex:1; min-width:0; padding:0 16px; }
	.cp-stickybar__price { font-size:17px; }
}

/* ===== responsive ===== */
@media (max-width:1024px){
	.cp-pdp__grid { grid-template-columns:1fr; }
	.cp-pdp__gallery { order:1; }
	.cp-pdp__buybox { order:3; position:static; }
	.cp-pdp__info { order:2; }
	.cp-pdp__buybox, .cp-pdp__gallery { max-width:640px; margin-inline:auto; width:100%; }
	/* single-column view: description + specs floated bare on the page bg while
	   gallery/buybox sat in cards — give the info section the same card shell */
	.cp-pdp__info { background:var(--cp-surface); border:1px solid var(--cp-line); border-radius:var(--cp-r); box-shadow:var(--cp-sh); padding:18px 16px; max-width:640px; margin-inline:auto; width:100%; box-sizing:border-box; }
}
@media (max-width:768px){
	/* the theme's product hero/tabs overflow the viewport on phones — clamp it */
	html, body.carparts-product-page { overflow-x:hidden; max-width:100%; }
	.cp-pdp, .cp-pdp__wrap, .cp-pdp__grid { overflow-x:clip; max-width:100%; }
	.cp-pdp__wrap { padding:0 14px; }
	.cp-pdp__title { font-size:21px; }
	.cp-pdp__price .woocommerce-Price-amount { font-size:25px; }
	/* on mobile .cp-pdp__info is its own card (see @media max-width:1024px above)
	   with nothing directly above the short description inside it — the top
	   border reads as a stray, pointless line */
	.cp-pdp__short { border-top:0; padding-top:0; }
	.cp-pdp__tabs { margin-top:24px; }
	/* the sticky add-to-cart bar auto-hides once the footer scrolls into view
	   (product.js IntersectionObserver), so it only ever overlaps this section
	   transiently while scrolling — a small gap is enough; body's own 88px
	   bottom padding (carparts-mobile-bottom-nav.css) already clears the nav
	   dock on every page. A full static 154px here just left a dead zone
	   between the related-products carousel and whatever follows it. */
	.cp-pdp__related { margin-bottom:32px; }
	.cp-pdp__tabs, .cp-pdp__related, .cp-pdp__related .related.products { overflow-x:hidden; max-width:100%; }
	/* tighten padding/gap/font so all 4 tabs (بررسی/مشخصات/ارسال و ضمانت/نظرات)
	   fit on one row instead of the reviews tab wrapping alone to a second line */
	.cp-pdp__tabs ul.tabs { gap:2px; padding:6px 6px 0 !important; }
	.cp-pdp__tabs ul.tabs li a { padding:10px 8px !important; font-size:12.5px; }
	/* the theme collapses the attributes table to stacked full-width th/td blocks
	   with alternating grey stripes — rebuild each attribute as one clean
	   "label … value" line instead */
	.cp-pdp__tabs table.shop_attributes,
	.cp-pdp__tabs table.shop_attributes tbody { display:block !important; width:100% !important; }
	.cp-pdp__tabs table.shop_attributes tr { display:flex !important; align-items:center; justify-content:space-between; gap:12px; width:100%; border-bottom:1px solid var(--cp-line); background:none !important; }
	.cp-pdp__tabs table.shop_attributes tr:last-child { border-bottom:0; }
	.cp-pdp__tabs table.shop_attributes th,
	.cp-pdp__tabs table.shop_attributes td { display:block !important; width:auto !important; border:0 !important; background:none !important; padding:12px 14px !important; }
	.cp-pdp__tabs table.shop_attributes th { flex:0 0 auto; }
	.cp-pdp__tabs table.shop_attributes td { flex:0 1 auto; min-width:0; text-align:left !important; }
	.cp-pdp__tabs table.shop_attributes td p { margin:0 !important; }
	/* mobile: swipeable scroll-snap carousel — uniform cards + peek of the next one,
	   without the theme's broken Slick (still suppressed via codevz-related-slick) */
	.cp-pdp__related ul.products { display:flex !important; overflow-x:auto; scroll-snap-type:x mandatory; gap:10px; padding-bottom:6px !important; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
	.cp-pdp__related ul.products::-webkit-scrollbar { display:none; }
	.cp-pdp__related ul.products li.product { flex:0 0 72% !important; scroll-snap-align:center; }
	/* touch swipe already handles this on mobile — arrow buttons are desktop-only */
	.cp-pdp__related-nav { display:none !important; }
}

/* ===== a11y ===== */
.cp-pdp a:focus-visible, .cp-pdp button:focus-visible { outline:3px solid rgba(235,37,0,.35); outline-offset:2px; }
@media (prefers-reduced-motion:reduce){
	body.carparts-product-page *, .cp-stickybar { transition:none !important; animation:none !important; }
	.cp-pdp__stage:hover img { transform:none; }
}

/* ---- instalment line ----
   Shown open, not behind a disclosure: 85% of this shop's orders are paid in
   instalments, so it is the mechanism customers buy with. The monthly figure leads
   because that is the number that changes the decision. */
/* Neutral, not blue. The blue this carried was decorative — it said nothing the
   words did not — and it made a FOURTH accent family in a 380px column that already
   ran brand red, guarantee green and the timer's ink. What separates this block from
   the rest is its position (immediately under the add-to-cart button) and the weight
   of the monthly figure, neither of which needs a hue to work. The gateway logos
   below are the exception and stay in full colour: a customer reads those as other
   companies' marks, not as the shop choosing a third colour. */
.cp-pdp__instal {
	margin: 0 0 14px;
	padding: 11px 13px;
	border: 1px solid #e6e8ec;
	border-radius: 12px;
	background: #fafbfc;
}
.cp-pdp__instal-main { display: flex; align-items: center; gap: 9px; }
.cp-pdp__instal-main .cp-pd-ic { flex: 0 0 auto; width: 20px; height: 20px; color: #99a2b0; }
.cp-pdp__instal-main b { display: block; font-size: 14px; font-weight: 800; color: #16181d; line-height: 1.7; }
.cp-pdp__instal-main small { display: block; font-size: 11.5px; color: #7c8593; }
/* The provider marks are recognised faster than their names, and recognition is
   what makes the offer feel real rather than a claim the shop is making about
   itself. White chips so each logo sits on the background it was drawn for — the
   panel's own #f5f9ff would tint the ones with transparency. */
.cp-pdp__instal-gw {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #edeff3;
}
.cp-pdp__instal-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px 3px 6px;
	border: 1px solid #e6e8ec;
	border-radius: 999px;
	background: #fff;
	font-size: 11.5px;
	font-weight: 600;
	color: #5b6472;
	line-height: 1.9;
}
.cp-pdp__instal-chip img {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 5px;
	object-fit: contain;
}
