
/* Mobile Cart DIV Layout v2.8 (12.9.59.41) */
:root{ --avv-gap:12px; --avv-radius:12px; --avv-shadow:0 2px 8px rgba(0,0,0,.06); --avv-border:#e5e7eb; --avv-soft:#f8fafc; }
@media (max-width:768px){
  .avv-m2-card{ direction:ltr; position:relative; display:grid; grid-template-columns:150px 1fr; grid-template-areas:"header header" "thumb info" "bottom bottom"; gap:var(--avv-gap); background:#fff; border:1px solid var(--avv-border); border-radius:var(--avv-radius); box-shadow:var(--avv-shadow); padding:calc(var(--avv-gap) + 6px) var(--avv-gap) var(--avv-gap); margin:0 0 var(--avv-gap) 0; }
  .avv-m2-header,.avv-m2-title,.avv-m2-info,.avv-m2-bottomcard{ direction:rtl; }
  .avv-m2-header{ grid-area:header; display:flex; align-items:flex-start; gap:10px; min-height:24px; }
  .avv-m2-title{ font-size:14px; line-height:1.45; margin:0; padding-inline-start:0; padding-inline-end:10px; text-align:right; color:#000; font-weight:700; }
  .avv-m2-title a{ font-size:14px; line-height:1.45; font-weight:600; color:#000 !important; text-decoration:none; }
  .avv-m2-remove{ position:absolute; top:8px; left:var(--avv-gap); z-index:5; }
  .avv-m2-thumb{ grid-area:thumb; display:flex; align-items:center; justify-content:center; }
  .avv-m2-thumb a{ display:block; width:150px; height:150px; }
  .avv-m2-thumb img{ width:100%; height:100%; object-fit:contain; }
  .avv-m2-info{ grid-area:info; display:flex; flex-direction:column; gap:8px; }
  .avv-m2-list{ padding:0; margin:0; list-style:none; }
  .avv-m2-list li{ font-size:14px; line-height:1.5; }
  .avv-m2-sku{ opacity:.9; font-weight:600; }
  .avv-m2-view a{ display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; border-radius:12px; border:1px solid #d1d5db; text-decoration:none; font-weight:600; }
  .avv-m2-bottom{ grid-area:bottom; }
  .avv-m2-bottomcard{ display:flex; align-items:center; gap:12px; background:var(--avv-soft); border:1px solid var(--avv-border); border-radius:14px; padding:10px 12px; }
  .avv-m2-bottomcard .quantity{ flex:0 0 auto; }
  .avv-m2-price{ margin-inline-start:auto; font-weight:700; font-size:15px; }
  .woocommerce-cart .shop_table.cart tr.cart_item > td, .woocommerce-page .shop_table.cart tr.cart_item > td, tr.woocommerce-cart-form__cart-item > td{ position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; overflow:hidden !important; padding:0 !important; border:0 !important; margin:0 !important; }
  .avv-m2-remove a.remove{ display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:12px; background:#ff8fa3; border:1px solid #ff7891; box-shadow:0 1px 2px rgba(0,0,0,.08); }
  .avv-m2-remove a.remove .avv-x svg{ width:16px; height:16px; display:block; }
  .avv-m2-remove a.remove .avv-x path{ stroke:#fff; stroke-width:2; stroke-linecap:round; }
}
@media (prefers-color-scheme:dark){
  @media (max-width:768px){
    .avv-m2-card{ background:#0b0d10; border-color:#1f2937; }
    .avv-m2-bottomcard{ background:#0e1319; border-color:#1f2937; }
    .avv-m2-view a{ border-color:#374151; color:#e5e7eb; }
  }
}

@media (max-width: 768px){
  .avv-m2-remove a.remove .avv-x path{
    stroke:#fff;
    stroke-width:3px;
    stroke-linecap:round;
  }
  /* Remove any theme-provided circular 'i' icon */
  .avv-m2-remove a.remove .icon{ display:none !important; }
  .avv-m2-remove a.remove:before,
  .avv-m2-remove a.remove:after{ content:none !important; display:none !important; }
}

/* Force 150x150 thumbnail strictly for our mobile card */
@media (max-width: 768px){
  .woocommerce-cart .shop_table.cart tr.cart_item .avv-m2-card .avv-m2-thumb,
  .woocommerce-page .shop_table.cart tr.cart_item .avv-m2-card .avv-m2-thumb{
    display:flex; align-items:center; justify-content:center;
    width:150px !important; height:150px !important;
  }
  .woocommerce-cart .shop_table.cart tr.cart_item .avv-m2-card .avv-m2-thumb a,
  .woocommerce-page .shop_table.cart tr.cart_item .avv-m2-card .avv-m2-thumb a{
    display:block !important; width:150px !important; height:150px !important;
  }
  .woocommerce-cart .shop_table.cart tr.cart_item .avv-m2-card .avv-m2-thumb img,
  .woocommerce-page .shop_table.cart tr.cart_item .avv-m2-card .avv-m2-thumb img{
    width:150px !important; height:150px !important;
    max-width:150px !important; max-height:150px !important;
    object-fit: contain !important; border-radius:5px !important;
  }
}

@media (max-width: 768px){
  /* Ensure thumb+info row is at least 150px so we can align button bottom with image */
  .avv-m2-card .avv-m2-thumb,
  .avv-m2-card .avv-m2-info{
    min-height: 150px;
  }
  /* Push the view button to bottom of the info column */
  .avv-m2-card .avv-m2-view{
    margin-top: auto;
  }
}


/* --- Dark-mode safety overrides for mobile cart (avv fix 2025-09-21) --- */
@media (prefers-color-scheme: dark) and (max-width: 768px){
  .avv-m2-card{
    background:#fff !important;
    border-color:#e5e7eb !important;
    box-shadow: var(--avv-shadow, 0 2px 8px rgba(0,0,0,.06)) !important;
  }
  .avv-m2-bottomcard{
    background:#f8fafc !important;
    border-color:#e5e7eb !important;
  }
}
