/* Inkvely product page - small fixes (loads after pdp-layout.css, only on product pages).
   To undo: delete this file, pdp-fixes.php and the pdp-fixes block in functions.php. */

/* "Read more" button sits right under the short description (tablet / desktop; mobile order is set in pdp-layout.css) */
@media(min-width:641px){
 .single-product div.product .summary.entry-summary>.ik-description-toggle{order:6;align-self:flex-start}
}

/* ---------- All screens ---------- */

/* Price shown once, at the top (it already follows the chosen colour / size) - hide the repeat under the options */
.single-product .woocommerce-variation-price{display:none!important}
.single-product .woocommerce-variation{margin:0}

/* Quantity + Add to cart on one row, Buy it now underneath */
.single-product div.product form.cart .quantity{flex:0 0 auto;order:1}
.single-product div.product form.cart button.single_add_to_cart_button.button{flex:1 1 0;min-width:0;order:2;padding:0 14px}
.single-product div.product form.cart .ik-buynow{flex:1 1 100%;order:3}

/* Flash sale badge next to the price + price styling */
.single-product div.product .price ins{background:none;text-decoration:none}
.single-product .ik-flash-badge{display:inline-block;vertical-align:middle;margin:0 0 0 10px;padding:4px 9px;background:var(--ik-accent);border:2px solid var(--ik-ink);color:var(--ik-ink);font-size:.7rem;font-weight:900;letter-spacing:.06em;line-height:1.2;text-transform:uppercase}

/* Title and option labels use the brand black (they were a bluish grey) */
.single-product div.product .product_title,
.single-product table.variations th.label label{color:var(--ik-ink)}

/* "Read more": one arrow only (the round lime icon), no button box */
.single-product .ik-description-toggle:after,
.single-product .ik-description-toggle[aria-expanded="true"]:after{content:none!important}
.single-product .ik-description-toggle{background:transparent;box-shadow:none;border-radius:0}

/* Colour / size labels: name, chosen option and guide link on tidy lines */
.single-product table.variations th.label{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.single-product table.variations th.label label{order:1;margin:0;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.single-product table.variations th.label .ik-picked{order:2;padding:2px 8px;background:var(--ik-paper);border:1px solid var(--ik-line);color:var(--ik-ink);font-size:.78rem;font-weight:700;line-height:1.3}
.single-product table.variations th.label .ik-picked:empty{display:none}
.single-product table.variations th.label .ik-guide-trigger{order:3;margin-left:auto;font-size:0!important;line-height:1;color:var(--ik-ink)}
.single-product table.variations th.label .ik-guide-trigger::after{font-size:.78rem;font-weight:700;line-height:1.3;letter-spacing:0;text-transform:none}
.single-product table.variations th.label .ik-color-guide-trigger::after{content:"Color guide"}
.single-product table.variations th.label .ik-size-guide-trigger::after{content:"Size guide"}

/* ---------- Tablet + phone ---------- */

/* Zoom icon stays on the image (the gallery lost its positioning, so the icon jumped up over the title) */
@media(max-width:921px){
 .single-product div.product>.ik-product-top-row>div.images,
 .single-product div.product>div.images{position:relative!important}
}

/* Wide tables (Printify size chart) and images in the descriptions must stay inside the content box.
   The table scrolls sideways inside its own box (first column stays in view) instead of pushing the page wider. */
@media(max-width:921px){
 .single-product .woocommerce-tabs .panel,
 .single-product .woocommerce-product-details__short-description{max-width:100%;min-width:0;overflow-wrap:anywhere}
 .single-product .woocommerce-tabs .panel img,
 .single-product .woocommerce-product-details__short-description img{max-width:100%;height:auto}
 .single-product .woocommerce-tabs .panel table,
 .single-product .woocommerce-product-details__short-description table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;border-collapse:collapse;font-size:.78rem!important}
 .single-product .woocommerce-tabs .panel table th,
 .single-product .woocommerce-tabs .panel table td,
 .single-product .woocommerce-product-details__short-description table th,
 .single-product .woocommerce-product-details__short-description table td{padding:7px 9px!important;font-size:.78rem!important;white-space:nowrap;overflow-wrap:normal}
 .single-product .woocommerce-tabs .panel table tr>*:first-child{position:sticky;left:0;z-index:1;background:#fff;white-space:normal;min-width:110px;max-width:130px;border-right:1px solid #e5e5e5}
 /* size chart after the description text, not before it */
 .single-product .woocommerce-tabs #tab-description{display:flex;flex-direction:column}
 .single-product .woocommerce-tabs #tab-description>table{order:99;margin-top:14px}
 .single-product .woocommerce-tabs #tab-description>.ik-description-toggle{align-self:flex-start}
 .single-product div.product,
 .single-product div.product .woocommerce-tabs{max-width:100%;min-width:0}
}

/* ---------- Phone ---------- */
@media(max-width:640px){
 /* Gallery: full width of the content (it was about 3/4 of it) */
 .single-product div.product>div.images,
 .single-product div.product>.ik-product-top-row>div.images{width:100%!important;max-width:100%!important;align-self:stretch;margin:0 0 8px!important}
 /* Tight spacing between the big image and the thumbnails, and below the thumbnails */
 .single-product div.product div.images img{display:block}
 .single-product div.product div.images .woocommerce-product-gallery__wrapper{margin:0!important}
 .single-product div.product div.images .flex-control-thumbs{margin:6px 0 0!important;padding:0 0 2px!important;gap:6px}
 .single-product div.product div.images .flex-control-thumbs li{flex:0 0 46px;width:46px}
 .single-product div.product div.images .flex-control-thumbs img{width:46px;height:46px}
 /* Every block of the product page may shrink below its content width, so nothing can widen the page */
 .single-product div.product>*,
 .single-product div.product .summary.entry-summary>*{min-width:0;max-width:100%}
 .single-product div.product .woocommerce-tabs{width:100%}
 /* Option labels */
 .single-product table.variations th.label label{font-size:.78rem}
 /* Quantity stepper a little narrower so Add to cart fits beside it */
 .single-product form.cart .quantity .qty{width:40px;min-height:50px}
 .single-product .ik-step{width:36px}
 .single-product div.product form.cart button.single_add_to_cart_button.button,
 .single-product div.product form.cart .ik-buynow{min-height:50px;font-size:.85rem;letter-spacing:.04em}
 .single-product div.product form.cart .ik-buynow{flex:1 1 100%}
 /* Tabs: three equal buttons on one row */
 .single-product div.product .woocommerce-tabs{margin-top:34px}
 .single-product div.product .woocommerce-tabs ul.tabs{flex-wrap:nowrap;gap:6px}
 .single-product div.product .woocommerce-tabs ul.tabs li{flex:1 1 0;min-width:0;text-align:center}
 .single-product div.product .woocommerce-tabs ul.tabs li a{display:block;padding:10px 4px;font-size:.66rem;line-height:1.2;letter-spacing:.03em}
 .single-product div.product .woocommerce-tabs .panel{padding:16px}
 /* Scroll-to-top button in brand colours, smaller */
 #ast-scroll-top{width:40px!important;height:40px!important;right:14px!important;bottom:16px!important;background:#0a0a0a!important;color:#d4ff3f!important;border:2px solid #d4ff3f!important;border-radius:0!important;opacity:.92}
 #ast-scroll-top svg{fill:#d4ff3f!important;width:16px;height:16px}
 /* Safety net: no sideways page scroll on the product page */
 body.single-product{overflow-x:hidden}
 @supports(overflow:clip){body.single-product{overflow-x:clip}}
}

/* Product meta block (SKU, category, tags) is hidden: the category already shows as the label above the title */
.single-product div.product .product_meta{display:none!important}

/* Phone: breadcrumb (Home / Category / Product) moves to the very top instead of the bottom */
@media(max-width:640px){
 .single-product div.product .summary.entry-summary>.woocommerce-breadcrumb,
 .single-product div.product .summary.entry-summary>.ast-breadcrumbs-wrapper{order:0;margin:0 0 10px;font-size:.74rem;line-height:1.4;color:var(--ik-muted)}
 .single-product div.product .summary.entry-summary>.woocommerce-breadcrumb a,
 .single-product div.product .summary.entry-summary>.ast-breadcrumbs-wrapper a{color:var(--ik-ink)}
}
