/* ====================================
   SIDEBAR CART STYLES - WOODMART
   Width: 620px
   Design: Based on Screenshot
==================================== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Khula:wght@300;400;600&display=swap');

/* Main Cart Sidebar Container */
.cart-widget-side {
  width: 620px !important;
  background: #F5F1EE !important;
}

/* Header Section - Hide default WoodMart heading */
.cart-widget-side .wd-heading {
  display: none !important;
}

/* Cart Widget */
.cart-widget-side .widget.woocommerce.widget_shopping_cart {
  background: #F5F1EE;
  padding: 0;
  margin: 0;
}

.cart-widget-side .widget_shopping_cart_content {
  padding: 40px 50px;
  background: #F5F1EE;
  min-height: 97vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Cart Title - "Cart" */
.cart-widget-side .widget_shopping_cart_content::before {
  content: 'Cart';
  display: block;
  font-family: 'The Seasons', 'Playfair Display', Georgia, serif;
  font-size: 60px;
  font-weight: 400;
  line-height: 1.2;
  color: #670B05;
  margin-bottom: 40px;
  letter-spacing: -1px;
}

/* Close Button - Custom */
.cart-close-btn {
  position: absolute !important;
  top: 40px !important;
  right: 50px !important;
  background: transparent !important;
  border: none !important;
  font-size: 32px !important;
  line-height: 1 !important;
  color: #333 !important;
  cursor: pointer !important;
  z-index: 100 !important;
  padding: 0 !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.3s ease !important;
  font-family: Arial, sans-serif !important;
}

.cart-close-btn:hover {
  color: #000 !important;
}

/* Products Container */
.cart-widget-side .elementor-menu-cart__products,
.cart-widget-side .woocommerce-mini-cart {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 30px;
  padding-right: 10px;
  max-height: calc(100vh - 400px);
}

/* Single Product Item */
.cart-widget-side .elementor-menu-cart__product,
.cart-widget-side .woocommerce-mini-cart-item {
  display: grid !important;
  grid-template-columns: 100px 1fr auto !important;
  grid-template-areas: 
    "image name remove"
    "image size remove"
    "image price remove"
    "image details remove" !important;
  gap: 0 20px !important;
  align-items: start !important;
  padding: 25px 0 !important;
  border-bottom: 1px solid rgba(103, 11, 5, 0.15) !important;
  position: relative !important;
  margin: 0 !important;
}

.cart-widget-side .elementor-menu-cart__product:first-child {
  padding-top: 0 !important;
}

/* Product Image */
.cart-widget-side .elementor-menu-cart__product-image,
.cart-widget-side .product-thumbnail {
  grid-area: image !important;
  width: 100px !important;
  height: 100px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  margin: 0 !important;
}

.cart-widget-side .elementor-menu-cart__product-image img,
.cart-widget-side .product-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.cart-widget-side .elementor-menu-cart__product-image a,
.cart-widget-side .product-thumbnail a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

/* Product Name */
.cart-widget-side .elementor-menu-cart__product-name,
.cart-widget-side .product-name {
  grid-area: name !important;
  margin: 0 !important;
  padding: 0 !important;
}

.cart-widget-side .elementor-menu-cart__product-name a,
.cart-widget-side .product-name a {
  font-family: 'The Seasons', 'Playfair Display', Georgia, serif !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  color: #670B05 !important;
  text-decoration: none !important;
  display: block !important;
  transition: color 0.3s ease !important;
  margin: 0 !important;
}

.cart-widget-side .elementor-menu-cart__product-name a:hover,
.cart-widget-side .product-name a:hover {
  color: #4A0703 !important;
}

/* Size Label */
.cart-widget-side .product-size-label {
  font-family: 'Khula', sans-serif !important;
  font-size: 14px !important;
  color: #670B05 !important;
  margin-top: 6px !important;
  display: block !important;
  font-weight: 400 !important;
  grid-area: size !important;
}

/* Quantity Controls Container */
.cart-widget-side .cart-item-quantity-controls {
      display: flex !important;
	align-items: center;
    gap: 0px !important;
    border: 1.5px solid #670B05 !important;
    border-radius: 10px !important;
    padding: 6px 10px !important;
    width: fit-content !important;
    grid-area: details !important;
	position: relative;
	left: 45px;
}

.cart-widget-side .qty-btn {
  background: transparent !important;
  border: none !important;
  color: #670B05 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 0 !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.3s ease !important;
  font-weight: 300 !important;
}

.cart-widget-side .qty-btn:hover {
  color: #4A0703 !important;
}

.cart-widget-side .qty-display {
  font-family: 'Khula', sans-serif !important;
  font-size: 18px !important;
  color: #333 !important;
  height: 1em;
  min-width: 24px !important;
  text-align: center !important;
  font-weight: 400 !important;
}

/* Product Price - Show below size */
.cart-widget-side .elementor-menu-cart__product-price,
.cart-widget-side .product-price {
  display: block !important;
  grid-area: price !important;
  margin: 6px 0 0 0 !important;
  padding: 0 !important;
}

/* Контейнер для цены и контролов на одной линии */
.cart-widget-side .price-with-controls-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
	justify-content: space-between;
  grid-area: price !important;
  margin: 6px 0 0 0 !important;
  padding: 0 !important;
}

.cart-widget-side .elementor-menu-cart__product-price .woocommerce-Price-amount,
.cart-widget-side .product-price .woocommerce-Price-amount,
.cart-widget-side .elementor-menu-cart__product-price .amount,
.cart-widget-side .product-price .amount {
  font-family: 'Khula', serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #670B05 !important;
  line-height: 1.3 !important;
}

.cart-widget-side .elementor-menu-cart__product-price .woocommerce-Price-currencySymbol,
.cart-widget-side .product-price .woocommerce-Price-currencySymbol {
  font-family: 'The Seasons', 'Playfair Display', Georgia, serif !important;
  color: #670B05 !important;
}

/* Remove Button */
.cart-widget-side .elementor-menu-cart__product-remove,
.cart-widget-side .product-remove {
  grid-area: remove !important;
  justify-self: end !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide duplicate remove buttons - keep only the first one visible */
/* .cart-widget-side .elementor-menu-cart__product .elementor-menu-cart__product-remove:not(:first-of-type),
.cart-widget-side .woocommerce-mini-cart-item .product-remove:not(:first-of-type),
.cart-widget-side .elementor-menu-cart__product .product-remove:not(:first-of-type),
.cart-widget-side .woocommerce-mini-cart-item .elementor-menu-cart__product-remove:not(:first-of-type) {
  display: none !important;
} */

.cart-widget-side .elementor-menu-cart__product-remove a,
.cart-widget-side .product-remove a,
.cart-widget-side .product-remove .remove {
  display: inline-block !important;
  width: 28px !important;
  height: 28px !important;
  text-decoration: none !important;
  position: relative !important;
  transition: opacity 0.3s ease !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  font-size: 0 !important;
}

.cart-widget-side .elementor-menu-cart__product-remove a::before,
.cart-widget-side .product-remove a::before,
.cart-widget-side .product-remove .remove::before {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 24px !important;
  height: 24px !important;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23670B05" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/></svg>') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  text-indent: 0 !important;
}

.cart-widget-side .elementor-menu-cart__product-remove a:hover::before,
.cart-widget-side .product-remove a:hover::before,
.cart-widget-side .product-remove .remove:hover::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%234A0703" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/></svg>') !important;
}

/* Subtotal Section */
.cart-widget-side .elementor-menu-cart__subtotal {
  display: block !important;
  padding: 30px 0 20px !important;
  border-top: 2px solid rgba(103, 11, 5, 0.2) !important;
  margin: 0 0 10px 0 !important;
}

.cart-widget-side .subtotal-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.cart-widget-side .subtotal-label,
.cart-widget-side .elementor-menu-cart__subtotal strong {
  font-family: 'The Seasons', 'Playfair Display', Georgia, serif !important;
  font-size: 32px !important;
  font-weight: 400 !important;
  color: #670B05 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.cart-widget-side .subtotal-amount,
.cart-widget-side .elementor-menu-cart__subtotal .woocommerce-Price-amount {
  font-family: 'The Seasons', 'Playfair Display', Georgia, serif !important;
  font-size: 36px !important;
  font-weight: 400 !important;
  color: #670B05 !important;
}

/* Delivery Info */
.cart-widget-side .delivery-info {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 10px 0 15px 0!important;
  margin-bottom: 20px !important;
  flex-wrap: wrap !important;
  min-height: 40px !important;
}

@media (max-width: 768px) {
	.cart-widget-side .delivery-info {
		align-items: end!important;
		margin-bottom: 0!important;
		padding-bottom: 0!important;
	}
}

.cart-widget-side .delivery-label {
  font-family: 'The Seasons', 'Playfair Display', Georgia, serif !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  color: #670B05 !important;
}

.cart-widget-side .delivery-note {
  font-family: 'Khula', sans-serif !important;
  line-height: 1.8em;
  font-size: 14px !important;
  color: #bf9897 !important;
  text-align: right !important;
  flex: 1 !important;
  min-width: 200px !important;
}

/* Footer Buttons */
.cart-widget-side .elementor-menu-cart__footer-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding-top: 20px !important;
  margin-top: auto !important;
}

/* Hide View Cart Button */
.cart-widget-side .elementor-button--view-cart {
  display: none !important;
}

/* Checkout Button - Styled exactly like submit-btn from custom form */
.cart-widget-side .elementor-button--checkout {
  width: 100% !important;
  background-color: #02010100 !important;
  font-family: "The Seasons", Sans-serif !important;
  font-size: 18px !important;
  line-height: 24px !important;
  text-transform: uppercase !important;
  fill: #670B05 !important;
  color: #670B05 !important;
  border-style: solid !important;
  border-width: 1px !important;
  border-color: #670B05 !important;
  border-radius: 50px 50px 50px 50px !important;
  padding: 10px 36px 10px 36px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  text-align: center !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  font-weight: normal !important;
}

.cart-widget-side .elementor-button--checkout span {
	display: flex;
    align-items: center;
    gap: 12px;
}


.cart-widget-side .elementor-button--checkout:active {
  transform: translateY(0) !important;
}

/* Add arrow to checkout button - Custom SVG */
.cart-widget-side .elementor-button--checkout .elementor-button-text::after {
  content: '' !important;
  display: inline-block !important;
  width: 24px !important;
  height: 24px !important;
  background-image: url('https://thegardenfleurs.com/wp-content/uploads/2026/01/guidance_left-arrow-2.svg') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  transition: transform 0.3s ease !important;
    position: relative;
}

.cart-widget-side .elementor-button--checkout:hover .elementor-button-text::after {
	left: 5px;
}



/* Scrollbar Styling */
.cart-widget-side .elementor-menu-cart__products::-webkit-scrollbar,
.cart-widget-side .woocommerce-mini-cart::-webkit-scrollbar {
  width: 6px !important;
}

.cart-widget-side .elementor-menu-cart__products::-webkit-scrollbar-track,
.cart-widget-side .woocommerce-mini-cart::-webkit-scrollbar-track {
  background: rgba(155, 107, 74, 0.08) !important;
  border-radius: 3px !important;
}

.cart-widget-side .elementor-menu-cart__products::-webkit-scrollbar-thumb,
.cart-widget-side .woocommerce-mini-cart::-webkit-scrollbar-thumb {
  background: rgba(155, 107, 74, 0.3) !important;
  border-radius: 3px !important;
}

.cart-widget-side .elementor-menu-cart__products::-webkit-scrollbar-thumb:hover,
.cart-widget-side .woocommerce-mini-cart::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 107, 74, 0.5) !important;
}

/* Empty Cart */
.cart-widget-side .woocommerce-mini-cart__empty-message {
  text-align: center !important;
  padding: 60px 20px !important;
  font-family: 'Khula', sans-serif !important;
  font-size: 16px !important;
  color: #666 !important;
}

/* Responsive */
@media (max-width: 768px) {
	.cart-widget-side .elementor-menu-cart__products, .cart-widget-side .woocommerce-mini-cart {
		padding-right:0!important;
	}
	.cart-widget-side .elementor-menu-cart__subtotal {
		display: flex !important;
    align-items: center;
    justify-content: space-between;
		padding-bottom: 0!important;
		padding-top: 10px!important;
		margin-bottom: 0!important;
	}
	.delivery-info {
		padding-top: 0!important;
		margin-bottom: 0!important;
	}
	.cart-widget-side .elementor-menu-cart__footer-buttons {
		margin-top: 20px!important;
		padding-top: 0!important;
	}
	
  .cart-widget-side {
    width: 100% !important;
    max-width: 450px !important;
  }
  
  .cart-widget-side .widget_shopping_cart_content {
    padding: 30px !important;
  }
  
  .cart-widget-side .widget_shopping_cart_content::before {
    font-size: 48px !important;
    margin-bottom: 30px !important;
  }
  
  .cart-close-btn {
    top: 30px !important;
    right: 30px !important;
  }
  
  .cart-widget-side .elementor-menu-cart__product,
  .cart-widget-side .woocommerce-mini-cart-item {
    grid-template-columns: 80px 1fr 32px !important;
    gap: 0 15px !important;
  }
  
  .cart-widget-side .elementor-menu-cart__product-image,
  .cart-widget-side .product-thumbnail {
    width: 80px !important;
    height: 80px !important;
  }
  
  .cart-widget-side .elementor-menu-cart__product-name a,
  .cart-widget-side .product-name a {
    font-size: 18px !important;
  }
  
  .cart-widget-side .subtotal-label,
  .cart-widget-side .elementor-menu-cart__subtotal strong {
    font-size: 24px !important;
  }
  
  .cart-widget-side .subtotal-amount,
  .cart-widget-side .elementor-menu-cart__subtotal .woocommerce-Price-amount {
    font-size: 28px !important;
  }
  
  .cart-widget-side .elementor-button--checkout {
    font-size: 18px !important;
    padding: 16px 32px !important;
  }
}

/* Additional WoodMart Specific Overrides */
.cart-widget-side.wd-side-hidden,
.cart-widget-side.wd-right {
  background: #F5F1EE !important;
}

/* Fix for WoodMart animations */
.cart-widget-side.wd-opened {
  transform: translateX(0) !important;
}

/* Прелоадер для корзины - внутри widget_shopping_cart_content */
.widget_shopping_cart_content {
    position: relative !important;
}

.cart-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 241, 238, 0.95);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-radius: 0;
}

.cart-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Спиннер загрузки */
.cart-loader-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #670B05;
    animation: cart-spinner-bounce 1.4s ease-in-out infinite both;
}

.spinner-circle:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-circle:nth-child(2) {
    animation-delay: -0.16s;
}

.spinner-circle:nth-child(3) {
    animation-delay: 0s;
}

@keyframes cart-spinner-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Состояние обновления корзины - скрываем нежелательный контент */
.widget_shopping_cart_content.cart-updating {
    position: relative;
}

.widget_shopping_cart_content.cart-updating .elementor-menu-cart__products,
.widget_shopping_cart_content.cart-updating .woocommerce-mini-cart,
.widget_shopping_cart_content.cart-updating .shopping-cart-widget-body {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.widget_shopping_cart_content.cart-updating .cart-loader-overlay {
    pointer-events: all;
}

/* Сайдбар всегда остается открытым и видимым */
.cart-widget-side {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Плавные переходы для элементов корзины */
.cart-widget-side .elementor-menu-cart__product,
.cart-widget-side .woocommerce-mini-cart-item {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Предотвращение прыжков при обновлении */
.widget_shopping_cart_content.cart-updating {
    overflow: visible;
}

/* Скрытие элементов, которые не должны быть видны во время обновления */
.widget_shopping_cart_content.cart-updating .elementor-menu-cart__footer-buttons,
.widget_shopping_cart_content.cart-updating .woocommerce-mini-cart__buttons,
.widget_shopping_cart_content.cart-updating .shopping-cart-widget-footer {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Плавное появление контента после обновления */
.widget_shopping_cart_content:not(.cart-updating) .elementor-menu-cart__products,
.widget_shopping_cart_content:not(.cart-updating) .woocommerce-mini-cart,
.widget_shopping_cart_content:not(.cart-updating) .shopping-cart-widget-body {
    animation: cart-content-fade-in 0.3s ease;
}

@keyframes cart-content-fade-in {
    from {
        opacity: 0.3;
    }
    to {
        opacity: 1;
    }
}

/* Улучшенные стили для контролов количества */
.cart-item-quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: #670B05;
    transition: all 0.2s ease;
    user-select: none;
}

.qty-btn:hover {
    background: #670B05;
    color: #fff;
    border-color: #670B05;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

/* Плавная анимация изменения количества */
.qty-display {
    transition: transform 0.2s ease;
}

.widget_shopping_cart_content.cart-updating .qty-display {
    transform: scale(0.9);
}

