/* IT STORE Product UI v2.4.0 — scoped to body.itscpu2-active.
   Targets the real WoodMart Layout Builder / Woo Variation Swatches markup. */
body.itscpu2-active{
  --r:#e31e24;--r2:#bf171c;--ink:#171717;--mut:#6b7280;--line:#e8e8e8;--soft:#f6f6f7;
}

/* ---------- Gallery ---------- */
body.itscpu2-active .wd-single-gallery .woocommerce-product-gallery{
  background:var(--soft);border:1px solid var(--line);border-radius:16px;padding:14px;overflow:hidden;
}
body.itscpu2-active .wd-single-gallery .wd-gallery-images,
body.itscpu2-active .wd-single-gallery .woocommerce-product-gallery__wrapper img{border-radius:12px}
body.itscpu2-active .wd-gallery-thumb .wd-carousel-wrap > *{
  border:2px solid var(--line);border-radius:10px;background:#fff;overflow:hidden;opacity:1;transition:border-color .15s;
}
body.itscpu2-active .wd-gallery-thumb .wd-carousel-wrap > *:hover{border-color:var(--ink)}
body.itscpu2-active .wd-gallery-thumb .wd-thumb-active,
body.itscpu2-active .wd-gallery-thumb .wd-active,
body.itscpu2-active .wd-gallery-thumb .swiper-slide-thumb-active{border-color:var(--r)}
body.itscpu2-active .product-labels .onsale{background:var(--r);color:#fff;border-radius:6px}

/* ---------- Title / price ---------- */
body.itscpu2-active .wd-single-title .product_title{
  font-size:clamp(25px,2.4vw,34px);line-height:1.18;font-weight:750;letter-spacing:-.5px;color:var(--ink);
}

/* ---------- Short description (spec bullets) ---------- */
body.itscpu2-active .woocommerce-product-details__short-description{
  background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:14px 16px;font-size:14px;line-height:1.7;color:#4b5563;
}
body.itscpu2-active .woocommerce-product-details__short-description ul{list-style:none;margin:0;padding:0}
body.itscpu2-active .woocommerce-product-details__short-description li{padding:5px 0;border-bottom:1px dashed var(--line)}
body.itscpu2-active .woocommerce-product-details__short-description li:last-child{border-bottom:0}
body.itscpu2-active .woocommerce-product-details__short-description strong{color:var(--ink)}
body.itscpu2-active .wd-visits-count{font-size:13px;color:var(--mut)}

/* ---------- Variations (Woo Variation Swatches pills) ---------- */
body.itscpu2-active form.variations_form table.variations{border:0;margin:0 0 6px}
body.itscpu2-active form.variations_form table.variations th,
body.itscpu2-active form.variations_form table.variations td{border:0;padding:8px 0}
body.itscpu2-active form.variations_form table.variations label{font-weight:700;font-size:13px;color:var(--ink)}
body.itscpu2-active ul.variable-items-wrapper{gap:8px}
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item{
  border:1.5px solid var(--line) !important;border-radius:10px !important;background:#fff;box-shadow:none !important;
  min-width:0;padding:2px 6px;transition:border-color .15s;
}
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item:hover{border-color:var(--ink) !important}
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item.selected{
  border-color:var(--r) !important;box-shadow:0 0 0 1px var(--r) !important;
}
body.itscpu2-active ul.variable-items-wrapper li.variable-item.selected .variable-item-span{color:var(--ink);font-weight:700}
body.itscpu2-active .reset_variations{font-size:12px;color:var(--mut)}

/* ---------- Buy row ---------- */
body.itscpu2-active .woocommerce-variation-add-to-cart{display:flex;flex-wrap:wrap;gap:10px;align-items:stretch;margin-top:14px}
body.itscpu2-active .woocommerce-variation-add-to-cart .quantity{order:1;border:1.5px solid var(--line);border-radius:10px;overflow:hidden}
body.itscpu2-active .woocommerce-variation-add-to-cart .wd-buy-now-btn{order:2}
body.itscpu2-active .woocommerce-variation-add-to-cart .single_add_to_cart_button{order:3}
body.itscpu2-active .woocommerce-variation-add-to-cart .itstore-emi-open{order:4}
body.itscpu2-active .single_add_to_cart_button,
body.itscpu2-active .wd-buy-now-btn{
  flex:1 1 130px;min-height:48px;border-radius:10px;font-weight:750;border:2px solid var(--r);box-shadow:none;transition:background .15s,color .15s;
}
body.itscpu2-active .wd-buy-now-btn{background:var(--r);color:#fff}
body.itscpu2-active .wd-buy-now-btn:hover{background:var(--r2);border-color:var(--r2);color:#fff}
body.itscpu2-active .single_add_to_cart_button{background:transparent;color:var(--r)}
body.itscpu2-active .single_add_to_cart_button:hover{background:rgba(227,30,36,.08);color:var(--r)}
body.itscpu2-active .itstore-emi-open{
  flex:1 1 100%;min-height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:700;cursor:pointer;
}
body.itscpu2-active .itstore-emi-open:hover{border-color:var(--ink)}

/* ---------- Description / spec table → 2-column grid ---------- */
body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type{border:0;width:100%}
body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type thead{display:none}
body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type tbody{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 40px;
}
body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type tr{
  display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);
}
body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type td{
  border:0;padding:11px 0;font-size:14px;background:none;
}
body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type td:first-child{color:var(--mut)}
body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type td:last-child{text-align:right;font-weight:600}

@media (max-width:768px){
  body.itscpu2-active .wd-single-gallery .woocommerce-product-gallery{padding:8px;border-radius:12px}
  body.itscpu2-active .wd-single-content > .elementor-widget-container > table:first-of-type tbody{grid-template-columns:1fr}
}

/* ================= v2.1 fixes ================= */
/* Double colon "Storage : :" -> remove the extra separators, keep one gap */
body.itscpu2-active form.variations_form th.label label::after,
body.itscpu2-active form.variations_form th.label::after,
body.itscpu2-active form.variations_form td.label::after,
body.itscpu2-active .woo-selected-variation-item-name::before,
body.itscpu2-active .woo-selected-variation-item-name::after{content:none !important;display:none !important}
body.itscpu2-active form.variations_form th.label label{
  font-size:13px !important;font-weight:700 !important;color:var(--ink) !important;text-transform:none;display:inline;
}
body.itscpu2-active .woo-selected-variation-item-name{
  font-size:13px !important;font-weight:500 !important;color:var(--mut) !important;margin-left:8px;
}
/* Pills: one size, one shape */
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item,
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item .variable-item-contents{
  border-radius:10px !important;
}
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item{
  height:auto !important;min-height:40px;padding:0 !important;
}
body.itscpu2-active ul.variable-items-wrapper li.variable-item .variable-item-span-button{
  font-size:14px !important;line-height:1.2;padding:10px 16px;display:block;
}
/* "Out of stock" message: smaller, calmer */
body.itscpu2-active .single_variation .stock,
body.itscpu2-active .woocommerce-variation .stock{
  font-size:13px;font-weight:700;padding:8px 12px;border-radius:8px;display:inline-block;margin:8px 0;
}

/* ================= v2.2: bigger, MacZen-style ================= */
/* Bigger title + price */
body.itscpu2-active .wd-single-title .product_title{font-size:clamp(28px,3.2vw,42px) !important;font-weight:800 !important;line-height:1.12 !important;letter-spacing:-.8px}

/* Gallery: bigger image, less frame (desktop: wider left column) */
body.itscpu2-active .wd-single-gallery .woocommerce-product-gallery{background:#fff;padding:6px;border-radius:16px}
body.itscpu2-active .wd-single-gallery .wd-gallery-images img{object-fit:contain}
@media (min-width:1025px){
  body.itscpu2-active .elementor-element-eb94c47{--width:54% !important}
  body.itscpu2-active .elementor-element-a360b9d{--width:44% !important}
}

/* Variations: every attribute is its own card, label on top, pills below */
body.itscpu2-active form.variations_form table.variations,
body.itscpu2-active form.variations_form table.variations tbody,
body.itscpu2-active form.variations_form table.variations tr,
body.itscpu2-active form.variations_form table.variations th,
body.itscpu2-active form.variations_form table.variations td{display:block !important;width:100% !important}
body.itscpu2-active form.variations_form table.variations tr{
  border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin:0 0 12px;background:#fff;
}
body.itscpu2-active form.variations_form table.variations th.label{padding:0 0 10px !important}
body.itscpu2-active form.variations_form table.variations td.value{padding:0 !important}
body.itscpu2-active form.variations_form th.label label{font-size:15px !important}
body.itscpu2-active .woo-selected-variation-item-name{font-size:14px !important}

/* Bigger, fully-rounded pills; clear selected state */
body.itscpu2-active ul.variable-items-wrapper{gap:10px !important}
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item,
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item .variable-item-contents{border-radius:999px !important}
body.itscpu2-active ul.variable-items-wrapper li.variable-item .variable-item-span-button{font-size:15px !important;padding:11px 22px !important}
body.itscpu2-active ul.variable-items-wrapper li.variable-item.button-variable-item.selected{
  background:#fff5f5 !important;border-color:var(--r) !important;box-shadow:0 0 0 1px var(--r) !important;
}
body.itscpu2-active ul.variable-items-wrapper li.variable-item:focus{outline:none !important}
body.itscpu2-active ul.variable-items-wrapper li.variable-item:focus-visible{outline:3px solid var(--r) !important;outline-offset:2px}

/* Quantity bigger */
body.itscpu2-active .woocommerce-variation-add-to-cart .quantity{height:52px;border-radius:12px}
body.itscpu2-active .woocommerce-variation-add-to-cart .quantity .btn{width:42px;font-size:20px}
body.itscpu2-active .woocommerce-variation-add-to-cart .quantity input.qty{width:46px;font-size:16px;font-weight:700}
body.itscpu2-active .single_add_to_cart_button,
body.itscpu2-active .wd-buy-now-btn{min-height:52px;font-size:15px;border-radius:12px}

/* --- Order of the right column: title, price, options+buy, watching, contact, specs, actions --- */
@media (min-width:1025px){
  body.itscpu2-active .elementor-element-a360b9d{display:flex !important;flex-direction:column}
  body.itscpu2-active .elementor-element-a360b9d > *{order:20}
  body.itscpu2-active .elementor-element-a360b9d > .wd-single-title{order:1}
  body.itscpu2-active .elementor-element-a360b9d > .wd-single-price{order:2}
  body.itscpu2-active .elementor-element-a360b9d > .elementor-widget-wd_single_product_add_to_cart{order:3}
  body.itscpu2-active .elementor-element-a360b9d > .elementor-widget-html{order:4}
  body.itscpu2-active .elementor-element-a360b9d > .elementor-widget-wd_single_product_visitor_counter{order:5}
  body.itscpu2-active .elementor-element-a360b9d > .wd-single-short-desc{order:6}
}
/* Color card first, then Storage */
body.itscpu2-active form.variations_form table.variations tbody{display:flex !important;flex-direction:column}
body.itscpu2-active form.variations_form table.variations tr:has(select[name="attribute_color"]){order:-1}

/* --- Remove the extra outer box around the options/buy area --- */
body.itscpu2-active .elementor-widget-wd_single_product_add_to_cart,
body.itscpu2-active .elementor-widget-wd_single_product_add_to_cart > .elementor-widget-container,
body.itscpu2-active .elementor-widget-wd_single_product_add_to_cart form.cart{
  border:0 !important;padding:0 !important;box-shadow:none !important;background:transparent !important;
}

/* --- Gallery: image fills the card, and stays in view while the right side scrolls --- */
body.itscpu2-active .wd-single-gallery .wd-gallery-images .wd-carousel-wrap img,
body.itscpu2-active .wd-single-gallery .woocommerce-product-gallery__image img{transform:scale(1.18);transform-origin:center}
@media (min-width:1025px){
  body.itscpu2-active .elementor-element-eb94c47{align-self:stretch}
  body.itscpu2-active .elementor-element-eb94c47 > .wd-single-gallery{position:sticky;top:90px}
}

/* ================= v2.4.0: fix order (title + buy area live in child containers) ================= */
@media (min-width:1025px){
  body.itscpu2-active .elementor-element-a360b9d > .e-con:has(> .wd-single-title){order:1}
  body.itscpu2-active .elementor-element-a360b9d > .e-con:has(> .wd-single-add-cart){order:3}
  body.itscpu2-active .elementor-element-a360b9d > .e-con:has(> .wd-single-action-btn){order:21}
}
/* Gallery: crop the empty top/bottom margin of the square product photo */
body.itscpu2-active .wd-single-gallery .woocommerce-product-gallery__image{aspect-ratio:6/5;overflow:hidden}
body.itscpu2-active .wd-single-gallery .woocommerce-product-gallery__image img{width:100% !important;height:100% !important;object-fit:cover;transform:scale(1.1)}

/* ================= v2.4.0: keep columns side by side (never wrap the summary under the image) ================= */
@media (min-width:1025px){
  body.itscpu2-active .elementor-element-e5f7d04 > .e-con-inner{flex-wrap:nowrap !important}
  body.itscpu2-active .elementor-element-eb94c47{--width:50% !important;min-width:0}
  body.itscpu2-active .elementor-element-a360b9d{--width:46% !important;min-width:0}
}

/* ================= v2.4.0: regular price + savings (site's own number format) ================= */
body.itscpu2-active .wd-single-price .elementor-widget-container{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px}
body.itscpu2-active .itscpu2-extra{display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:6px 12px}
body.itscpu2-active .itscpu2-old{font-size:18px;font-weight:500;color:#9ca3af;text-decoration:line-through}
body.itscpu2-active .itscpu2-save{background:var(--r);color:#fff;border-radius:6px;font-size:13px;font-weight:700;padding:3px 10px;line-height:1.5}

/* ================= v2.4: Specification / Description / Warranty pills ================= */
body.itscpu2-active .itscpu2-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 20px}
body.itscpu2-active .itscpu2-tab{
  border:1.5px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;padding:9px 20px;
  font-size:14px;font-weight:600;text-decoration:none;line-height:1.3;transition:background .15s,color .15s,border-color .15s;
}
body.itscpu2-active .itscpu2-tab:hover{border-color:var(--ink)}
body.itscpu2-active .itscpu2-tab.is-active{background:var(--r);border-color:var(--r);color:#fff}
body.itscpu2-active #itscpu2-spec,
body.itscpu2-active #itscpu2-desc,
body.itscpu2-active #itscpu2-warranty{scroll-margin-top:110px}


/* ================= v2.4.3: pointer-following image hover zoom ================= */
/* Keep the normal gallery unchanged until the pointer enters the main image. */
@media (hover:hover) and (pointer:fine) and (min-width:769px){
  body.itscpu2-active .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image{
    overflow:hidden;
    cursor:zoom-in;
  }
  body.itscpu2-active .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image img{
    transform:scale(1.1);
    transform-origin:var(--itscpu2-zoom-x,50%) var(--itscpu2-zoom-y,50%);
    transition:transform .22s ease, transform-origin 0s;
    will-change:transform;
  }
  body.itscpu2-active .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image.itscpu2-zoom-active img{
    transform:scale(1.75) !important;
  }
}


/* ================= v2.4.4: tall photos (tablet / phone) are shown whole, not cropped ================= */
/* The JS adds .itscpu2-fit to an image only when the "fill" crop would cut into the product itself. */
html body.itscpu2-active .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image img.itscpu2-fit,
html body.itscpu2-active .wd-single-gallery .wd-gallery-images .wd-carousel-wrap img.itscpu2-fit{
  object-fit:contain !important;
  transform:scale(1) !important;
  padding:2%;
  box-sizing:border-box;
}
@media (hover:hover) and (pointer:fine) and (min-width:769px){
  html body.itscpu2-active .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image.itscpu2-zoom-active img.itscpu2-fit{
    transform:scale(1.75) !important;
  }
}
