/* Frero Market v1.6.8 — compact cart row hotfix. Checkout and recommendation cards intentionally untouched. */

/* WooCommerce/Astra can re-surface the subtotal cell. If it remains in the CSS grid it creates an implicit
   extra row and makes every cart item look almost twice as tall. Hide it with stronger cart-only selectors. */
body.woocommerce-cart form.woocommerce-cart-form table.shop_table.cart tbody tr.cart_item td.product-subtotal,
body.woocommerce-cart form.woocommerce-cart-form table.shop_table.cart tbody tr.woocommerce-cart-form__cart-item td.product-subtotal,
body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td[data-title="Subtotal"],
body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td[data-title="Product subtotal"],
body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td[class*="product-subtotal"]{
  display:none!important;
  visibility:hidden!important;
  position:absolute!important;
  width:0!important;
  height:0!important;
  min-width:0!important;
  min-height:0!important;
  max-width:0!important;
  max-height:0!important;
  overflow:hidden!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  font-size:0!important;
  line-height:0!important;
}
body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-subtotal::before,
body.woocommerce-cart form.woocommerce-cart-form tr.cart_item > td.product-subtotal::after{
  display:none!important;
  content:none!important;
}

/* Desktop cart row: fixed explicit grid positions prevent implicit rows and keep the L-Market-like compact card. */
@media (min-width:901px){
  body.woocommerce-cart form.woocommerce-cart-form tr.woocommerce-cart-form__cart-item,
  body.woocommerce-cart form.woocommerce-cart-form tr.cart_item{
    display:grid!important;
    grid-template-columns:88px minmax(0,1fr) 105px!important;
    grid-template-rows:22px 20px 38px!important;
    grid-template-areas:none!important;
    column-gap:16px!important;
    row-gap:5px!important;
    align-items:start!important;
    align-content:center!important;
    min-height:0!important;
    height:116px!important;
    max-height:116px!important;
    padding:12px 14px!important;
    margin:0 0 10px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  body.woocommerce-cart tr.cart_item td.product-thumbnail{
    grid-column:1!important;
    grid-row:1 / 4!important;
    align-self:center!important;
  }
  body.woocommerce-cart td.product-thumbnail a,
  body.woocommerce-cart td.product-thumbnail img{
    width:82px!important;
    height:82px!important;
    min-width:82px!important;
    max-width:82px!important;
    min-height:82px!important;
    max-height:82px!important;
  }

  body.woocommerce-cart tr.cart_item td.product-name{
    grid-column:2!important;
    grid-row:1!important;
    align-self:end!important;
    min-height:0!important;
    height:auto!important;
    padding:0!important;
  }
  body.woocommerce-cart tr.cart_item td.product-price{
    grid-column:2!important;
    grid-row:2!important;
    align-self:center!important;
    min-height:0!important;
    height:auto!important;
  }
  body.woocommerce-cart tr.cart_item td.product-quantity{
    grid-column:2!important;
    grid-row:3!important;
    align-self:end!important;
    min-height:0!important;
    height:38px!important;
    margin:0!important;
  }
  body.woocommerce-cart .quantity.frero-cart-qty .frero-qty-btn,
  body.woocommerce-cart .quantity.frero-cart-qty input.qty{
    height:34px!important;
    min-height:34px!important;
  }
  body.woocommerce-cart .quantity.frero-cart-qty .frero-qty-btn{width:36px!important}
  body.woocommerce-cart .quantity.frero-cart-qty input.qty{width:48px!important;min-width:48px!important}

  body.woocommerce-cart tr.cart_item td.product-remove{
    grid-column:3!important;
    grid-row:1 / 4!important;
    align-self:center!important;
    justify-self:end!important;
  }
}

/* Remove must be plain red text — suppress every possible theme/plugin × icon. */
body.woocommerce-cart td.product-remove a.remove{
  font-size:0!important;
  color:transparent!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:5px 0!important;
  min-width:0!important;
  width:auto!important;
  height:auto!important;
}
body.woocommerce-cart td.product-remove a.remove > *{
  display:none!important;
}
body.woocommerce-cart td.product-remove a.remove::before{
  display:none!important;
  visibility:hidden!important;
  content:none!important;
  width:0!important;
  height:0!important;
}
body.woocommerce-cart td.product-remove a.remove::after{
  display:inline!important;
  visibility:visible!important;
  content:"Remove"!important;
  color:#ff4d58!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:800!important;
}
body.woocommerce-cart td.product-remove a.remove:hover::after{color:#ff737b!important}

/* Keep sensible compact proportions on tablets/phones without forcing a fixed desktop height. */
@media (max-width:900px){
  body.woocommerce-cart form.woocommerce-cart-form tr.woocommerce-cart-form__cart-item,
  body.woocommerce-cart form.woocommerce-cart-form tr.cart_item{
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    align-content:start!important;
  }
}

/* v1.6.9: recommendation row can contain up to six products; keep four comfortable cards per desktop row. */
@media (min-width:1025px){
  body.woocommerce-cart .cross-sells ul.products{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
