/* =========================================================================
   Agriris – Additional CSS
   Dette er det ENESTE stedet for global/produktspesifikk CSS.
   Ikke legg <style> i kortbeskrivelser eller produkttekst (det lekker inn i
   meta-beskrivelse, schema, Google-feed og TranslatePress).
   Ryddet 23.10.2026.
   ========================================================================= */

:root{
  --agr-brand:#2D8B5F;
  --agr-brand-dark:#22713C;
  --agr-img-radius:16px;     /* produktbilder: shop-grid + hovedbilde */
  --agr-img-radius-sm:8px;   /* miniatyrbilder */
}

/* -------------------------------------------------------------------
   1) Butikk-grid: 2 kolonner på mobil
   ------------------------------------------------------------------- */
@media (max-width: 767px) {
	ul.products.columns-2, ul.products.columns-3, ul.products.columns-4, ul.products.columns-5, ul.products.columns-6 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* -------------------------------------------------------------------
   2) Produktbilder – avrundede hjørner, ellers ren Astra/WooCommerce.
   Bevisst INGEN tvungen beskjæring (aspect-ratio/object-fit), faste
   høyder, skygge eller hover-zoom: det var kilden til formateringsfeil.
   Woo leverer allerede kvadratiske shop-bilder og miniatyrer.
   ------------------------------------------------------------------- */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img{
  border-radius:var(--agr-img-radius);
}
.woocommerce ul.products li.product mark.onsale{
  border-radius:999px;
  background:var(--agr-brand) !important;
}
/* Hovedbilde: hvert bilde (slide) klippes rundt, så også zoom og
   tekstboksen oppå bildet holder seg innenfor hjørnene. */
.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__image{
  border-radius:var(--agr-img-radius);
  overflow:hidden;
}
/* Miniatyrbilder (Astra-slider og standard Woo-liste) */
.woocommerce div.product .ast-woocommerce-product-gallery__image img,
.woocommerce div.product .flex-control-thumbs li img{
  border-radius:var(--agr-img-radius-sm);
}

/* -------------------------------------------------------------------
   3) Checkout/cart (Woo Blocks): skjul kortbeskrivelsen under
   produktnavnet i "Order summary". Bruk den SMALE klassen.
   ------------------------------------------------------------------- */
.wc-block-components-product-metadata__description{
  display:none !important;
}

/* -------------------------------------------------------------------
   4) Ensartede knapper (Add to cart, Vipps, express checkout)
   ------------------------------------------------------------------- */
.single-product .summary form.cart{display:flex;flex-wrap:wrap;gap:10px;align-items:stretch}
.single-product .summary form.cart .quantity{height:48px;margin:0}
.single-product .summary form.cart .single_add_to_cart_button{flex:1 1 0;min-width:0;height:48px;min-height:48px;margin:0;border-radius:10px;font-size:16px;font-weight:600;padding:0 24px}
.single-product .summary form.cart .vipps_buy_now_wrapper{flex:0 0 100%;margin:0!important;height:auto!important}
.single-product .summary a.vipps-buy-now.button{float:none!important;display:block!important;width:100%!important;height:48px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:10px;overflow:hidden}
.single-product .summary a.vipps-buy-now vipps-mobilepay-button{display:block;width:100%;height:48px}
.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons{grid-template-columns:1fr!important;gap:10px!important}
.wc-block-components-express-payment__event-buttons>li{min-height:48px}
.wc-block-components-express-payment__event-buttons vipps-mobilepay-button{display:block;width:100%;height:48px}

/* -------------------------------------------------------------------
   5) AutoSprout-produktsiden (#product-4761)
   Flyttet hit fra kortbeskrivelsen. Styler kjøpsboksen (.agr-buy) og
   tekstboksene oppå galleribildene (.agr-image-copy, settes inn av
   Astra-hooken «AutoSprout single product page»).
   ------------------------------------------------------------------- */
body.postid-4761 .astra-advanced-hook-15230{clear:both}
#agr-caption-bank{display:none}

#product-4761 .agr-buy{color:#0B0F0D;line-height:1.5;margin:0 0 18px}
#product-4761 .agr-buy .agr-hook{font-size:clamp(20px,2vw,25px);font-weight:750;line-height:1.25;color:var(--agr-brand-dark);margin:0 0 10px}
#product-4761 .agr-buy .agr-yield{margin:0 0 14px;font-size:15px}
#product-4761 .agr-buy .agr-benefits{list-style:none;padding:0;margin:0 0 14px;display:grid;gap:7px}
#product-4761 .agr-buy .agr-benefits li{margin:0;padding:0;display:flex;gap:9px;font-size:15px}
#product-4761 .agr-buy .agr-benefits li>span,
#product-4761 .agr-buy .agr-benefits li p{margin:0}
#product-4761 .agr-buy .agr-tick{color:var(--agr-brand-dark);font-weight:800}
#product-4761 .agr-buy details{border:1px solid #D1D5DB;border-radius:12px;padding:0 14px;margin:0 0 10px;background:#F7F7F7}
#product-4761 .agr-buy summary{display:list-item;cursor:pointer;padding:12px 0;font-weight:650;line-height:1.4}
#product-4761 .agr-buy summary:focus-visible{outline:2px solid var(--agr-brand-dark);outline-offset:3px}
#product-4761 .agr-buy details ul{margin:0 0 14px 18px;font-size:14px}
#product-4761 .agr-buy .agr-links{font-size:13px;margin:12px 0 0}
#product-4761 .agr-buy a{color:var(--agr-brand-dark);text-decoration:underline;text-underline-offset:3px}
#product-4761 .summary .single_add_to_cart_button{min-height:48px}

#product-4761 .woocommerce-product-gallery__image{position:relative}
#product-4761 .agr-image-copy{position:absolute;left:16px;right:16px;bottom:16px;z-index:2;background:rgba(255,255,255,.96);color:#0B0F0D;border-left:4px solid var(--agr-brand);border-radius:12px;padding:12px 16px;pointer-events:none}
#product-4761 .agr-image-copy strong{display:block;font-size:clamp(18px,2vw,24px);line-height:1.2;color:var(--agr-brand-dark)}
#product-4761 .agr-image-copy span{display:block;font-size:14px;line-height:1.4;margin:5px 0 0}

@media (max-width:921px){
  #product-4761 .woocommerce-product-gallery{position:relative!important;top:auto!important;margin-bottom:16px!important}
  #product-4761 .summary .product_title{font-size:30px!important;line-height:1.15;margin-bottom:8px}
  #product-4761 .summary .price{margin-bottom:10px}
  #product-4761 .agr-image-copy{left:10px;right:10px;bottom:10px;padding:9px 12px;border-radius:10px}
  #product-4761 .agr-image-copy strong{font-size:18px}
  #product-4761 .agr-image-copy span{font-size:12px;margin-top:3px}
}

/* Små mobiler: kompakt tekstboks på bildet, med både overskrift og undertekst */
@media (max-width:544px){
  #product-4761 .agr-image-copy{left:8px;right:8px;bottom:8px;padding:8px 11px;border-left-width:3px;border-radius:8px}
  #product-4761 .agr-image-copy strong{font-size:16px;line-height:1.2}
  #product-4761 .agr-image-copy span{display:block;font-size:12.5px;line-height:1.35;margin-top:2px}
}

/* -------------------------------------------------------------------
   6) Hovedbilder alltid 1:1 (desktop og mobil), så galleriet ikke
   spretter opp og ned når man bytter bilde. Bildene beskjæres fra
   midten (cover). :is(#product-4761,.product) gir ID-styrke, så reglene
   også slår gammel lagret kritisk CSS fra WP Compress.
   ------------------------------------------------------------------- */
.woocommerce div.product:is(#product-4761,.product) .woocommerce-product-gallery{border-radius:0!important;box-shadow:none!important;background:none!important}
.woocommerce div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__wrapper{border-radius:0!important;box-shadow:none!important;background:none!important}
.woocommerce div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__image{background:none!important;border-radius:var(--agr-img-radius)!important;overflow:hidden!important}
.woocommerce div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__image img{width:100%!important;height:auto!important;aspect-ratio:1/1!important;object-fit:cover!important;object-position:50% 50%;background:none!important;margin:0!important;display:block}

/* -------------------------------------------------------------------
   7) Mobilgalleri (kun mobil): sveip mellom bildene, neste bilde
   stikker inn fra høyre, prikker under, ingen miniatyrer.
   Klassen body.agr-m-gallery settes av snippet
   «Agriris: mobilgalleri med sveip (uten miniatyrer)».
   ------------------------------------------------------------------- */
body.agr-m-gallery div.product:is(#product-4761,.product) .woocommerce-product-gallery{opacity:1!important;overflow:visible!important;display:block!important;height:auto!important;position:relative!important;margin:0 0 14px!important;padding:0 0 22px!important}
body.agr-m-gallery .woocommerce-product-gallery-thumbnails__wrapper,
body.agr-m-gallery .ast-single-product-thumbnails,
body.agr-m-gallery .flex-control-thumbs{display:none!important}
body.agr-m-gallery div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__wrapper{display:flex!important;flex-wrap:nowrap!important;gap:8px;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:none;width:auto!important;max-width:none!important;height:auto!important;margin:0 calc(50% - 50vw)!important;padding:0 16px!important;scroll-padding:0 16px;transform:none!important}
body.agr-m-gallery div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__wrapper::-webkit-scrollbar{display:none}
body.agr-m-gallery div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__image{flex:0 0 86%!important;width:86%!important;max-width:none!important;height:auto!important;display:block!important;margin:0!important;padding:0!important;float:none!important;scroll-snap-align:start;position:relative!important}
body.agr-m-gallery div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__image:only-child{flex-basis:100%!important;width:100%!important}
body.agr-m-gallery div.product:is(#product-4761,.product) .woocommerce-product-gallery .woocommerce-product-gallery__image>a{display:block}
body.agr-m-gallery .agr-gdots{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin:0}
body.agr-m-gallery .agr-gdots span{width:6px;height:6px;border-radius:3px;background:#D1D5DB;transition:width .2s ease,background-color .2s ease}
body.agr-m-gallery .agr-gdots span.on{width:18px;background:var(--agr-brand)}