/*
 * Office Choice Kenya — responsive commerce polish
 * v0.9.4
 * Loaded after all historical/theme presentation layers.
 * Header is intentionally excluded.
 */

/* Product-card geometry must stay stable inside 2-column mobile grids. */
html body.ock-site .ock-product-card,
html body.ock-site .ock-home-product,
html body.ock-site .ock-product-card__body,
html body.ock-site .ock-home-product__body,
html body.ock-site .ock-product-card__actions,
html body.ock-site .ock-home-product__actions{
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Normalise the last visible donor-era tints on cards. */
html body.ock-site .ock-product-card,
html body.ock-site .ock-loop-item .ock-product-card,
html body.ock-site .ock-home-product{
  background:#E6EDEF!important;
  border-color:rgba(255,255,255,.82)!important;
}
html body.ock-site .ock-product-card__body,
html body.ock-site .ock-home-product__body{background:transparent!important}
html body.ock-site .ock-product-card__meta,
html body.ock-site .ock-product-card__meta a,
html body.ock-site .ock-home-product__category{color:#14758A!important}
html body.ock-site .ock-product-card del,
html body.ock-site .ock-home-product del,
html body.ock-site .ock-product-card del .woocommerce-Price-amount,
html body.ock-site .ock-home-product del .woocommerce-Price-amount{
  color:#718287!important;
  opacity:1!important;
}
html body.ock-site .ock-product-card__commerce,
html body.ock-site .ock-home-product__meta{border-color:rgba(16,46,54,.10)!important}

/* WhatsApp is the primary conversion action. Never allow theme button widths to collapse it. */
html body.ock-site .ock-product-card-v5 .ock-product-card__actions.has-whatsapp,
html body.ock-site .ock-home-product__actions.has-whatsapp{
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 42px!important;
  align-items:stretch!important;
  gap:8px!important;
}
html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-primary,
html body.ock-site .ock-home-product__whatsapp--primary{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:42px!important;
  height:42px!important;
  margin:0!important;
  padding:0 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  box-sizing:border-box!important;
  border:0!important;
  border-radius:9px!important;
  background:#25D366!important;
  color:#fff!important;
  font:800 11px/1 Inter,Arial,sans-serif!important;
  text-decoration:none!important;
  text-indent:0!important;
  letter-spacing:0!important;
  box-shadow:6px 6px 14px rgba(36,137,73,.22),-5px -5px 13px rgba(255,255,255,.90)!important;
  transition:transform .24s cubic-bezier(.22,.61,.36,1),box-shadow .24s ease,background .24s ease!important;
}
html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-primary svg,
html body.ock-site .ock-home-product__whatsapp--primary svg{
  position:static!important;
  display:block!important;
  flex:0 0 17px!important;
  width:17px!important;
  height:17px!important;
  margin:0!important;
  transform:none!important;
  fill:currentColor!important;
}
html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-label,
html body.ock-site .ock-home-product__whatsapp-label{
  position:static!important;
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  color:#fff!important;
  font:inherit!important;
  line-height:1!important;
  text-align:center!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  transform:none!important;
}
html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-primary:hover,
html body.ock-site .ock-home-product__whatsapp--primary:hover{
  background:#20C760!important;
  color:#fff!important;
  transform:translateY(-2px)!important;
  box-shadow:8px 8px 17px rgba(36,137,73,.25),-7px -7px 16px rgba(255,255,255,.94)!important;
}
html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-primary:active,
html body.ock-site .ock-home-product__whatsapp--primary:active{
  transform:translateY(0)!important;
  box-shadow:inset 4px 4px 9px rgba(11,110,49,.30),inset -3px -3px 7px rgba(255,255,255,.20)!important;
}

/* The secondary cart/variation control remains tactile but visually subordinate. */
html body.ock-site .ock-product-card-v5 .ock-product-card__cart-mini,
html body.ock-site .ock-home-product__cart--secondary{
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(255,255,255,.82)!important;
  border-radius:9px!important;
  background:#E6EDEF!important;
  color:#14758A!important;
  box-shadow:5px 5px 12px rgba(83,104,110,.18),-5px -5px 12px rgba(255,255,255,.92)!important;
  transition:transform .22s ease,box-shadow .22s ease,color .22s ease!important;
}
html body.ock-site .ock-product-card-v5 .ock-product-card__cart-mini:hover,
html body.ock-site .ock-home-product__cart--secondary:hover{
  transform:translateY(-2px)!important;
  color:#08A4C1!important;
  box-shadow:7px 7px 15px rgba(83,104,110,.20),-7px -7px 15px rgba(255,255,255,.95)!important;
}
html body.ock-site .ock-product-card-v5 .ock-product-card__cart-mini:active,
html body.ock-site .ock-home-product__cart--secondary:active{
  transform:none!important;
  box-shadow:inset 4px 4px 9px rgba(83,104,110,.18),inset -4px -4px 9px rgba(255,255,255,.88)!important;
}

/* Keep commerce rows compact and prevent text from pushing actions out of the card. */
html body.ock-site .ock-product-card__commerce,
html body.ock-site .ock-home-product__meta{
  min-width:0!important;
}
html body.ock-site .ock-product-card__title,
html body.ock-site .ock-home-product h3{
  overflow-wrap:anywhere!important;
}
html body.ock-site .ock-product-card .ock-price,
html body.ock-site .ock-home-product__price{
  min-width:0!important;
}

/* Mobile: maintain the 2-column catalogue while keeping both conversion actions usable. */
@media(max-width:767px){
  html body.ock-site .ock-product-card-v5 .ock-product-card__actions.has-whatsapp,
  html body.ock-site .ock-home-product__actions.has-whatsapp{
    grid-template-columns:minmax(0,1fr) 40px!important;
    gap:7px!important;
    margin-top:10px!important;
  }
  html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-primary,
  html body.ock-site .ock-home-product__whatsapp--primary{
    width:100%!important;
    min-height:40px!important;
    height:40px!important;
    padding:0 7px!important;
    gap:5px!important;
    border-radius:8px!important;
    font-size:10px!important;
  }
  html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-primary svg,
  html body.ock-site .ock-home-product__whatsapp--primary svg{
    flex-basis:15px!important;
    width:15px!important;
    height:15px!important;
  }
  html body.ock-site .ock-product-card-v5 .ock-product-card__cart-mini,
  html body.ock-site .ock-home-product__cart--secondary{
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    border-radius:8px!important;
  }
  html body.ock-site .ock-product-card,
  html body.ock-site .ock-home-product{
    overflow:hidden!important;
  }
}

/* Very narrow phones still show the full WhatsApp brand label; reduce typography before hiding it. */
@media(max-width:360px){
  html body.ock-site .ock-product-card-v5 .ock-product-card__actions.has-whatsapp,
  html body.ock-site .ock-home-product__actions.has-whatsapp{
    grid-template-columns:minmax(0,1fr) 36px!important;
    gap:5px!important;
  }
  html body.ock-site .ock-product-card-v5 .ock-product-card__whatsapp-primary,
  html body.ock-site .ock-home-product__whatsapp--primary{
    min-height:38px!important;
    height:38px!important;
    padding-inline:5px!important;
    font-size:9px!important;
  }
  html body.ock-site .ock-product-card-v5 .ock-product-card__cart-mini,
  html body.ock-site .ock-home-product__cart--secondary{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:38px!important;
    min-height:38px!important;
  }
}
