/* Inkvely product cards v3: one-line price + SAVE badge, measured spacing, no empty space under the button.
   Delete this file (and its enqueue at the bottom of product-card-enhancements.php) to undo.
   Spacing is set by these variables: --ik-row (space between card rows), --ik-col (space between columns). */

html{--ik-row:24px;--ik-col:18px}
@media(max-width:1024px){html{--ik-row:20px;--ik-col:14px}}
@media(max-width:767px){html{--ik-row:14px;--ik-col:7px}}

/* 1) Price, old price and SAVE badge always stay on ONE line */
html body ul.products li.product .ik-offer-price{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:4px 6px!important;min-width:0;white-space:nowrap}
html body ul.products li.product .ik-offer-price>*{flex:0 0 auto}
html body ul.products li.product .ik-offer-price__compare{font-size:.8em!important}
html body ul.products li.product .ik-offer-price__save{padding:2px 5px!important;font-size:.6rem!important;line-height:1.2!important}

/* 2) Grid spacing: fixed gap between rows and columns, cards never touch */
html :is(body.woocommerce-page,body.home) ul.products{column-gap:var(--ik-col)!important;grid-column-gap:var(--ik-col)!important;row-gap:0!important;grid-row-gap:0!important;align-items:start!important}
html :is(body.woocommerce-page,body.home) ul.products li.product{margin-top:0!important;margin-bottom:var(--ik-row)!important;height:auto!important;min-height:0!important}
html :is(body.woocommerce-page,body.home) .ik-more ul.products li.product{margin-bottom:0!important}

/* 3) Card inside: content stacks top to bottom, the card ends 12px under the button (no empty space) */
html :is(body.woocommerce-page,body.home) ul.products li.product{display:flex!important;flex-direction:column!important;padding-bottom:12px!important}
html :is(body.woocommerce-page,body.home) ul.products li.product a.woocommerce-LoopProduct-link{flex:0 0 auto!important;display:flex!important;flex-direction:column!important;padding-bottom:0!important}
html :is(body.woocommerce-page,body.home) ul.products li.product a.woocommerce-LoopProduct-link .price{margin-top:2px!important;margin-bottom:0!important;min-height:1.5em}
html :is(body.woocommerce-page,body.home) ul.products li.product a.button{margin-top:12px!important;margin-bottom:0!important;flex:0 0 auto}
html :is(body.woocommerce-page,body.home) ul.products li.product a.button~:is(div,span,p):empty{display:none!important}

/* 4) Tablet and desktop: slightly tighter card text padding */
@media(min-width:768px){
 html :is(body.woocommerce-page,body.home) ul.products li.product .woocommerce-loop-product__title,
 html :is(body.woocommerce-page,body.home) ul.products li.product .price,
 html :is(body.woocommerce-page,body.home) ul.products li.product .ast-woo-product-category,
 html :is(body.woocommerce-page,body.home) ul.products li.product .woocommerce-loop-product__category{padding-left:12px!important;padding-right:12px!important}
 html :is(body.woocommerce-page,body.home) ul.products li.product .ik-loop-colors{margin-left:12px!important;margin-right:12px!important}
 html :is(body.woocommerce-page,body.home) ul.products li.product a.button{width:calc(100% - 24px)!important;margin-left:12px!important;margin-right:12px!important}
}

/* 5) Phone: less empty space left/right, cards a little wider, text fits */
@media(max-width:767px){
 html body.woocommerce-shop .ast-container,
 html body.post-type-archive-product .ast-container,
 html body.tax-product_cat .ast-container,
 html body.tax-product_tag .ast-container{padding-left:5px!important;padding-right:5px!important}
 html :is(body.woocommerce-page,body.home) ul.products{margin-left:0!important;margin-right:0!important}
 html :is(body.woocommerce-page,body.home) ul.products li.product .woocommerce-loop-product__title,
 html :is(body.woocommerce-page,body.home) ul.products li.product .price,
 html :is(body.woocommerce-page,body.home) ul.products li.product .ast-woo-product-category,
 html :is(body.woocommerce-page,body.home) ul.products li.product .woocommerce-loop-product__category{padding-left:8px!important;padding-right:8px!important}
 html :is(body.woocommerce-page,body.home) ul.products li.product .ik-loop-colors{margin-left:8px!important;margin-right:8px!important;gap:5px!important}
 html :is(body.woocommerce-page,body.home) ul.products li.product a.button{width:calc(100% - 16px)!important;margin-left:8px!important;margin-right:8px!important}
 html body ul.products li.product .price{font-size:clamp(.78rem,3.8vw,.9rem)!important}
 html body ul.products li.product .ik-offer-price{gap:3px 5px!important}
 html body ul.products li.product .ik-offer-price__save{padding:2px 4px!important;font-size:clamp(.46rem,2.35vw,.58rem)!important}
}
@media(max-width:350px){
 html body ul.products li.product .ik-offer-price__compare{font-size:.74em!important}
 html body ul.products li.product .ik-offer-price__save{letter-spacing:0!important}
}
