/* cart-drawer.css (flex layouts updated) */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100dvh;
  background: #F6EFE4;
  box-shadow: -2px 0 8px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 9999;
  box-sizing: border-box;
  padding: 20px;

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.cart-drawer-open,
body.cart-drawer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.cart-drawer,
.cart-drawer__overlay {
  overscroll-behavior: none;
}

.cart-items-wrapper {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.cart-drawer__content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-top: 0;
}


.cart-drawer__content > .woocommerce-mini-cart-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.cart-drawer.open { right: 0; }

.cart-drawer__overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 9998;
}
.cart-drawer__overlay.open { opacity: 1; visibility: visible; }

.cart-drawer__close {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cart-drawer__close-icon {
  width: 15px;
  height: 15px;
  display: block;
}

.cart-drawer__close:hover {
  background: none;
}


.mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(90, 100, 74, 0.2);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.mini-cart-header p {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-optical-sizing: none;
  font-size: 30px;
  line-height: 1;
  color: #2C241E;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.cart-items-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 6px 0 0;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
    
    
    
.woocommerce-mini-cart.cart_list { 
    list-style: none; margin: 0; padding: 0; }


.woocommerce-mini-cart-item.mini_cart_item {
    margin:0 !important;
    padding: 0 !important;
}


/* Flex: thumbnail left, details right */
.mini-cart-item-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
}


.cart-item-thumbnail-wrapper {
  background: #D1D4BC;
  border: 1px solid #9EA48B;
  padding: 10px 30px !important;
  border-radius: 15px;
  flex-shrink: 0;
  margin: 0 !important;

  /* NYT: container må gerne tilpasse sig billedet */
  display: inline-flex;         /* wrapper bliver "så stor som indholdet" */
  align-items: center;
  justify-content: center;
}

.cart-item-thumbnail-wrapper img { 
  display: block;
  width: auto !important;     
  height: auto !important;     
  max-width: 60px !important;   
  max-height: 100px !important;
  margin: 0 !important;
}



.cart-item-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 20px;
}

.cart-item-name,
.cart-item-name a {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-optical-sizing: none;
  font-size: 22px;
  line-height: 1.2;
  color: #2C241E;
  font-weight: 400 !important;
  text-decoration: none;
  letter-spacing: -0.03em;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.cart-item-name a:hover {
  text-decoration: underline;
  color: #2C241E;
}









.cart-drawer-footer {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 20px;
  background: #F6EFE4;
  position: relative;
  z-index: 2;
}

.mini-cart-header,
.cart-drawer-footer {
  flex-shrink: 0;
}



.payment-badges{
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center; /* eller flex-start hvis du vil venstre-align */
}

/* din badge-styling (flyt den fra <style> ind i css-filen) */
.payment-badge{
  width: 50px;
  height: 30px;
  background: #fff;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 5px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}

.payment-badge svg{
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}



.cart-drawer-footer .woocommerce-mini-cart__total.total {
  display: flex;
  border-top: 1px solid rgba(90, 100, 74, 0.2);
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding-top: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #2C241E;
  font-weight: 600;
}
.cart-drawer-footer .woocommerce-mini-cart__total.total strong { 
    font-size: 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1;
    font-weight: 400;
    color: #8a8075;
}
    
.cart-drawer-footer .footer-button .button.btn-secure-checkout{
  display: flex;                 /* vigtig */
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: left;              /* så text-align ikke “blander sig” */
  line-height: 1;                /* du har allerede line-height:1 */
}

/* sørg for at icon ikke giver ekstra baseline spacing */
.cart-drawer-footer .btn-secure-checkout__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex: 0 0 auto;
}

.footer-button .btn-secure-checkout__icon svg{
  width: 26px;           /* justér her */
  height: 26px;
  display: block;
}
    
    
.cart-drawer-footer .footer-button .button {
  display: block;
  width: 100%;
  padding: 15px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  text-align: center;
  background-color: #5A644A;
  color: white;
  letter-spacing: -0.03em;
  border-radius: 50px;
  box-shadow: rgba(149,157,165,0.2) 0px 8px 24px;
  text-decoration: none;
}
.cart-drawer-footer .footer-button .button:hover { 
    background-color: #5A644A; 
    color: white;
}


/* Tom‐kurv‐stil */
.empty-cart-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
}

.empty-cart-wrapper .woocommerce-mini-cart__empty-message {
  margin: 0 0 30px;
      font-family: "Fraunces", serif;
  font-style: italic;
  font-optical-sizing: none;
  font-size: 32px;
  line-height: 1;
  color: #2C241E;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.empty-cart-wrapper .woocommerce-mini-cart__empty-button {
  margin: 0;
}

.empty-cart-wrapper .woocommerce-mini-cart__empty-button .button {
  display: inline-block;
  padding: 14px 30px;
      font-family: "Fraunces", serif;
  font-style: italic;
  font-optical-sizing: none;
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  background-color: #5A644A;
  color: white;
  border-radius: 50px;
  letter-spacing: -0.03em;
  text-decoration: none;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.empty-cart-wrapper .woocommerce-mini-cart__empty-button .button:hover {
  background-color: #5A644A;
  color: white;
}






.show-cart-drawer {
  position: relative;
  display: inline-flex;
  vertical-align: middle; 
}

/* badge – skjult som default */
.show-cart-drawer .cart-count{
  position: absolute;
  bottom: -6px;
  right: -6px;

  height: 18px;
  min-width: 18px; 
  padding: 0 2px;           

  background-color: #5A644A;
  color: #fff;

  border-radius: 999px;     /* pill-form når den bliver bred */
  display: none;

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

  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;

  pointer-events: none;
  z-index: 10;

  white-space: nowrap;      /* aldrig wrap */
  box-sizing: border-box;
}

/* når der ER tekst i span’en, vis */
.show-cart-drawer .cart-count:not(:empty){
  display: inline-flex;
}








/* Blocks quantity selector styling */
.cart-drawer .wc-block-components-quantity-selector {
  display: flex;
  width: 100px;
  align-items: center;
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  border: none;
 font-family: 'Plus Jakarta Sans', sans-serif;
}


.cart-drawer .wc-block-components-quantity-selector::after {
    /* If a pseudo-element is used for the border, hide it: */
    content: none !important;
    border: none !important;
}

.cart-drawer .wc-block-components-quantity-selector__button,
.cart-drawer .wc-block-components-quantity-selector__input {
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
}

.cart-drawer .wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.cart-drawer .wc-block-components-quantity-selector__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.cart-drawer .wc-block-components-quantity-selector__button {
  flex: 0 0 30px;
  height: 40px;
  display: flex;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2C241E;
}
.cart-drawer .wc-block-components-quantity-selector__button:focus,
.cart-drawer .wc-block-components-quantity-selector__button:active,
.cart-drawer .wc-block-components-quantity-selector__button:focus-visible {
  background-color: transparent;
  box-shadow: none;
  outline: none;
  color: #2C241E;
}

.cart-drawer .wc-block-components-quantity-selector__input:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.cart-drawer .wc-block-components-quantity-selector__input {
  -moz-appearance: textfield;
  border: none !important;    
  flex: 0 0 40px;
  height: 30px;
  text-align: center;
  padding: 0 !important;
  font-size:   16px !important;
  font-weight: 500 !important;
  color:#2C241E!important;
}

.cart-drawer .wc-block-components-quantity-selector__button:hover {
  background-color: transparent !important;
  color: #2C241E;
}


/* Quantity and price side by side under name */
.quantity-price-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  width: 100%;    
}

.quantity-price-wrapper .unit-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  line-height: 1;
  color: #2C241E;
  font-weight: 400;
  letter-spacing: -0.03em;
}





@media (max-width: 767px) {
.cart-drawer {
  right: -350px;
  width: 350px;
}


.mini-cart-item-header {
  gap: 10px;
  margin-bottom: 20px;
}


.cart-item-details {
  gap: 10px;
}



.cart-drawer .wc-block-components-quantity-selector {
  width: 90px;
}
.cart-drawer .wc-block-components-quantity-selector__button {
  flex: 0 0 30px;
}

.cart-drawer .wc-block-components-quantity-selector__input {
  flex: 0 0 30px;
}

.quantity-price-wrapper .unit-price {
  font-size: 16px;
}

.cart-item-name a,
.cart-item-name {
  font-size: 20px;
}


.cart-drawer-footer .woocommerce-mini-cart__total.total {
  font-size: 18px;

}
.cart-drawer-footer .woocommerce-mini-cart__total.total strong { 
    font-size: 14px;
}
    
.cart-drawer-footer .footer-button .button {
  font-size: 18px;
}

.footer-button .btn-secure-checkout__icon svg{
  width: 22px;        
  height: 22px;
}


.mini-cart-header p {
  font-size: 28px;
}

}




.cart-item-top-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  width:100%;
}

.cart-item-remove{
  flex:0 0 auto;
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  text-decoration:none;
  color:#2C241E;
  background: transparent;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.cart-item-remove:hover{
  background: rgba(44, 36, 30, 0.1);
}

.cart-item-remove:focus,
.cart-item-remove:active,
.cart-item-remove:focus-visible{
  outline:none;
  box-shadow:none;
  color:#2C241E;
  background: rgba(44, 36, 30, 0.1);
}

.cart-item-remove svg{
  width:auto;
  height:14px;
  display:block;
}


#cart-drawer .woocommerce ul.cart_list li a.remove,
#cart-drawer .woocommerce ul.cart_list li a.remove_from_cart_button,
#cart-drawer .woocommerce ul.product_list_widget li a.remove,
#cart-drawer .woocommerce ul.product_list_widget li a.remove_from_cart_button,
#cart-drawer .cart-item-remove {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}








@media (max-width: 360px) {
  .cart-drawer {
  right: -330px;
  width: 330px;
  }

}

