/* Basket backdrop */

.mg-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999998;

  background: rgba(24, 17, 13, 0.58);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;
}

.mg-floating-cart.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
}

.mg-cart-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Basket drawer */

.mg-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 999999;

  display: flex;
  flex-direction: column;

  width: min(460px, calc(100vw - 20px));
  height: 100dvh;

  padding: 28px;

  background: #fffdf9;
  box-shadow: -24px 0 70px rgba(34, 24, 18, 0.24);

  transform: translateX(105%);
  transition: transform 0.35s ease;
}

.mg-cart-drawer.is-open {
  transform: translateX(0);
}

body.mg-cart-open {
  overflow: hidden;
}

/* Header */

.mg-cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  padding-bottom: 22px;

  border-bottom: 1px solid rgba(138, 99, 68, 0.18);
}

.mg-cart-eyebrow {
  display: block;

  margin-bottom: 8px;

  color: #b28564;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mg-cart-header h2 {
  margin: 0;

  color: #3f2e22;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.mg-cart-close {
  appearance: none;

  border: 0;
  background: transparent;
  color: #59431b;

  cursor: pointer;
  font-size: 36px;
  font-weight: 200;
  line-height: 1;
}

/* Empty state */

.mg-cart-empty {
  padding: 60px 20px;

  color: #75685f;
  text-align: center;
}

/* Items */

#mg-cart-items {
  overflow-y: auto;
}

.mg-cart-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;

  padding: 22px 0;

  border-bottom: 1px solid rgba(138, 99, 68, 0.16);
}

.mg-cart-item img {
  width: 82px;
  height: 82px;

  border-radius: 5px;

  object-fit: cover;
}

.mg-cart-item h3 {
  margin: 0 0 6px;

  color: #3f2e22;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
}

.mg-cart-item-price {
  color: #75675b;
  font-size: 14px;
}

.mg-cart-item-actions {
  display: flex;
  align-items: center;
  gap: 14px;

  margin-top: 13px;
}

.mg-quantity-control {
  display: inline-flex;
  align-items: center;

  border: 1px solid rgba(138, 99, 68, 0.28);
}

.mg-quantity-control button {
  width: 30px;
  height: 30px;

  border: 0;
  background: transparent;
  color: #694f2f;

  cursor: pointer;
}

.mg-quantity-control span {
  min-width: 24px;

  color: #3f2e22;
  font-size: 13px;
  text-align: center;
}

.mg-remove-item {
  appearance: none;

  padding: 0;

  border: 0;
  background: transparent;
  color: #8a6344;

  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mg-cart-line-total {
  color: #3f2e22;
  font-size: 14px;
  white-space: nowrap;
}

/* Footer */

.mg-cart-footer {
  margin-top: auto;
  padding-top: 22px;

  border-top: 1px solid rgba(138, 99, 68, 0.18);
}

.mg-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 7px;

  color: #3f2e22;
  font-size: 19px;
}

.mg-cart-tax-note {
  margin: 0 0 20px;

  color: #80736a;
  font-size: 12px;
}

.mg-checkout-button {
  appearance: none;

  width: 100%;
  min-height: 50px;
  padding: 14px 22px;

  border: 1px solid #8a6344;
  border-radius: 2px;
  background: #8a6344;
  color: #fff;

  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.mg-checkout-button:hover {
  border-color: #694f2f;
  background: #694f2f;
  transform: translateY(-1px);
}

.mg-checkout-note {
  margin: 13px 0 0;

  color: #81746b;
  font-size: 11px;
  text-align: center;
}

/* Floating basket */

.mg-floating-cart {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99990;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  min-height: 48px;
  padding: 10px 14px 10px 18px;

  border: 1px solid rgba(138, 99, 68, 0.25);
  border-radius: 999px;
  background: #fffdf9;
  color: #59431b;

  box-shadow: 0 12px 35px rgba(45, 32, 24, 0.15);

  cursor: pointer;
  font: inherit;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

#mg-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 25px;
  height: 25px;
  padding: 0 6px;

  border-radius: 50%;
  background: #8a6344;
  color: #fff;

  font-size: 12px;
}

@media (max-width: 600px) {
  .mg-cart-drawer {
    width: 100%;
    padding: 22px;
  }

  .mg-cart-item {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .mg-cart-item img {
    width: 70px;
    height: 70px;
  }

  .mg-cart-line-total {
    grid-column: 2;
  }

  .mg-floating-cart {
    right: 15px;
    bottom: 15px;
  }
}

/* =========================================================
   Sticky product purchase bar
   ========================================================= */

.mg-product-sticky-bar {
  position: fixed;
  top: var(--mg-product-bar-top, 0);
  right: 0;
  left: 0;
  z-index: 1;

  background: rgba(255, 253, 249, 0.97);
  border-bottom: 1px solid rgba(89, 67, 27, 0.16);
  box-shadow: 0 12px 30px rgba(40, 28, 20, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  opacity: 0;
  pointer-events: none;
  transform: translateY(-110%);

  transition:
    opacity 0.25s ease,
    transform 0.3s ease,
    top 0.2s ease;
}

.mg-product-sticky-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mg-product-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  width: min(1200px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
}

.mg-product-sticky-nav {
  display: flex;
  align-items: center;
  gap: 28px;

  min-width: 0;
}

.mg-product-sticky-nav a {
  position: relative;

  color: #65584f;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;

  transition: color 0.2s ease;
}

.mg-product-sticky-nav a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;

  height: 1px;

  background: #8a6344;
  content: "";

  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.mg-product-sticky-nav a:hover {
  color: #3f2e22;
}

.mg-product-sticky-nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.mg-product-sticky-purchase {
  display: flex;
  align-items: center;
  gap: 20px;

  flex-shrink: 0;
}

.mg-product-sticky-info {
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.mg-product-sticky-name {
  color: #3f2e22;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.mg-product-sticky-price {
  color: #8a6344;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.mg-product-sticky-add {
  appearance: none;

  min-height: 42px;
  padding: 11px 21px;

  border: 1px solid #8a6344;
  border-radius: 2px;
  background: #8a6344;
  color: #fff;

  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.mg-product-sticky-add:hover {
  border-color: #694f2f;
  background: #694f2f;
  transform: translateY(-1px);
}

/* Smooth section navigation */

html {
  scroll-behavior: auto;
}

/* Tablet */

@media (max-width: 900px) {
  .mg-product-sticky-inner {
    width: min(100% - 30px, 1200px);
    min-height: 66px;
  }

  .mg-product-sticky-nav {
    gap: 18px;
    overflow-x: auto;

    scrollbar-width: none;
  }

  .mg-product-sticky-nav::-webkit-scrollbar {
    display: none;
  }

  .mg-product-sticky-info {
    display: none;
  }
}

/* Mobile */

@media (max-width: 640px) {
  .mg-product-sticky-bar {
    top: auto;
    bottom: 0;

    border-top: 1px solid rgba(89, 67, 27, 0.16);
    border-bottom: 0;

    transform: translateY(110%);
  }

  .mg-product-sticky-bar.is-visible {
    transform: translateY(0);
  }

  .mg-product-sticky-inner {
    min-height: 70px;
  }

  .mg-product-sticky-nav {
    display: none;
  }

  .mg-product-sticky-purchase {
    width: 100%;
  }

  .mg-product-sticky-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;

    min-width: 0;
  }

  .mg-product-sticky-name {
    max-width: 150px;

    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mg-product-sticky-add {
    margin-left: auto;
  }

  body.mg-has-product-sticky-bar {
    padding-bottom: 70px;
  }
}

.mg-product-sticky-bar[hidden] {
	display: none !important;
}

.mg-checkout-consents {
  margin: 0 0 18px;
}

.mg-checkout-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  color: #65584f;
  font-size: 12px;
  line-height: 1.5;
}

.mg-checkout-consent input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.mg-checkout-consent a {
  color: #8a6344;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mg-consent-error {
  margin: 8px 0 0;
  color: #9b2c2c;
  font-size: 11px;
}

.mg-checkout-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================
   Product price / Free label
   ========================================================= */

.mg-product-main-price .bt_bb_headline_tag,
.mg-product-main-price .bt_bb_headline_content,
.mg-product-main-price .bt_bb_headline_content span {
  color: #8a6344;
}

.mg-product-main-price .bt_bb_headline_tag {
  margin: 0;

  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}