/* =========================================================
   LA FEMEIA — EDITORIAL SKINCARE CARDS
   Additive stylesheet loaded after the pre-existing products.css.
   Leaves the existing grid AJAX and cart logic intact.
   ========================================================= */
body .bb-product-grid > li.product.lf-card,
body .products > li.product.lf-card {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 6px 6px 14px !important;
    display: flex !important;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e8dfd2 !important;
    border-radius: 26px !important;
    background: #fcfaf6 !important;
    box-shadow: 0 8px 22px rgba(51,40,26,.055);
    text-align: left !important;
    overflow: hidden;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
body li.product.lf-card:hover {
    transform: translateY(-4px);
    border-color: #d2b68b !important;
    box-shadow: 0 18px 35px rgba(51,40,26,.12);
}
body ul.bb-product-grid,
body ul.products:has(> li.product.lf-card) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: clamp(12px,2vw,26px) !important;
    list-style: none;
}
body li.product.lf-card .bb-product-media {
    position: relative;
    display: block;
    height: auto !important;
    aspect-ratio: 4/4.7;
    border-radius: 21px 21px 22px 22px !important;
    background: #f0e2d4;
    overflow: hidden;
    isolation: isolate;
}
body li.product.lf-card .bb-product-image-link {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%; height: 100%;
    border-radius: inherit;
    overflow: hidden;
}
body li.product.lf-card .bb-product-image-link img.bb-img-main,
body li.product.lf-card .bb-product-image-link img.bb-img-hover {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    transition: opacity .55s ease, transform .8s cubic-bezier(.22,.61,.36,1);
}
body li.product.lf-card .bb-img-main { opacity: 1; }
body li.product.lf-card .bb-img-hover { opacity: 0; }
body li.product.lf-card:hover .bb-img-hover { opacity: 1; }
body li.product.lf-card:hover .bb-product-image-link img { transform: scale(1.035); }
body li.product.lf-card .bb-badge {
    position: absolute !important;
    z-index: 3;
    left: 12px !important; top: 12px !important; right: auto !important;
    padding: 6px 11px !important;
    border: 0 !important;
    border-radius: 50px !important;
    font: 600 10px/1.2 'DM Sans',Arial,sans-serif !important;
    letter-spacing: .04em;
    color: #55402c !important;
    background: rgba(255,253,249,.94) !important;
}
body li.product.lf-card .lf-card-price-badge {
    position: absolute;
    z-index: 3;
    top: 10px; right: 10px;
    max-width: calc(100% - 24px);
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255,253,249,.94);
    color: #28201b;
    font: 600 12px/1.2 'DM Sans',Arial,sans-serif;
    text-align: right;
    box-shadow: 0 2px 9px rgba(27,22,18,.08);
}
body li.product.lf-card .lf-card-price-badge del { font-size: 10px; color: #8d8274; opacity: .85; }
body li.product.lf-card .lf-card-price-badge ins { background: transparent; text-decoration: none; }
body li.product.lf-card .lf-card-offer-ribbon {
    position: absolute;
    z-index: 3;
    left: 0; bottom: 0; right: 0;
    padding: 9px 12px;
    color: #fffefc;
    background: #977747;
    text-align: center;
    font: 600 10px/1.35 'DM Sans',Arial,sans-serif;
    letter-spacing: .09em;
}
body li.product.lf-card .bb-product-info {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 15px 13px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
}
body li.product.lf-card .bb-product-cat {
    margin: 0 !important;
    font: 600 10px/1.3 'DM Sans',Arial,sans-serif;
    color: #a1804e;
    letter-spacing: .12em;
    text-transform: uppercase;
}
body li.product.lf-card .lf-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 9px;
}
body li.product.lf-card .bb-product-title {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    font: 600 clamp(19px,1.7vw,26px)/1.08 'Cormorant Garamond',Georgia,serif !important;
    letter-spacing: -.02em;
    text-transform: none;
}
body li.product.lf-card .bb-product-title a { color: #241e19 !important; text-decoration: none !important; }
body li.product.lf-card .bb-product-title a:hover { color: #967444 !important; }
body li.product.lf-card .bb-btn-quick {
    display: inline-flex !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    margin: 1px 0 0 !important;
    padding: 2px 0 3px !important;
    border: 0 !important;
    border-bottom: 1px solid #a88a58 !important;
    border-radius: 0 !important;
    background: none !important;
    color: #785c34 !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    font: 500 11px/1.35 'DM Sans',Arial,sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
body li.product.lf-card .bb-btn-quick:hover { color: #1e1a16 !important; border-color: #1e1a16 !important; }
body li.product.lf-card .bb-product-price { display: none !important; }
body li.product.lf-card .lf-card-ingredients {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
}
body li.product.lf-card .lf-card-ingredient {
    display: inline-block;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eae8dc;
    color: #71684d;
    font: 500 10px/1.15 'DM Sans',Arial,sans-serif;
    overflow-wrap: anywhere;
}
/* Existing modal: additional ingredient names and live promotional reward only. */
#bb-quickview-modal .lf-qv-ingredients {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 12px 0;
}
#bb-quickview-modal .lf-qv-ingredients[hidden],
#bb-quickview-modal .lf-qv-offer[hidden],
#bb-quickview-modal .lf-qv-timer[hidden] { display: none !important; }
#bb-quickview-modal .lf-qv-ingredients span {
    background: #f2ecdf; border-radius: 50px;
    padding: 6px 10px; color: #715e3e;
    font: 500 11px/1.3 'DM Sans',Arial,sans-serif;
}
#bb-quickview-modal .lf-qv-offer {
    padding: 13px;
    margin: 14px 0;
    border: 1px solid #d8ba8a;
    border-radius: 14px;
    background: #fff8eb;
    color: #251e16;
}
#bb-quickview-modal .lf-qv-offer-heading {
    margin-bottom: 9px;
    color: #86652d;
    font: 700 10px/1.3 'DM Sans',Arial,sans-serif;
    letter-spacing: .13em;
}
#bb-quickview-modal .lf-qv-offer-row { display: flex; align-items: center; gap: 11px; }
#bb-quickview-modal .lf-qv-offer-row img {
    width: 63px; height: 63px; border-radius: 9px;
    object-fit: cover; flex-shrink: 0;
}
#bb-quickview-modal .lf-qv-offer-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#bb-quickview-modal #lf-qv-offer-buy { font: 500 10px 'DM Sans',Arial,sans-serif; color: #967444; }
#bb-quickview-modal #lf-qv-offer-name { font: 600 19px/1.05 'Cormorant Garamond',Georgia,serif; overflow-wrap: anywhere; }
#bb-quickview-modal #lf-qv-offer-price { font: 500 11px 'DM Sans',Arial,sans-serif; color: #685c4a; }
#bb-quickview-modal #lf-qv-offer-badge {
    padding: 7px 9px; border-radius: 8px;
    color: #271e13; background: #d6b273;
    font: 800 10px 'DM Sans',Arial,sans-serif;
    white-space: nowrap;
}
#bb-quickview-modal .lf-qv-timer { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; font: 500 11px 'DM Sans',Arial,sans-serif; color: #856632; }
#bb-quickview-modal .lf-qv-timer strong { color: #241e19; font-variant-numeric: tabular-nums; }
#bb-quickview-modal .lf-qv-offer small { display: block; margin-top: 8px; font: 400 10px/1.5 'DM Sans',Arial,sans-serif; color: #776c5e; }
@media (max-width: 1150px) {
    body ul.bb-product-grid, body ul.products:has(> li.product.lf-card) { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 800px) {
    body ul.bb-product-grid, body ul.products:has(> li.product.lf-card) { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body li.product.lf-card .lf-card-heading { flex-wrap: wrap; }
}
@media (max-width: 520px) {
    body ul.bb-product-grid, body ul.products:has(> li.product.lf-card) { gap: 10px !important; }
    body .bb-product-grid > li.product.lf-card, body .products > li.product.lf-card { border-radius: 17px !important; padding: 4px 4px 11px !important; }
    body li.product.lf-card .bb-product-media { border-radius: 14px !important; }
    body li.product.lf-card .bb-product-info { padding: 10px 8px 0 !important; gap: 6px; }
    body li.product.lf-card .bb-product-title { font-size: 19px !important; }
    body li.product.lf-card .lf-card-price-badge { top: 6px; right: 6px; padding: 5px 7px; font-size: 10px; }
    body li.product.lf-card .bb-badge { top: 6px !important; left: 6px !important; padding: 5px 7px !important; font-size: 9px !important; }
    body li.product.lf-card .lf-card-offer-ribbon { padding: 6px; font-size: 8px; }
    body li.product.lf-card .lf-card-ingredient { font-size: 9px; padding: 5px 7px; }
    body li.product.lf-card .bb-btn-quick { font-size: 10px !important; }
}
@media (prefers-reduced-motion:reduce) {
    body li.product.lf-card, body li.product.lf-card img { transition: none !important; }
}


/* =========================================================
   QUICK VIEW — TOUCH SCROLL FIX (MOBILE)
   Extends the existing product card styling without changing JS.
   ========================================================= */
@media (max-width: 768px) {
  #bb-quickview-modal.bb-modal {
    position: fixed;
    inset: 0;
    height: 100dvh;
    align-items: flex-end;
    overflow: hidden;
    z-index: 99999;
  }
  #bb-quickview-modal .bb-modal-content {
    display: block;
    flex: 0 1 auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 92vh;
    max-height: 92dvh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    border-radius: 22px 22px 0 0;
    scrollbar-width: thin;
  }
  #bb-quickview-modal .bb-modal-grid {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  #bb-quickview-modal .bb-modal-image-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    height: clamp(180px, 46vw, 260px);
  }
  #bb-quickview-modal .bb-modal-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible !important;
    padding: 22px 20px calc(30px + env(safe-area-inset-bottom, 0px));
  }
  #bb-quickview-modal .bb-modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px -52px 0;
    z-index: 30;
    background: #fffdf9;
  }
  #bb-quickview-modal .lf-qv-offer,
  #bb-quickview-modal .lf-qv-ingredients,
  #bb-quickview-modal .bb-modal-actions { flex-shrink: 0; }
}
@media (max-width: 480px) {
  #bb-quickview-modal .bb-modal-image-wrap { height: 210px; }
  #bb-quickview-modal .bb-modal-details { padding-inline: 16px; }
}
