/* =====================================
   CART OVERLAY
===================================== */

.global-cart-overlay {

  position: fixed;

  inset: 0;

  background:
    rgba(30, 40, 50, 0.22);

  opacity: 0;

  pointer-events: none;

  transition:
    opacity 0.25s ease;

  z-index: 2100;

}


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

.global-cart-drawer {

  position: fixed;

  top: 0;
  right: 0;

  width: min(
    440px,
    92vw
  );

  height: 100vh;

  background: #FFFFFF;

  box-shadow:
    -10px 0 35px
    rgba(82, 107, 135, 0.12);

  transform:
    translateX(100%);

  transition:
    transform 0.3s ease;

  z-index: 2110;

  display: flex;

  flex-direction: column;

}


/* =====================================
   OPEN STATE
===================================== */

.global-cart-overlay.open {

  opacity: 1;

  pointer-events: auto;

}


.global-cart-drawer.open {

  transform:
    translateX(0);

}


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

.global-cart-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 25px 28px;

  border-bottom:
    1px solid #E4E9EF;

}


.global-cart-header h3 {

  margin: 0;

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

  font-size: 24px;

  font-weight: 600;

  color: #526B87;

}


.global-cart-close {

  width: 38px;
  height: 38px;

  border: 1px solid #D6DEE7;

  border-radius: 50%;

  background: #FFFFFF;

  color: #526B87;

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

  font-size: 25px;

  line-height: 1;

  cursor: pointer;

  display: flex;

  align-items: center;

  justify-content: center;

}


.global-cart-close:hover {

  background: #F4F7FA;

}


/* =====================================
   CART ITEMS
===================================== */

.global-cart-items {

  min-height: 0;

  flex: 1;

  overflow-y: auto;

  padding: 20px 25px;

}


.global-cart-empty {

  padding: 70px 20px;

  text-align: center;

  color: #7B8798;

  font-size: 15px;

}


/* =====================================
   CART ITEM
===================================== */

.global-cart-item {

  padding: 20px 0;

  border-bottom:
    1px solid #E4E9EF;

}


.global-cart-item-top {

  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 15px;

}


.global-cart-item-title {

  font-size: 17px;

  font-weight: 600;

  color: #526B87;

}


.global-cart-item-text {

  margin-top: 5px;

  font-size: 12px;

  line-height: 1.45;

  color: #7B8798;

}


.global-cart-remove {

  border: none;

  padding: 0;

  background: transparent;

  color: #E3A09B;

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

  font-size: 18px;

  cursor: pointer;

}


.global-cart-remove:hover {

  text-decoration: underline;

}


/* =====================================
   LETTER BREAKDOWN
===================================== */

.global-cart-breakdown {

  margin-top: 12px;

  padding: 10px 12px;

  background: #F4F7FA;

  border-radius: 12px;

}


.global-cart-letter-row {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 5px 0;

  font-size: 12px;

  color: #728095;

}


.global-cart-letter-name {

  display: flex;

  align-items: center;

  gap: 8px;

}


.global-cart-letter {

  width: 22px;
  height: 22px;

  display: inline-flex;

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

  border-radius: 7px;

  background: #FFFFFF;

  color: #526B87;

  font-size: 12px;

  font-weight: 600;

}


.global-cart-letter-price {

  color: #526B87;

  font-weight: 600;

}


.global-cart-unit-price {

  margin-top: 10px;

  font-size: 11px;

  color: #7B8798;

}


/* =====================================
   QUANTITY
===================================== */

.global-cart-item-bottom {

  margin-top: 15px;

  display: flex;

  align-items: center;

  justify-content: space-between;

}


.global-cart-item-bottom > strong {

  font-size: 15px;

  color: #526B87;

}


.global-cart-quantity {

  display: flex;

  align-items: center;

  gap: 12px;

}


.global-cart-quantity button {

  width: 28px;
  height: 28px;

  border:
    1px solid #D6DEE7;

  border-radius: 50%;

  background: #FFFFFF;

  color: #526B87;

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

  font-size: 17px;

  cursor: pointer;

}


.global-cart-quantity button:hover {

  background: #F4F7FA;

}


.global-cart-quantity span {

  min-width: 15px;

  text-align: center;

  font-size: 13px;

  color: #526B87;

}


/* =====================================
   CART FOOTER
===================================== */

.global-cart-footer {

  padding: 16px 25px 18px;

  border-top:
    1px solid #E4E9EF;

  background: #FFFFFF;

}


.global-cart-total {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 13px;

}


.global-cart-total span {

  font-size: 14px;

  color: #728095;

}


.global-cart-total strong {

  font-size: 22px;

  color: #526B87;

}


.global-cart-note {

  margin-bottom: 15px;

  font-size: 11px;

  line-height: 1.55;

  color: #7B8798;

}


/* =====================================
   CONTINUE SHOPPING
===================================== */

.global-cart-continue {

  width: 100%;

  margin-top: 0;

  padding: 13px 16px;

  border:
    1px solid #D6DEE7;

  border-radius: 999px;

  background: #FFFFFF;

  color: #526B87;

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

  font-size: 14px;

  font-weight: 500;

  cursor: pointer;

}


.global-cart-continue:hover {

  background: #F4F7FA;

}


/* =====================================
   CHECKOUT BUTTON
===================================== */

.global-cart-checkout {

  width: 100%;

  margin-top: 10px;

  padding: 14px 18px;

  border: none;

  border-radius: 999px;

  background: #526B87;

  color: white;

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

  font-size: 15px;

  font-weight: 500;

  cursor: pointer;

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

}


.global-cart-checkout:hover {

  opacity: 0.9;

  transform:
    translateY(-1px);

}


/* =====================================
   CART SPACE BALANCE
   Keep the cart items and checkout area
   both clearly visible. Each section has
   its own scroll when it gets long.
===================================== */

.global-cart-drawer{
  overflow:hidden;
  overscroll-behavior:contain;
}

.global-cart-items{
  min-height:180px;
  flex:1 1 45%;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}

.global-cart-footer{
  flex:1 1 55%;
  max-height:55%;
  min-height:260px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  box-sizing:border-box;
}

.global-cart-footer > *{
  flex-shrink:0;
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 600px) {

  .global-cart-drawer {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
  }

  .global-cart-header {
    padding: 14px 18px;
    flex: 0 0 auto;
  }

  .global-cart-header h3 {
    font-size: 20px;
  }

  .global-cart-close {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .global-cart-items {
    min-height: 190px;
    flex: 1 1 44%;
    padding: 8px 18px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .global-cart-item {
    padding: 13px 0;
  }

  .global-cart-item-title {
    font-size: 16px;
  }

  .global-cart-item-text {
    font-size: 11px;
  }

  .global-cart-item-bottom {
    margin-top: 9px;
  }

  .global-cart-footer {
    flex: 1 1 56%;
    min-height: 270px;
    max-height: 56%;
    padding: 11px 18px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .global-cart-total {
    margin-bottom: 8px;
  }

  .global-cart-total strong {
    font-size: 18px;
  }

  .global-cart-note {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .cart-shipping {
    margin-top: 9px;
    padding-top: 9px;
  }

  .cart-discount {
    margin-top: 9px;
    padding-top: 9px;
  }

  .global-cart-account-note {
    margin-top: 8px;
    padding: 9px 10px;
  }

  .global-cart-continue,
  .global-cart-checkout {
    padding: 11px 14px;
    margin-top: 7px;
  }

}

/* =====================================
   SHIPPING
===================================== */

.cart-shipping {
  margin-top: 12px;
  padding-top: 12px;

  border-top: 1px solid #E1E7EE;
}

.cart-shipping-title {
  font-size: 14px;
  font-weight: 600;

  color: #526B87;
}

.cart-shipping-description {
  margin-top: 5px;

  font-size: 11px;
  line-height: 1.4;

  color: #7B8798;
}


/* ================================
   SHIPPING FORM
================================ */

.cart-shipping-form {
  display: flex;

  gap: 8px;

  margin-top: 8px;
}

.shipping-postal-input {
  flex: 1;

  min-width: 0;

  padding: 12px 13px;

  border: 1px solid #D6DEE7;
  border-radius: 10px;

  background: white;

  color: #526B87;

  font-family: "Fredoka", sans-serif;
  font-size: 13px;

  outline: none;
}

.shipping-postal-input:focus {
  border-color: #9DB9D1;
}


.shipping-calculate-button {
  padding: 0 15px;

  border: none;
  border-radius: 10px;

  background: #526B87;
  color: white;

  font-family: "Fredoka", sans-serif;
  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  transition: opacity 0.2s ease;
}

.shipping-calculate-button:hover {
  opacity: 0.85;
}

.shipping-calculate-button:disabled {
  opacity: 0.55;
  cursor: wait;
}


/* ================================
   SHIPPING MESSAGE
================================ */

.shipping-message {
  min-height: 17px;

  margin-top: 7px;

  font-size: 11px;

  color: #7B8798;
}

.shipping-message.error {
  color: #C06F6A;
}

.shipping-message.success {
  color: #6FA58A;
}


/* ================================
   SHIPPING RESULT
================================ */

.shipping-result {
  margin-top: 7px;
}

.shipping-result-row {
  display: flex;

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

  gap: 15px;

  font-size: 13px;

  color: #526B87;
}

.shipping-result-row strong {
  font-weight: 600;
}

.shipping-postal {
  margin-top: 3px;

  font-size: 10px;

  color: #7B8798;
}


/* ================================
   GRAND TOTAL
================================ */

.global-cart-grand-total {
  margin-top: 10px;

  padding-top: 10px;

  border-top: 1px solid #E1E7EE;

  font-size: 18px;
}

.global-cart-grand-total strong {
  font-size: 20px;
}
.cart-overlay{z-index:2100!important}.cart-drawer{z-index:2110!important}

.cart-discount{margin-top:16px;padding-top:16px;border-top:1px solid #DDE5EC}
.cart-discount-form{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:8px}
.discount-code-input{height:42px;padding:0 12px;border:1px solid #C8D2DD;border-radius:10px;background:#fff;color:#526B87;font:14px "Fredoka",sans-serif}
.discount-apply-button{height:42px;padding:0 15px;border:0;border-radius:10px;background:#526B87;color:#fff;font:600 13px "Fredoka",sans-serif;cursor:pointer}
.discount-message{min-height:18px;margin-top:7px;font:12px/1.4 "Fredoka",sans-serif}
.discount-message.success{color:#5E927C}.discount-message.error{color:#C76E6A}

.global-cart-account-note{
  display:grid;
  gap:4px;
  margin-top:12px;
  padding:12px 13px;
  border-radius:13px;
  background:#F3F7FA;
  border:1px solid #E0E8EF;
}
.global-cart-account-note strong{
  color:#526B87;
  font-size:13px;
  font-weight:600;
}
.global-cart-account-note span{
  color:#718094;
  font-size:12px;
  line-height:1.45;
}
.global-cart-account-note a{
  display:inline-block;
  margin-top:2px;
  width:max-content;
  color:#526B87!important;
  font-size:12px;
  font-weight:600;
  text-decoration:underline;
}

/* =====================================
   DYNAMIC CART HEIGHT
   One item gets a compact item area.
   Multiple items keep the larger split.
===================================== */

.global-cart-drawer.cart-has-one-item .global-cart-items{
  flex:0 0 auto;
  min-height:0;
  max-height:none;
}

.global-cart-drawer.cart-has-one-item .global-cart-footer{
  flex:1 1 auto;
  max-height:none;
  min-height:0;
}

.global-cart-drawer.cart-has-many-items .global-cart-items{
  flex:1 1 44%;
}

.global-cart-drawer.cart-has-many-items .global-cart-footer{
  flex:1 1 56%;
}

.global-cart-drawer.cart-is-empty .global-cart-items{
  flex:1 1 auto;
  min-height:180px;
}

.global-cart-drawer.cart-is-empty .global-cart-footer{
  flex:0 0 auto;
  min-height:0;
  max-height:none;
}

@media (max-width:600px){
  .global-cart-drawer.cart-has-one-item .global-cart-items{
    min-height:0;
    max-height:none;
  }

  .global-cart-drawer.cart-has-one-item .global-cart-footer{
    flex:1 1 auto;
    min-height:0;
    max-height:none;
  }

  .global-cart-drawer.cart-has-many-items .global-cart-items{
    flex:1 1 44%;
    min-height:190px;
  }

  .global-cart-drawer.cart-has-many-items .global-cart-footer{
    flex:1 1 56%;
    min-height:270px;
    max-height:56%;
  }
}
