/* Megapixel theme: single product page layout. Loaded on product pages only, after main.css.
   Component styling for graded models (grade cards, price block, confidence panel, setup cards,
   feature cards) lives in Megapixel Core's pdp.css; this file arranges the page. */

/* ---------- Page grid ---------- */
/* Top row: gallery (left half) and purchase panel (right half). Everything after it spans the full width, in document order. */
.mp-theme.single-product div.product{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px 56px;align-items:start;padding-top:20px}
.mp-theme.single-product div.product>*{grid-column:1/-1;min-width:0}
.mp-theme.single-product div.product>.woocommerce-notices-wrapper{margin:0}
.mp-theme.single-product div.product>.mp-gallery-col{grid-column:1;grid-row:1;align-self:stretch}
.mp-theme.single-product div.product>.summary{grid-column:2;grid-row:1;width:auto!important;float:none!important;margin:0!important;display:flex;flex-direction:column;gap:14px}
.mp-theme.single-product div.product .onsale,.mp-theme.single-product .ast-onsale-card{display:none}

/* ---------- Gallery ---------- */
/* The column stretches to the height of the top row; only the inner wrapper is sticky, so it stops where the purchase area ends. */
.mp-theme.single-product .mp-gallery-sticky{position:sticky;top:96px;display:flex;flex-direction:column;gap:12px}
.admin-bar.mp-theme.single-product .mp-gallery-sticky{top:128px}
.mp-theme.single-product .mp-gallery-sticky>.woocommerce-product-gallery{width:auto!important;float:none!important;margin:0!important;position:relative}
.mp-theme .woocommerce-product-gallery__wrapper{border-radius:22px;overflow:hidden;background:#fff;border:1px solid var(--mp-line);box-shadow:0 1px 2px rgba(18,20,23,.04)}
.mp-theme .woocommerce-product-gallery__image{aspect-ratio:1/1;display:block!important;position:relative;background:#F6F6F4}
.mp-theme .woocommerce-product-gallery__image>a{position:absolute;inset:6%;display:block}
.mp-theme .woocommerce-product-gallery__image img{display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:scale-down;margin:0!important;mix-blend-mode:multiply}
.mp-theme .woocommerce-product-gallery .flex-control-thumbs{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:12px 0 0!important;padding:0;list-style:none}
.mp-theme .woocommerce-product-gallery .flex-control-thumbs li{width:auto!important;float:none!important;margin:0!important}
.mp-theme .woocommerce-product-gallery .flex-control-thumbs img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain;padding:4px;box-sizing:border-box;border-radius:12px;background:#F6F6F4;border:2px solid var(--mp-line);opacity:.8;cursor:pointer;transition:border-color .15s,opacity .15s}
.mp-theme .woocommerce-product-gallery .flex-control-thumbs img:hover{opacity:1}
.mp-theme .woocommerce-product-gallery .flex-control-thumbs img.flex-active{border-color:var(--mp-red);opacity:1}
.mp-theme .woocommerce-product-gallery__trigger{top:14px;right:14px;z-index:3}
.mp-theme .woocommerce-product-gallery .woocommerce-product-gallery__image a{cursor:zoom-in}

/* ---------- Purchase panel: reading order ---------- */
.mp-theme .summary>*{order:20;margin-top:0;margin-bottom:0}
.mp-theme .summary>.woocommerce-breadcrumb{order:0;padding-top:0}
.mp-theme .summary>.mpc-eyebrow{order:1}
.mp-theme .summary>.product_title{order:2}
.mp-theme .summary>.woocommerce-product-details__short-description{order:3}
.mp-theme .summary>#mp-buy{order:6}
.mp-theme .summary>form.cart{order:7}
.mp-theme .summary>.mp-help-btns{order:8}
.mp-theme .summary>.mpc-trust{order:9}
.mp-theme .summary>.price,.mp-theme .summary>.stock,.mp-theme .summary>.ast-stock-detail{order:6}
.mp-theme .summary>.mp-trust{order:9}
.mp-theme .summary>.product_meta{order:12;border:0;padding:0}
.mp-theme .summary .single-product-category{display:none}
.mp-theme .summary .product_title{font-size:clamp(30px,3vw,42px);line-height:1.05;letter-spacing:-.035em;margin:0;padding:0}
.mp-theme .summary .woocommerce-product-details__short-description p{margin:0;color:var(--mp-mut);font-size:15px}
.mp-theme .summary>.price{font-size:34px!important;font-weight:700;letter-spacing:-.03em;color:var(--mp-tx)!important;line-height:1.1}
.mp-theme .summary>.price del{font:15px var(--mp-mono);color:var(--mp-mut);opacity:1}
.mp-theme .summary>.price ins{text-decoration:none;background:none}

/* Buying form */
.mp-theme .summary form.cart{margin:0!important;display:flex;flex-wrap:wrap;gap:10px;align-items:stretch}
.mp-theme .summary form.variations_form{flex-direction:column;flex-wrap:nowrap;gap:12px}
.mp-theme .summary form.variations_form .variations{order:1}
.mp-theme .summary form.variations_form .mpc-pricebox-inline{order:2;display:flex}
.mp-theme .summary form.variations_form .mpc-shutter-guide{order:7}
.mp-theme .summary form.variations_form .single_variation_wrap{display:contents}
.mp-theme .summary form.variations_form .single_variation{order:3}
.mp-theme .summary form.variations_form .mpc-grade-note{order:6}
.mp-theme .summary form.variations_form .woocommerce-variation-add-to-cart{order:4}
.mp-theme .summary form.variations_form .mpc-highlights{order:5}
.mp-theme .summary .single_variation{display:flex;flex-direction:column;gap:6px;margin:0}
.mp-theme .summary .single_variation:empty{display:none}
.mp-theme .summary .woocommerce-variation-description p{margin:0;font-size:13px;color:var(--mp-mut)}
.mp-theme .summary .woocommerce-variation-price{display:none}
.mp-theme .summary .woocommerce-variation-add-to-cart{display:flex;flex-wrap:wrap;gap:10px;margin:0}
.mp-theme .summary table.variations,.mp-theme .summary table.variations tbody,.mp-theme .summary table.variations tr{display:block;margin:0!important;border:0!important;padding:0}
.mp-theme .summary table.variations th,.mp-theme .summary table.variations td{display:block;padding:0;border:0;text-align:left}
.mp-theme .summary table.variations th.label{padding-bottom:8px;font:600 12px var(--mp-mono);text-transform:uppercase;letter-spacing:.06em;color:var(--mp-mut)}
.mp-theme .summary table.variations select{min-height:48px;border-radius:10px;border:1px solid #D0D3D9;padding:0 14px;min-width:220px;background:var(--mp-s1)}
.mp-theme .summary .reset_variations{display:none!important}
.mp-theme .summary .quantity .qty{min-height:48px;border-radius:12px;border:1px solid var(--mp-line)}
.mp-theme .summary .single_add_to_cart_button{flex:1 1 200px;min-height:54px;border-radius:14px;background:var(--mp-red)!important;color:#fff!important;font-weight:700;font-size:16px;border:0;margin:0}
.mp-theme .summary .single_add_to_cart_button:hover{background:var(--mp-red2)!important}
.mp-theme .summary .mpc-buy-now{order:-1;box-shadow:0 8px 20px -10px rgba(214,43,38,.7)}
.mp-theme .summary form:has(.mpc-buy-now) .single_add_to_cart_button:not(.mpc-buy-now){background:#fff!important;color:var(--mp-tx)!important;border:1.5px solid #C9CCD2}
.mp-theme .summary form:has(.mpc-buy-now) .single_add_to_cart_button:not(.mpc-buy-now):hover{border-color:var(--mp-tx)}
.mp-theme .summary .single_add_to_cart_button.disabled{opacity:.45;cursor:not-allowed}
/* Astra pulls sold-individually buttons left by 1em to cover the quantity box; ours is already hidden. */
body.mp-theme div.product .summary form.cart .button.single_add_to_cart_button{margin-left:0}
.mp-theme .summary .stock{font-weight:600;margin:0}
.mp-theme .summary .stock.in-stock{color:var(--mp-ok)}
.mp-theme .summary .stock.out-of-stock{color:var(--mp-redtx)}
.mp-theme .summary .mpc-avail{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:700}
.mp-theme .summary .mpc-avail::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor;flex:none}
.mp-theme .summary .mpc-avail-preorder{color:#8A5A00}
.mp-theme .summary .mpc-preorder-note{margin:0;font-size:13px;color:var(--mp-mut)}

/* WhatsApp and Call: two equal buttons */
.mp-help-btns{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.mp-help-btns .mp-btn{min-height:46px;font-size:14px;width:100%}
.mp-theme .summary .product_meta{font:12px var(--mp-mono);color:var(--mp-mut);display:flex;flex-direction:column;gap:4px}
.mp-theme .summary .product_meta a{color:var(--mp-bluetx)}


/* ---------- Accordion (product information) ---------- */
.mp-acc{grid-column:1/-1;display:flex;flex-direction:column;gap:10px;margin:8px 0 0;padding:0;border:0}
.mp-acc-item{background:#fff;border:1px solid var(--mp-line);border-radius:18px;overflow:hidden;transition:border-color .2s,box-shadow .2s}
.mp-acc-item[open]{border-color:#CFD2D8;box-shadow:0 12px 30px -22px rgba(18,20,23,.35)}
.mp-acc summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:60px;padding:16px 22px;font-weight:700;font-size:18px;letter-spacing:-.01em;-webkit-tap-highlight-color:transparent}
.mp-acc summary::-webkit-details-marker{display:none}
.mp-acc summary:hover{background:#FAFAF8}
.mp-acc summary:focus-visible{outline:2px solid var(--mp-bluetx);outline-offset:-3px;border-radius:16px}
.mp-acc-chev{flex:none;width:30px;height:30px;border-radius:50%;border:1px solid var(--mp-line);display:grid;place-items:center;transition:transform .25s,background .2s,border-color .2s}
.mp-acc-chev::before{content:'';width:8px;height:8px;border-right:2px solid var(--mp-tx);border-bottom:2px solid var(--mp-tx);transform:translateY(-2px) rotate(45deg)}
.mp-acc-item[open] .mp-acc-chev{transform:rotate(180deg);background:var(--mp-tx);border-color:var(--mp-tx)}
.mp-acc-item[open] .mp-acc-chev::before{border-color:#fff}
.mp-acc-panel{overflow:hidden}
.mp-acc-body{padding:2px 22px 24px;color:var(--mp-tx2);font-size:15px}
.mp-acc-body>:first-child{margin-top:0}
.mp-acc-body>:last-child{margin-bottom:0}
.mp-theme .mp-acc-body table.shop_attributes{border:1px solid var(--mp-line);border-radius:12px;border-collapse:separate;border-spacing:0;overflow:hidden;margin:0;width:100%}
.mp-theme .mp-acc-body table.shop_attributes th,.mp-theme .mp-acc-body table.shop_attributes td{padding:12px 16px;border:0;border-bottom:1px solid var(--mp-line2);font-style:normal;background:#fff;vertical-align:top}
.mp-theme .mp-acc-body table.shop_attributes tr:last-child>*{border-bottom:0}
.mp-theme .mp-acc-body table.shop_attributes tr:nth-child(even)>*{background:#FAFAF8}
.mp-theme .mp-acc-body table.shop_attributes th{font:500 12px var(--mp-mono);text-transform:uppercase;letter-spacing:.04em;color:var(--mp-mut);width:34%}

/* ---------- Sections below the top row ---------- */
.mp-theme.single-product .related,.mp-theme.single-product .upsells{padding-top:40px}
.mp-theme.single-product .related>h2,.mp-theme.single-product .upsells>h2{font-size:clamp(26px,3vw,32px);font-weight:700;letter-spacing:-.03em;margin:0 0 20px}
.mp-sticky-buy{display:none}

/* ---------- Tablet and phone: one column, gallery first ---------- */
@media (max-width:1000px){
	.mp-theme.single-product div.product{grid-template-columns:minmax(0,1fr);gap:16px;padding-top:8px}
	.mp-theme.single-product div.product>.mp-gallery-col,.mp-theme.single-product div.product>.summary{grid-column:1;grid-row:auto}
	.mp-theme.single-product .mp-gallery-sticky{position:static}
	.mp-theme .summary>.woocommerce-breadcrumb{display:none}
	.mp-theme .summary .product_title{font-size:28px}
	.mp-theme.single-product .mp-gallery-col{max-width:560px;width:100%;margin-inline:auto}
	.mp-acc summary{font-size:16px;padding:14px 16px;min-height:56px}
	.mp-acc-body{padding:0 16px 20px}
}
@media (max-width:760px){
	.mp-theme .woocommerce-product-gallery .flex-control-thumbs{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
	.mp-sticky-buy{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;background:rgba(255,255,255,.97);border-top:1px solid var(--mp-line);padding:10px 16px calc(10px + env(safe-area-inset-bottom));gap:12px;align-items:center;backdrop-filter:blur(8px)}
	.mp-sticky-buy.is-hidden{display:none}
	.mp-has-sticky #page{padding-bottom:76px}
	.mp-sticky-info{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
	.mp-sticky-price{font-size:18px;font-weight:700;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
	.mp-sticky-price del{display:none}
	.mp-sticky-price ins{text-decoration:none}
	.mp-sticky-status{font-size:12.5px;color:var(--mp-mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
	.mp-sticky-buy[data-mpc-state="instock"] .mp-sticky-status{color:var(--mp-ok)}
	.mp-sticky-buy[data-mpc-state="preorder"] .mp-sticky-status{color:#8A5A00}
	.mp-sticky-buy[data-mpc-state="unavailable"] .mp-sticky-status{color:var(--mp-redtx)}
	.mp-sticky-cta{flex:0 0 auto;white-space:nowrap;min-height:46px;padding:0 20px}
	.mp-sticky-cta.is-muted{background:var(--mp-s1)!important;color:var(--mp-tx)!important;border:1px solid #C9CCD2}
}
@media (prefers-reduced-motion:reduce){.mp-acc-item,.mp-acc-chev{transition:none}}

/* Graded models print their own price block; WooCommerce's plain price line would repeat it. */
.mpc-pdp .summary>p.price{display:none}
.mp-theme .summary>#mp-buy{position:absolute;height:0;width:0;overflow:hidden}
.mpc-pdp .summary>.product_meta,.mpc-pdp .summary>.ast-single-product-category,.mpc-pdp .summary>.single-product-category{display:none}
.mpc-pdp .summary>.single-product-category{display:none!important}
