/*
 * Universal Plywood — Switchable Product Catalogue Layout v1.1.94
 * Original mode intentionally has no visual overrides.
 */
.up-product-card__hover-preview{display:none!important}

/* Compact catalogue is scoped to real catalogue pages/modules so homepage cards
   and unrelated Elementor card components keep their existing design. */
body.up-catalogue-layout-compact .up-products-module .up-catalogue-organised-grid,
body.up-catalogue-layout-compact .up-product-category-module .up-catalogue-organised-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:30px!important;
  row-gap:0!important;
  align-items:stretch!important;
}

body.up-catalogue-layout-compact .up-products-module>.up-product-filter,
body.up-catalogue-layout-compact .up-product-category-module>.up-product-filter{
  margin-bottom:48px!important;
}

body.up-catalogue-layout-compact .up-products-module .up-catalogue-organised-grid>.up-product-card,
body.up-catalogue-layout-compact .up-product-category-module .up-catalogue-organised-grid>.up-product-card{
  position:relative!important;
  z-index:1;
  display:grid!important;
  grid-template-columns:var(--up-catalogue-compact-thumb,118px) minmax(0,1fr)!important;
  grid-template-rows:auto auto 1fr!important;
  column-gap:24px!important;
  align-items:start!important;
  min-height:calc(var(--up-catalogue-compact-thumb,118px) + 42px)!important;
  padding:21px 0 24px!important;
  margin:0!important;
  border:0!important;
  border-bottom:1px solid rgba(41,39,34,.20)!important;
  background:transparent!important;
  overflow:visible!important;
  text-align:left!important;
}

body.up-catalogue-layout-compact .up-products-module .up-catalogue-organised-grid>.up-product-card:hover,
body.up-catalogue-layout-compact .up-product-category-module .up-catalogue-organised-grid>.up-product-card:hover{
  z-index:60!important;
}

body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card .up-product-card__image{
  grid-column:1!important;
  grid-row:1 / span 3!important;
  width:var(--up-catalogue-compact-thumb,118px)!important;
  height:var(--up-catalogue-compact-thumb,118px)!important;
  min-width:var(--up-catalogue-compact-thumb,118px)!important;
  max-width:var(--up-catalogue-compact-thumb,118px)!important;
  aspect-ratio:1/1!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#f7f6f2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  position:relative!important;
  z-index:2!important;
}

html body.up-catalogue-layout-compact .up-product-card__image img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  transition:opacity .22s ease!important;
}
html body.up-catalogue-layout-compact .up-product-card__image:hover img{opacity:.86!important}

body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card .up-product-card__brand{
  grid-column:2!important;
  grid-row:1!important;
  align-self:end!important;
  color:#9d988e!important;
  font-size:13px!important;
  line-height:16px!important;
  letter-spacing:-.01em!important;
  text-transform:lowercase!important;
  margin:0 0 8px!important;
  padding:0!important;
}

body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card h3{
  grid-column:2!important;
  grid-row:2!important;
  color:#27231f!important;
  font-size:var(--up-catalogue-compact-title,30px)!important;
  line-height:1.02!important;
  letter-spacing:-.047em!important;
  font-weight:400!important;
  text-transform:lowercase!important;
  margin:0 0 10px!important;
  padding:0!important;
}

body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card .up-product-card__view{
  grid-column:2!important;
  grid-row:3!important;
  align-self:start!important;
  justify-self:start!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  gap:8px!important;
  color:#27231f!important;
  font-size:14px!important;
  line-height:18px!important;
  letter-spacing:-.01em!important;
  text-transform:lowercase!important;
}
body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card .up-product-card__view>span:last-child{
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  font-size:17px!important;
  line-height:1!important;
}

body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card:hover h3,
body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card:hover .up-product-card__view,
body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card:focus-visible h3,
body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card:focus-visible .up-product-card__view{
  color:var(--up-green,#62a744)!important;
}

/* Premium hover magnifier: appears only when the actual thumbnail is hovered,
   floats over the text area and never changes row height or surrounding cards. */
@media (min-width:1001px){
  body.up-catalogue-layout-compact.up-catalogue-hover-preview-enabled .up-catalogue-organised-grid>.up-product-card .up-product-card__hover-preview{
    display:block!important;
    position:absolute!important;
    left:calc(var(--up-catalogue-compact-thumb,118px) + 18px)!important;
    top:50%!important;
    width:var(--up-catalogue-hover-size,440px)!important;
    height:var(--up-catalogue-hover-size,440px)!important;
    max-width:min(48vw,var(--up-catalogue-hover-size,440px))!important;
    max-height:min(70vh,var(--up-catalogue-hover-size,440px))!important;
    padding:14px!important;
    margin:0!important;
    background:#fff!important;
    border:1px solid rgba(41,39,34,.12)!important;
    box-shadow:0 20px 55px rgba(31,28,24,.19)!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateY(-50%) scale(.94)!important;
    transform-origin:left center!important;
    transition:opacity .18s ease,transform .22s ease,visibility 0s linear .22s!important;
    z-index:80!important;
  }
  body.up-catalogue-layout-compact.up-catalogue-hover-preview-enabled .up-catalogue-organised-grid>.up-product-card .up-product-card__hover-preview img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    object-fit:var(--up-catalogue-hover-fit,contain)!important;
    object-position:center!important;
      background:#f7f6f2!important;
  }
  body.up-catalogue-layout-compact.up-catalogue-hover-preview-enabled .up-catalogue-organised-grid>.up-product-card .up-product-card__image:hover~.up-product-card__hover-preview,
  body.up-catalogue-layout-compact.up-catalogue-hover-preview-enabled .up-catalogue-organised-grid>.up-product-card:focus-visible .up-product-card__hover-preview{
    opacity:1!important;
    visibility:visible!important;
    transform:translateY(-50%) scale(1)!important;
    transition-delay:0s!important;
  }
}

/* Tablet/mobile stay compact but become one clean row per product; hover preview
   is intentionally disabled because touch devices use the product modal. */
@media (max-width:1000px){
  body.up-catalogue-layout-compact .up-products-module .up-catalogue-organised-grid,
  body.up-catalogue-layout-compact .up-product-category-module .up-catalogue-organised-grid{
    grid-template-columns:1fr!important;
    column-gap:0!important;
  }
}

@media (max-width:640px){
  body.up-catalogue-layout-compact .up-products-module .up-catalogue-organised-grid>.up-product-card,
  body.up-catalogue-layout-compact .up-product-category-module .up-catalogue-organised-grid>.up-product-card{
    grid-template-columns:92px minmax(0,1fr)!important;
    column-gap:18px!important;
    min-height:128px!important;
    padding:18px 0 20px!important;
  }
  body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card .up-product-card__image{
    width:92px!important;
    height:92px!important;
    min-width:92px!important;
    max-width:92px!important;
  }
  body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card .up-product-card__brand{
    font-size:11px!important;
    line-height:14px!important;
    margin-bottom:6px!important;
  }
  body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card h3{
    font-size:22px!important;
    line-height:1.04!important;
    margin-bottom:8px!important;
  }
  body.up-catalogue-layout-compact .up-catalogue-organised-grid>.up-product-card .up-product-card__view{
    font-size:12px!important;
    line-height:15px!important;
  }
}

/* v1.1.99 — restored classic catalogue with configurable desktop density.
   Loaded last so it intentionally wins over older three-column Figma locks. */
@media (min-width:1025px){
  body.up-catalogue-layout-original .up-products-module .up-catalogue-organised-grid,
  body.up-catalogue-layout-original .up-product-category-module .up-catalogue-organised-grid,
  body.up-catalogue-layout-original .up-brand-detail-product-grid.up-catalogue-organised-grid{
    grid-template-columns:repeat(var(--up-catalogue-columns,4),minmax(0,1fr))!important;
    gap:72px clamp(22px,2vw,36px)!important;
    align-items:start!important;
  }
}

/* Preserve the established responsive behaviour regardless of the desktop choice. */
@media (min-width:768px) and (max-width:1024px){
  body.up-catalogue-layout-original .up-products-module .up-catalogue-organised-grid,
  body.up-catalogue-layout-original .up-product-category-module .up-catalogue-organised-grid,
  body.up-catalogue-layout-original .up-brand-detail-product-grid.up-catalogue-organised-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width:767px){
  body.up-catalogue-layout-original .up-products-module .up-catalogue-organised-grid,
  body.up-catalogue-layout-original .up-product-category-module .up-catalogue-organised-grid,
  body.up-catalogue-layout-original .up-brand-detail-product-grid.up-catalogue-organised-grid{
    grid-template-columns:1fr!important;
  }
}
