/* =========================================================
   LBDA ADD TO BAG DRAWER — v1.0.2
========================================================= */

:root {
  --lbda-burgundy: #510617;
  --lbda-burgundy-deep: #3d0311;
  --lbda-champagne: #F9E4D2;
  --lbda-ivory: #FFFAF6;
  --lbda-ink: #2a151a;
}

body.lbda-bag-open {
  overflow: hidden !important;
}


/* =========================================================
   BACKDROP
========================================================= */

.lbda-bag-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999998;

  background: rgba(30, 7, 13, .38);

  backdrop-filter: blur(2.5px);

  opacity: 0;

  transition: opacity .28s ease;
}

.lbda-bag-backdrop.is-open {
  opacity: 1;
}


/* =========================================================
   DRAWER
========================================================= */

.lbda-bag-drawer {
  position: fixed;

  top: 0;
  right: 0;

  z-index: 999999;

  width: min(438px, 92vw);
  height: 100dvh;

  display: flex;
  flex-direction: column;

  background: var(--lbda-ivory);

  border-left: 1px solid rgba(81, 6, 23, .10);

  box-shadow:
    -20px 0 60px rgba(31, 7, 13, .16);

  transform: translateX(102%);

  transition:
    transform .38s cubic-bezier(.22,.61,.36,1);

  color: var(--lbda-ink);

  font-family: "Montserrat", sans-serif;
}

.lbda-bag-drawer.is-open {
  transform: translateX(0);
}


/* =========================================================
   HEADER
========================================================= */

.lbda-bag-drawer__top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding:
    20px
    24px
    16px;

  border-bottom:
    1px solid
    rgba(81, 6, 23, .10);
}

.lbda-bag-brand__mark {
  display: block;

  margin: 0 0 4px;

  font-family: "Italiana", Georgia, serif;

  font-size: 12px;

  font-weight: 400;

  line-height: 1;

  letter-spacing: .12em;

  color: rgba(81, 6, 23, .62);
}

.lbda-bag-drawer__top h2 {
  margin: 0 !important;

  font-family:
    "Italiana",
    Georgia,
    serif !important;

  font-size: 30px !important;

  font-weight: 400 !important;

  line-height: 1 !important;

  color: var(--lbda-burgundy) !important;
}

.lbda-bag-drawer__close {
  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  margin: 0;
  padding: 0 0 3px;

  border:
    1px solid
    rgba(81, 6, 23, .18);

  border-radius: 999px;

  background: transparent;

  color: var(--lbda-burgundy);

  font-size: 23px;
  font-weight: 300;

  line-height: 1;

  cursor: pointer;

  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.lbda-bag-drawer__close:hover,
.lbda-bag-drawer__close:focus-visible {
  background: var(--lbda-burgundy);

  border-color: var(--lbda-burgundy);

  color: var(--lbda-champagne);
}


/* =========================================================
   SUCCESS MESSAGE
========================================================= */

.lbda-bag-added {
  display: flex;

  align-items: center;

  gap: 9px;

  margin:
    11px
    18px
    0;

  padding:
    9px
    11px;

  border:
    1px solid
    rgba(81, 6, 23, .10);

  background:
    rgba(249, 228, 210, .38);
}

.lbda-bag-added__check {
  width: 24px;
  height: 24px;

  flex: 0 0 24px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: var(--lbda-burgundy);

  color: var(--lbda-champagne);

  font-size: 11px;
}

.lbda-bag-added strong,
.lbda-bag-added span {
  display: block;
}

.lbda-bag-added strong {
  margin-bottom: 1px;

  font-size: 8px;

  font-weight: 600;

  letter-spacing: .08em;

  text-transform: uppercase;

  color: var(--lbda-burgundy);
}

#lbda-bag-added-product {
  font-size: 8.5px;

  font-weight: 300;

  color: rgba(42,21,26,.62);
}


/* =========================================================
   BODY
   Natural flow — subtotal follows products instead of being
   pinned to the bottom of a mostly empty drawer.
========================================================= */

.lbda-bag-drawer__body {
  min-height: 0;

  flex: 1 1 auto;

  display: block;

  overflow-y: auto;
}


/* =========================================================
   BAG ITEMS
========================================================= */

.lbda-bag-items {
  padding:
    8px
    24px
    0;
}

.lbda-bag-item {
  display: grid;

  grid-template-columns:
    90px
    minmax(0, 1fr);

  gap: 15px;

  padding: 16px 0;

  border-bottom:
    1px solid
    rgba(81, 6, 23, .09);

  transition: opacity .2s ease;
}

.lbda-bag-item.is-updating {
  opacity: .50;
  pointer-events: none;
}

.lbda-bag-item__media {
  width: 90px;
  height: 114px;

  overflow: hidden;

  background: #f5eee8;
}

.lbda-bag-item__media a {
  display: block;

  width: 100%;
  height: 100%;
}

.lbda-bag-item__img {
  width: 100% !important;
  height: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  object-fit: cover !important;
}

.lbda-bag-item__head {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 12px;

  align-items: start;
}

.lbda-bag-item__name {
  margin: 0;

  font-family:
    "Italiana",
    Georgia,
    serif;

  font-size: 18px;

  font-weight: 400;

  line-height: 1.16;

  text-decoration: none !important;

  color: var(--lbda-burgundy) !important;
}

.lbda-bag-item__price {
  padding-top: 2px;

  font-size: 9px;

  font-weight: 500;

  white-space: nowrap;

  color: var(--lbda-burgundy);
}


/* Variation info: Size: M, Color: ... */
.lbda-bag-item__meta {
  margin-top: 8px;

  font-size: 8.2px;

  font-weight: 300;

  line-height: 1.55;

  color: rgba(42,21,26,.58);
}

.lbda-bag-item__meta dl,
.lbda-bag-item__meta p {
  margin: 0 !important;
}

.lbda-bag-item__meta dt,
.lbda-bag-item__meta dd {
  display: inline;

  float: none;

  margin: 0 !important;
  padding: 0 !important;
}

.lbda-bag-item__meta dt {
  font-weight: 500;
}

.lbda-bag-item__meta dd + dt::before {
  content: " · ";
}


/* =========================================================
   QUANTITY + REMOVE
========================================================= */

.lbda-bag-item__controls {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-top: 13px;
}

.lbda-bag-qty {
  height: 32px;

  display: inline-grid;

  grid-template-columns:
    30px
    30px
    30px;

  align-items: center;

  border:
    1px solid
    rgba(81, 6, 23, .20);
}

.lbda-bag-qty__btn,
.lbda-bag-qty__value {
  width: 30px;
  height: 30px;

  display: inline-flex;

  align-items: center;
  justify-content: center;
}

.lbda-bag-qty__btn {
  margin: 0;
  padding: 0;

  border: 0;

  background: transparent;

  color: var(--lbda-burgundy);

  font-family: "Montserrat", sans-serif;

  font-size: 13px;

  cursor: pointer;
}

.lbda-bag-qty__btn:hover:not(:disabled),
.lbda-bag-qty__btn:focus-visible:not(:disabled) {
  background:
    rgba(81, 6, 23, .06);
}

.lbda-bag-qty__btn:disabled {
  opacity: .30;

  cursor: default;
}

.lbda-bag-qty__value {
  border-left:
    1px solid
    rgba(81, 6, 23, .11);

  border-right:
    1px solid
    rgba(81, 6, 23, .11);

  font-size: 8px;

  font-weight: 500;

  color: var(--lbda-burgundy);
}

.lbda-bag-remove {
  margin: 0;
  padding:
    2px
    0
    4px;

  border: 0;
  border-bottom:
    1px solid
    rgba(81, 6, 23, .22);

  background: transparent;

  font-family: "Montserrat", sans-serif;

  font-size: 6.5px;

  font-weight: 500;

  line-height: 1.2;

  letter-spacing: .10em;

  text-transform: uppercase;

  color: rgba(81, 6, 23, .58);

  cursor: pointer;
}

.lbda-bag-remove:hover,
.lbda-bag-remove:focus-visible {
  color: var(--lbda-burgundy);

  border-bottom-color:
    rgba(81, 6, 23, .60);
}


/* =========================================================
   SUMMARY
========================================================= */

.lbda-bag-summary {
  margin: 0;

  padding:
    18px
    24px
    24px;

  border-top: 0;

  background:
    rgba(249, 228, 210, .13);
}

.lbda-bag-summary__row {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  font-size: 10px;

  color: var(--lbda-burgundy);
}

.lbda-bag-summary__row strong {
  font-weight: 600;
}

.lbda-bag-summary__note {
  margin:
    6px
    0
    16px !important;

  font-size: 7px;

  font-weight: 300;

  line-height: 1.55;

  color: rgba(42,21,26,.48);
}


/* =========================================================
   ACTIONS
========================================================= */

.lbda-bag-actions {
  display: grid;

  grid-template-columns:
    1.08fr
    .92fr;

  gap: 9px;
}

.lbda-bag-btn {
  min-height: 44px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding:
    10px
    12px;

  font-size: 7.5px;

  font-weight: 600;

  letter-spacing: .12em;

  text-transform: uppercase;

  text-decoration: none !important;

  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.lbda-bag-btn--primary {
  background: var(--lbda-burgundy);

  border:
    1px solid
    var(--lbda-burgundy);

  color: var(--lbda-champagne) !important;
}

.lbda-bag-btn--primary:hover,
.lbda-bag-btn--primary:focus-visible {
  background: var(--lbda-burgundy-deep);

  border-color: var(--lbda-burgundy-deep);

  color: #fff !important;
}

.lbda-bag-btn--secondary {
  background: transparent;

  border:
    1px solid
    rgba(81, 6, 23, .30);

  color: var(--lbda-burgundy) !important;
}

.lbda-bag-btn--secondary:hover,
.lbda-bag-btn--secondary:focus-visible {
  background:
    rgba(81, 6, 23, .05);

  color: var(--lbda-burgundy) !important;
}

.lbda-bag-continue,
.lbda-bag-link-button {
  grid-column: 1 / -1;

  justify-self: center;

  margin: 6px 0 0;

  padding:
    3px
    1px
    5px;

  border: 0;
  border-bottom:
    1px solid
    rgba(81, 6, 23, .28);

  background: transparent;

  font-family: "Montserrat", sans-serif;

  font-size: 7px;

  font-weight: 500;

  letter-spacing: .12em;

  text-transform: uppercase;

  color: rgba(81, 6, 23, .70);

  cursor: pointer;
}

.lbda-bag-continue:hover,
.lbda-bag-continue:focus-visible,
.lbda-bag-link-button:hover,
.lbda-bag-link-button:focus-visible {
  color: var(--lbda-burgundy);

  border-bottom-color: var(--lbda-burgundy);
}


/* =========================================================
   EMPTY BAG
========================================================= */

.lbda-bag-empty {
  min-height: 420px;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  padding: 48px 32px;

  text-align: center;
}

.lbda-bag-empty__mark {
  margin-bottom: 15px;

  font-family:
    "Italiana",
    Georgia,
    serif;

  font-size: 18px;

  letter-spacing: .10em;

  color: var(--lbda-burgundy);
}

.lbda-bag-empty h3 {
  margin:
    0
    0
    9px !important;

  font-family:
    "Italiana",
    Georgia,
    serif;

  font-size: 27px !important;

  font-weight: 400 !important;

  color: var(--lbda-burgundy) !important;
}

.lbda-bag-empty p {
  max-width: 270px;

  margin:
    0
    0
    18px !important;

  font-size: 8.5px;

  font-weight: 300;

  line-height: 1.65;

  color: rgba(42,21,26,.56);
}


/* =========================================================
   MOBILE — BOTTOM SHEET
========================================================= */

@media (max-width: 700px) {

  .lbda-bag-backdrop {
    background: rgba(25,6,12,.44);
  }

  .lbda-bag-drawer {
    top: auto;
    right: 0;
    bottom: 0;

    width: 100%;
    height: auto;

    max-height:
      min(
        84dvh,
        720px
      );

    border-left: 0;

    border-top:
      1px solid
      rgba(81,6,23,.12);

    border-radius:
      18px
      18px
      0
      0;

    box-shadow:
      0
      -18px
      55px
      rgba(31,7,13,.18);

    transform: translateY(102%);
  }

  .lbda-bag-drawer.is-open {
    transform: translateY(0);
  }

  .lbda-bag-drawer::before {
    content: "";

    width: 40px;
    height: 3px;

    position: absolute;

    top: 8px;
    left: 50%;

    transform: translateX(-50%);

    border-radius: 999px;

    background:
      rgba(81,6,23,.18);
  }

  .lbda-bag-drawer__top {
    padding:
      22px
      18px
      13px;
  }

  .lbda-bag-brand__mark {
    font-size: 10px;
  }

  .lbda-bag-drawer__top h2 {
    font-size: 27px !important;
  }

  .lbda-bag-drawer__close {
    width: 34px;
    height: 34px;

    flex-basis: 34px;
  }

  .lbda-bag-added {
    margin:
      9px
      14px
      0;

    padding:
      9px
      11px;
  }

  .lbda-bag-items {
    padding:
      5px
      18px
      0;
  }

  .lbda-bag-item {
    grid-template-columns:
      76px
      minmax(0,1fr);

    gap: 12px;

    padding: 13px 0;
  }

  .lbda-bag-item__media {
    width: 76px;
    height: 96px;
  }

  .lbda-bag-item__name {
    font-size: 16px;
  }

  .lbda-bag-item__controls {
    margin-top: 10px;
  }

  .lbda-bag-qty {
    grid-template-columns:
      28px
      28px
      28px;

    height: 30px;
  }

  .lbda-bag-qty__btn,
  .lbda-bag-qty__value {
    width: 28px;
    height: 28px;
  }

  .lbda-bag-summary {
    padding:
      15px
      18px
      max(
        18px,
        env(safe-area-inset-bottom)
      );
  }

  .lbda-bag-actions {
    grid-template-columns: 1fr;
  }

  .lbda-bag-btn {
    min-height: 45px;
  }

  .lbda-bag-continue {
    grid-column: 1;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .lbda-bag-drawer,
  .lbda-bag-backdrop,
  .lbda-bag-btn,
  .lbda-bag-drawer__close,
  .lbda-bag-item {
    transition: none !important;
  }

}


/* =========================================================
   LBDA v1.0.3 — FINAL THEME-PROOF OVERRIDES
   These rules intentionally use stronger specificity and !important
   to prevent Kadence/WooCommerce button styles from leaking into
   the bag drawer.
========================================================= */

/* Force the drawer content into natural vertical flow.
   This removes the large blank gap before the subtotal/actions. */
body .lbda-bag-drawer .lbda-bag-drawer__body {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

body .lbda-bag-drawer .lbda-bag-items {
  display: block !important;
}

body .lbda-bag-drawer .lbda-bag-summary {
  margin: 0 !important;
  margin-top: 0 !important;
  position: static !important;
  inset: auto !important;
}


/* Perfectly centered, CSS-drawn checkmark */
body .lbda-bag-drawer .lbda-bag-added__check {
  position: relative !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 0 !important;
  border-radius: 999px !important;

  background: var(--lbda-burgundy) !important;

  color: transparent !important;

  line-height: 1 !important;
}

body .lbda-bag-drawer .lbda-bag-added__check::before {
  content: "" !important;

  display: block !important;

  width: 7px !important;
  height: 4px !important;

  margin-top: -1px !important;

  border-left: 1.7px solid var(--lbda-champagne) !important;
  border-bottom: 1.7px solid var(--lbda-champagne) !important;

  transform: rotate(-45deg) !important;
  transform-origin: center !important;
}


/* Quantity control — fully isolate from global Woo/Kadence button CSS */
body .lbda-bag-drawer .lbda-bag-qty {
  display: grid !important;
  grid-template-columns: 30px 30px 30px !important;

  width: 92px !important;
  height: 32px !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 1px solid rgba(81,6,23,.20) !important;
  border-radius: 0 !important;

  background: transparent !important;

  overflow: hidden !important;
}

body .lbda-bag-drawer button.lbda-bag-qty__btn,
body .lbda-bag-drawer .lbda-bag-qty__value {
  box-sizing: border-box !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;

  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  box-shadow: none !important;
  outline-offset: -2px !important;

  font-family: "Montserrat", sans-serif !important;
  font-size: 11px !important;
  font-weight: 400 !important;

  line-height: 30px !important;

  text-transform: none !important;
  letter-spacing: 0 !important;

  vertical-align: middle !important;
}

body .lbda-bag-drawer button.lbda-bag-qty__btn {
  appearance: none !important;
  -webkit-appearance: none !important;

  background: transparent !important;

  color: var(--lbda-burgundy) !important;

  cursor: pointer !important;
}

body .lbda-bag-drawer button.lbda-bag-qty__btn:hover:not(:disabled),
body .lbda-bag-drawer button.lbda-bag-qty__btn:focus-visible:not(:disabled) {
  background: rgba(81,6,23,.055) !important;
  color: var(--lbda-burgundy) !important;
}

body .lbda-bag-drawer button.lbda-bag-qty__btn:disabled {
  background: transparent !important;
  color: rgba(81,6,23,.30) !important;

  opacity: 1 !important;

  cursor: default !important;
}

body .lbda-bag-drawer .lbda-bag-qty__value {
  border-left: 1px solid rgba(81,6,23,.11) !important;
  border-right: 1px solid rgba(81,6,23,.11) !important;

  background: rgba(249,228,210,.12) !important;

  color: var(--lbda-burgundy) !important;
}


/* Remove link — never allow theme button styling */
body .lbda-bag-drawer button.lbda-bag-remove {
  appearance: none !important;
  -webkit-appearance: none !important;

  display: inline-block !important;

  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 2px 0 4px !important;

  border: 0 !important;
  border-bottom: 1px solid rgba(81,6,23,.26) !important;
  border-radius: 0 !important;

  background: transparent !important;

  box-shadow: none !important;

  font-family: "Montserrat", sans-serif !important;
  font-size: 6.5px !important;
  font-weight: 500 !important;

  line-height: 1.2 !important;
  letter-spacing: .10em !important;

  text-transform: uppercase !important;
  text-decoration: none !important;

  color: rgba(81,6,23,.62) !important;

  cursor: pointer !important;
}

body .lbda-bag-drawer button.lbda-bag-remove:hover,
body .lbda-bag-drawer button.lbda-bag-remove:focus-visible {
  background: transparent !important;
  color: var(--lbda-burgundy) !important;

  border-bottom-color: var(--lbda-burgundy) !important;
}


/* Product controls line */
body .lbda-bag-drawer .lbda-bag-item__controls {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 14px !important;

  margin-top: 13px !important;
}


/* Variation metadata is always visible when present */
body .lbda-bag-drawer .lbda-bag-item__meta:empty {
  display: none !important;
}

body .lbda-bag-drawer .lbda-bag-item__meta {
  margin-top: 7px !important;

  color: rgba(42,21,26,.62) !important;
}


/* Desktop visual balance */
@media (min-width: 701px) {

  body .lbda-bag-drawer {
    width: min(425px, 92vw) !important;
  }

  body .lbda-bag-drawer .lbda-bag-item {
    grid-template-columns: 88px minmax(0, 1fr) !important;
    gap: 15px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__media {
    width: 88px !important;
    height: 112px !important;
  }

  body .lbda-bag-drawer .lbda-bag-summary {
    padding-top: 17px !important;
  }

}


/* Tablet */
@media (min-width: 701px) and (max-width: 1024px) {

  body .lbda-bag-drawer {
    width: min(405px, 74vw) !important;
  }

}


/* Mobile bottom sheet */
@media (max-width: 700px) {

  body .lbda-bag-drawer {
    width: 100% !important;
    max-width: none !important;
  }

  body .lbda-bag-drawer .lbda-bag-drawer__body {
    max-height: calc(84dvh - 70px) !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__controls {
    gap: 12px !important;
  }

  body .lbda-bag-drawer .lbda-bag-qty {
    grid-template-columns: 30px 30px 30px !important;
    width: 92px !important;
    height: 32px !important;
  }

  body .lbda-bag-drawer button.lbda-bag-qty__btn,
  body .lbda-bag-drawer .lbda-bag-qty__value {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;

    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;

    line-height: 30px !important;
  }

  body .lbda-bag-drawer button.lbda-bag-remove {
    font-size: 6.5px !important;
  }

}


/* Very small phones */
@media (max-width: 380px) {

  body .lbda-bag-drawer .lbda-bag-item {
    grid-template-columns: 70px minmax(0, 1fr) !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__media {
    width: 70px !important;
    height: 90px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__name {
    font-size: 15px !important;
  }

}


/* =========================================================
   LBDA v1.0.4 — STOCK, DUPLICATE & RESPONSIVE POLISH
========================================================= */

/* Elegant in-drawer stock/error notice; replaces browser alerts. */
body .lbda-bag-drawer .lbda-bag-error {
  display: flex !important;
  align-items: center !important;

  gap: 9px !important;

  margin: 11px 18px 0 !important;
  padding: 10px 11px !important;

  border: 1px solid rgba(81,6,23,.16) !important;

  background: rgba(81,6,23,.045) !important;

  color: var(--lbda-burgundy) !important;
}

body .lbda-bag-drawer .lbda-bag-error[hidden] {
  display: none !important;
}

body .lbda-bag-drawer .lbda-bag-error__mark {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 0 !important;

  border-radius: 999px !important;

  background: var(--lbda-burgundy) !important;

  color: var(--lbda-champagne) !important;

  font-family: "Montserrat", sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;

  line-height: 1 !important;
}

body .lbda-bag-drawer .lbda-bag-error strong,
body .lbda-bag-drawer .lbda-bag-error span {
  display: block !important;
}

body .lbda-bag-drawer .lbda-bag-error strong {
  margin: 0 0 2px !important;

  font-size: 7.8px !important;
  font-weight: 600 !important;

  line-height: 1.25 !important;
  letter-spacing: .08em !important;

  text-transform: uppercase !important;
}

body .lbda-bag-drawer #lbda-bag-error-text {
  max-width: 310px !important;

  font-size: 8.5px !important;
  font-weight: 300 !important;

  line-height: 1.45 !important;

  color: rgba(42,21,26,.68) !important;
}


/* Variation details — clearly visible and separate from product title. */
body .lbda-bag-drawer .lbda-bag-item__variant {
  display: inline-block !important;

  margin: 0 10px 2px 0 !important;

  font-size: 8.2px !important;
  font-weight: 300 !important;

  line-height: 1.45 !important;

  color: rgba(42,21,26,.62) !important;
}

body .lbda-bag-drawer .lbda-bag-item__variant strong {
  font-weight: 500 !important;
  color: rgba(81,6,23,.72) !important;
}


/* Give multiple items a cleaner vertical rhythm. */
body .lbda-bag-drawer .lbda-bag-item:last-child {
  border-bottom: 0 !important;
}

body .lbda-bag-drawer .lbda-bag-items + .lbda-bag-summary {
  border-top: 1px solid rgba(81,6,23,.09) !important;
}


/* Desktop: drawer remains full-height, but summary follows the items naturally.
   If the bag is long, the whole body scrolls smoothly. */
@media (min-width: 701px) {

  body .lbda-bag-drawer .lbda-bag-drawer__body {
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(81,6,23,.35) transparent !important;
  }

  body .lbda-bag-drawer .lbda-bag-summary {
    position: static !important;
  }

}


/* Tablet */
@media (min-width: 701px) and (max-width: 1024px) {

  body .lbda-bag-drawer {
    width: min(410px, 78vw) !important;
  }

  body .lbda-bag-drawer .lbda-bag-added,
  body .lbda-bag-drawer .lbda-bag-error {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

}


/* Mobile */
@media (max-width: 700px) {

  body .lbda-bag-drawer .lbda-bag-error {
    margin: 9px 14px 0 !important;
    padding: 9px 10px !important;
  }

  body .lbda-bag-drawer #lbda-bag-error-text {
    max-width: none !important;
    font-size: 8.2px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__variant {
    font-size: 8px !important;
  }

}


/* Very small phones */
@media (max-width: 380px) {

  body .lbda-bag-drawer .lbda-bag-drawer__top {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body .lbda-bag-drawer .lbda-bag-items {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body .lbda-bag-drawer .lbda-bag-summary {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

}


/* =========================================================
   LBDA v1.0.7 — SINGLE-OWNER ADD TO BAG + STOCK VISIBILITY
========================================================= */

/*
 * The LBDA button intentionally does NOT use WooCommerce's
 * .single_add_to_cart_button selector. That prevents Kadence/Woo scripts
 * from processing the same click a second time.
 */
form.cart .lbda-add-to-bag-button {
  cursor: pointer;
}

/*
 * Hide customer-facing "X in stock" / "In stock" text.
 * Do NOT hide .out-of-stock: customers still need to know when an item
 * cannot be purchased.
 */
.woocommerce div.product p.stock.in-stock,
.woocommerce div.product .stock.in-stock,
.single-product .stock.in-stock {
  display: none !important;
}

/* Keep sold-out messaging visible. */
.woocommerce div.product p.stock.out-of-stock,
.woocommerce div.product .stock.out-of-stock,
.single-product .stock.out-of-stock {
  display: block !important;
}


/* =========================================================
   LBDA v1.0.8 — PRODUCT PAGE ADD TO BAG BUTTON
   Restores the original compact LBDA styling while keeping the
   button isolated from WooCommerce/Kadence add-to-cart JS hooks.
========================================================= */

.single-product .summary .lbda-add-to-bag-button {
  width: 100% !important;
  min-height: 50px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 14px 22px !important;

  border: 1px solid #510617 !important;
  border-radius: 0 !important;

  background: #510617 !important;
  color: #F9E4D2 !important;

  box-shadow: none !important;

  font-family: "Montserrat", sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;

  line-height: 1 !important;
  letter-spacing: .10em !important;

  text-transform: uppercase !important;
  text-decoration: none !important;

  cursor: pointer !important;

  transition:
    background-color .22s ease,
    color .22s ease,
    border-color .22s ease !important;
}

.single-product .summary .lbda-add-to-bag-button:hover,
.single-product .summary .lbda-add-to-bag-button:focus-visible {
  background: #3d0311 !important;
  border-color: #3d0311 !important;
  color: #F9E4D2 !important;
}

.single-product .summary .lbda-add-to-bag-button:disabled,
.single-product .summary .lbda-add-to-bag-button.loading {
  opacity: .62 !important;
  cursor: wait !important;
}


/* Desktop/tablet product form alignment */
@media (min-width: 481px) {

  .single-product .woocommerce-variation-add-to-cart {
    display: grid !important;
    grid-template-columns: 112px minmax(150px, 1fr) !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .single-product .woocommerce-variation-add-to-cart .quantity {
    width: 112px !important;
    margin: 0 !important;
  }

}


/* Mobile */
@media (max-width: 480px) {

  .single-product .woocommerce-variation-add-to-cart {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: stretch !important;
  }

  .single-product .summary .lbda-add-to-bag-button {
    min-height: 48px !important;
    padding: 13px 14px !important;
    font-size: 9px !important;
  }

}


/* Very narrow phones */
@media (max-width: 340px) {

  .single-product .woocommerce-variation-add-to-cart {
    grid-template-columns: 1fr !important;
  }

  .single-product .woocommerce-variation-add-to-cart .quantity {
    width: 100% !important;
  }

}


/* =========================================================
   LBDA v1.0.9 — FINAL DRAWER VISUAL POLISH
   Functionality unchanged.
========================================================= */

/* Success banner: slightly shorter and more refined */
body .lbda-bag-drawer .lbda-bag-added {
  margin:
    9px
    18px
    0 !important;

  padding:
    8px
    10px !important;

  min-height: 46px !important;
}

body .lbda-bag-drawer .lbda-bag-added__check {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
}

body .lbda-bag-drawer .lbda-bag-added strong {
  font-size: 7.6px !important;
}

body .lbda-bag-drawer #lbda-bag-added-product {
  font-size: 8.2px !important;
}


/* Product rows: tighter, cleaner vertical rhythm */
body .lbda-bag-drawer .lbda-bag-item {
  padding:
    13px
    0 !important;
}

body .lbda-bag-drawer .lbda-bag-item__head {
  gap: 10px !important;
}

body .lbda-bag-drawer .lbda-bag-item__name {
  font-size: 17px !important;
  line-height: 1.12 !important;
}

body .lbda-bag-drawer .lbda-bag-item__price {
  padding-top: 1px !important;

  font-size: 8.6px !important;
}


/* Bring size/variation closer to title */
body .lbda-bag-drawer .lbda-bag-item__meta {
  margin-top: 5px !important;
}

body .lbda-bag-drawer .lbda-bag-item__variant {
  margin-bottom: 0 !important;

  font-size: 7.9px !important;
}


/* Quantity + remove: closer to variation line and better aligned */
body .lbda-bag-drawer .lbda-bag-item__controls {
  margin-top: 9px !important;

  gap: 13px !important;

  align-items: center !important;
}

body .lbda-bag-drawer .lbda-bag-qty {
  width: 88px !important;
  height: 30px !important;

  grid-template-columns:
    29px
    29px
    29px !important;
}

body .lbda-bag-drawer button.lbda-bag-qty__btn,
body .lbda-bag-drawer .lbda-bag-qty__value {
  width: 29px !important;
  min-width: 29px !important;
  max-width: 29px !important;

  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;

  line-height: 28px !important;
}


/* Remove: slightly more visible without becoming heavy */
body .lbda-bag-drawer button.lbda-bag-remove {
  padding:
    2px
    0
    3px !important;

  font-size: 6.8px !important;

  font-weight: 500 !important;

  color:
    rgba(81,6,23,.72) !important;

  border-bottom-color:
    rgba(81,6,23,.34) !important;
}

body .lbda-bag-drawer button.lbda-bag-remove:hover,
body .lbda-bag-drawer button.lbda-bag-remove:focus-visible {
  color: #510617 !important;
  border-bottom-color: #510617 !important;
}


/* Summary: slightly tighter, stronger hierarchy */
body .lbda-bag-drawer .lbda-bag-summary {
  padding-top: 15px !important;
}

body .lbda-bag-drawer .lbda-bag-summary__row {
  font-size: 9.7px !important;
}

body .lbda-bag-drawer .lbda-bag-summary__note {
  margin-bottom: 14px !important;
}


/* Continue shopping: easier to notice */
body .lbda-bag-drawer .lbda-bag-continue {
  margin-top: 7px !important;

  font-size: 7.2px !important;

  color:
    rgba(81,6,23,.78) !important;
}


/* Desktop */
@media (min-width: 1025px) {

  body .lbda-bag-drawer {
    width: min(410px, 92vw) !important;
  }

  body .lbda-bag-drawer .lbda-bag-items {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item {
    grid-template-columns:
      86px
      minmax(0,1fr) !important;

    gap: 14px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__media {
    width: 86px !important;
    height: 108px !important;
  }

}


/* Tablet */
@media (min-width: 701px) and (max-width: 1024px) {

  body .lbda-bag-drawer {
    width: min(395px, 76vw) !important;
  }

  body .lbda-bag-drawer .lbda-bag-item {
    grid-template-columns:
      82px
      minmax(0,1fr) !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__media {
    width: 82px !important;
    height: 104px !important;
  }

}


/* Mobile */
@media (max-width: 700px) {

  body .lbda-bag-drawer .lbda-bag-added {
    margin:
      8px
      14px
      0 !important;

    min-height: 44px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item {
    padding:
      12px
      0 !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__controls {
    margin-top: 8px !important;
  }

  body .lbda-bag-drawer .lbda-bag-continue {
    font-size: 7px !important;
  }

}


/* Small mobile */
@media (max-width: 380px) {

  body .lbda-bag-drawer .lbda-bag-item__name {
    font-size: 15px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__price {
    font-size: 8px !important;
  }

  body .lbda-bag-drawer .lbda-bag-item__variant {
    font-size: 7.5px !important;
  }

}


/* =========================================================
   LBDA v1.0.10 — LARGE BAG / MULTI-VARIANT UX
   Keeps checkout visible when the bag contains many lines.
========================================================= */

/* Header count badge */
body .lbda-bag-drawer .lbda-bag-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
}

body .lbda-bag-drawer .lbda-bag-count {
  min-width: 21px !important;
  height: 21px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin-top: 2px !important;
  padding: 0 6px !important;

  border-radius: 999px !important;

  background: rgba(81,6,23,.08) !important;
  color: #510617 !important;

  font-family: "Montserrat", sans-serif !important;
  font-size: 7px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

body .lbda-bag-drawer .lbda-bag-count[hidden] {
  display: none !important;
}


/*
 * Large bags:
 * - the item list scrolls
 * - subtotal / checkout stays visible at the bottom
 * - no need to scroll through every item just to reach checkout
 */
body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-drawer__body {
  display: flex !important;
  flex-direction: column !important;

  min-height: 0 !important;

  overflow: hidden !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-items {
  flex: 1 1 auto !important;
  min-height: 0 !important;

  overflow-y: auto !important;
  overscroll-behavior: contain !important;

  scrollbar-width: thin !important;
  scrollbar-color: rgba(81,6,23,.28) transparent !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-summary {
  flex: 0 0 auto !important;

  position: relative !important;
  z-index: 2 !important;

  margin: 0 !important;

  box-shadow:
    0 -10px 24px rgba(81,6,23,.035) !important;

  background: #FFFAF6 !important;
}


/* More compact item rows only when the bag is long */
body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item {
  grid-template-columns:
    70px
    minmax(0,1fr) !important;

  gap: 12px !important;

  padding:
    11px
    0 !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__media {
  width: 70px !important;
  height: 88px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__name {
  font-size: 15.5px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__price {
  font-size: 8px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__meta {
  margin-top: 4px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__controls {
  margin-top: 7px !important;
}


/* Slightly shorter footer for large bags */
body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-summary {
  padding:
    13px
    18px
    16px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-summary__note {
  margin-bottom: 11px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-btn {
  min-height: 40px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-continue {
  margin-top: 5px !important;
}


/* Mobile large bag */
@media (max-width: 700px) {

  body .lbda-bag-drawer.lbda-bag-many-items {
    height: min(86dvh, 760px) !important;
    max-height: min(86dvh, 760px) !important;
  }

  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-drawer__body {
    max-height: none !important;
  }

  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item {
    grid-template-columns:
      66px
      minmax(0,1fr) !important;

    gap: 11px !important;
  }

  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__media {
    width: 66px !important;
    height: 84px !important;
  }

  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-summary {
    padding-bottom:
      max(
        14px,
        env(safe-area-inset-bottom)
      ) !important;
  }

}


/* Small mobile */
@media (max-width: 380px) {

  body .lbda-bag-drawer .lbda-bag-count {
    min-width: 19px !important;
    height: 19px !important;
    font-size: 6.5px !important;
  }

  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item {
    grid-template-columns:
      60px
      minmax(0,1fr) !important;
  }

  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__media {
    width: 60px !important;
    height: 76px !important;
  }

}


/* =========================================================
   LBDA v1.0.11 — HEADER CART / MINI-CART INTEGRATION
========================================================= */

/*
 * The header cart icon is handled by the LBDA drawer.
 * These selectors are intentionally scoped to common Kadence/Woo mini-cart
 * drawers so a delayed theme handler cannot leave a second cart panel visible.
 */
body.lbda-bag-plugin-active .kadence-mini-cart,
body.lbda-bag-plugin-active .header-cart-dropdown,
body.lbda-bag-plugin-active .header-cart-content,
body.lbda-bag-plugin-active .woocommerce-mini-cart__empty-message + .buttons,
body.lbda-bag-plugin-active .wc-block-mini-cart__drawer[aria-hidden="false"] {
  /* Do not globally display:none unknown containers.
     JS capture prevents normal activation; these remain as a safeguard only. */
}

/* Make header cart triggers feel clickable after the behavior is redirected. */
body.lbda-bag-plugin-active header [class*="cart"],
body.lbda-bag-plugin-active .site-header [class*="cart"],
body.lbda-bag-plugin-active #masthead [class*="cart"] {
  cursor: pointer;
}


/* =========================================================
   LBDA v1.0.12 — DISABLE NATIVE KADENCE REVIEW CART
========================================================= */

/*
 * Kadence's popout cart is #cart-drawer. LBDA replaces it completely.
 * Keep it out of the render tree so there can never be two competing
 * cart drawers, even if a delayed Kadence script tries to activate it.
 */
body.lbda-bag-plugin-active #cart-drawer {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* The LBDA custom drawer remains the only visible bag panel. */
body.lbda-bag-plugin-active #lbda-bag-drawer {
  display: flex !important;
}


/* Header cart buttons keep their normal Kadence visual styling. */
body.lbda-bag-plugin-active .kadence-header-cart .header-cart-button,
body.lbda-bag-plugin-active .header-cart-wrap .header-cart-button,
body.lbda-bag-plugin-active .header-mobile-cart-wrap .header-cart-button {
  cursor: pointer !important;
}


/* =========================================================
   LBDA v1.0.13 — UNIVERSAL NATIVE REVIEW-CART SUPPRESSION
========================================================= */

.lbda-native-review-cart-suppressed {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}


/* =========================================================
   LBDA v1.0.14 — RELIABLE HEADER BAG HITAREA
   ========================================================= */

/*
 * Kadence's exact cart markup is:
 * .header-cart-wrap.kadence-header-cart > ... > .header-cart-button
 *
 * The visible Kadence icon/count remains untouched. A transparent, accessible
 * LBDA button is placed directly above that exact cart wrapper and owns the
 * click/tap action. This avoids competing theme drawer handlers completely.
 */
body.lbda-bag-plugin-active .lbda-header-bag-wrap {
  position: relative !important;
}

body.lbda-bag-plugin-active .lbda-header-bag-wrap .header-cart-button {
  pointer-events: none !important;
}

body.lbda-bag-plugin-active button.lbda-header-bag-hitarea {
  appearance: none !important;
  -webkit-appearance: none !important;

  position: absolute !important;
  inset: 0 !important;
  z-index: 50 !important;

  display: block !important;

  width: 100% !important;
  height: 100% !important;
  min-width: 28px !important;
  min-height: 28px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  color: transparent !important;

  box-shadow: none !important;

  font-size: 0 !important;
  line-height: 0 !important;

  cursor: pointer !important;
}

body.lbda-bag-plugin-active button.lbda-header-bag-hitarea:hover,
body.lbda-bag-plugin-active button.lbda-header-bag-hitarea:focus,
body.lbda-bag-plugin-active button.lbda-header-bag-hitarea:active {
  background: transparent !important;
  color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.lbda-bag-plugin-active button.lbda-header-bag-hitarea:focus-visible {
  outline: 1px solid rgba(81,6,23,.55) !important;
  outline-offset: 3px !important;
}

/* Native Kadence cart drawer remains disabled while LBDA owns the bag UI. */
body.lbda-bag-plugin-active #cart-drawer {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* =========================================================
   LBDA v1.0.16 — FINAL LAUNCH POLISH
   Cosmetic only. Cart logic is unchanged from v1.0.15.
========================================================= */

/* Slightly more elegant desktop width */
@media (min-width: 1280px) {
  body .lbda-bag-drawer {
    width: 392px !important;
  }
}

/* Tighten long-bag rows just enough to show more products */
body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item {
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__media {
  width: 66px !important;
  height: 84px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item {
  grid-template-columns: 66px minmax(0,1fr) !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__name {
  font-size: 15px !important;
}

body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__controls {
  margin-top: 6px !important;
}

/* Keep the checkout area crisp and compact */
body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-summary {
  padding-top: 12px !important;
  padding-bottom: 14px !important;
}

/* Mobile: retain breathing room */
@media (max-width: 700px) {
  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item {
    grid-template-columns: 64px minmax(0,1fr) !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  body .lbda-bag-drawer.lbda-bag-many-items .lbda-bag-item__media {
    width: 64px !important;
    height: 82px !important;
  }
}


/* v1.0.18 — Respect the native hidden state of the success banner.
   The base .lbda-bag-added rule sets display:flex, which otherwise overrides
   the HTML hidden attribute and can make a blank success card appear beside
   a genuine variation error. */
body .lbda-bag-drawer .lbda-bag-added[hidden] {
  display: none !important;
}

/* v1.0.19: placeholder shown until the bag is fetched over AJAX. */
.lbda-bag-loading {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lbda-bag-loading::after {
    content: "";
    width: 28px;
    height: 28px;
    border: 2px solid rgba(81, 6, 23, 0.15);
    border-top-color: #510617;
    border-radius: 50%;
    animation: lbda-bag-spin 0.8s linear infinite;
}

@keyframes lbda-bag-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .lbda-bag-loading::after { animation: none; }
}
