/**
 * SideCart Module Styles
 * Handles: side-cart
 */

.elementor-menu-cart__main {
  width: 450px !important;
  max-height: 100vh; /* Ensure it doesn't exceed viewport height */
  display: flex;
  flex-direction: column;
  z-index: 99999 !important; /* Higher than any page element */
  padding: 0 !important;
}

/* Ensure container has high z-index */
.elementor-menu-cart__container {
  z-index: 99998 !important;
}

/* Prevent body scroll when cart is open - applies to ALL screen sizes */
/* Target body when it contains an element with elementor-menu-cart--shown class */
body:has(.elementor-menu-cart--shown) {
  overflow: hidden !important;
}

/* Also prevent scroll on html element */
html:has(.elementor-menu-cart--shown) {
  overflow: hidden !important;
}

@media (max-width: 900px) {
  /* Additional mobile-specific fixes for iOS Safari */
  body:has(.elementor-menu-cart--shown) {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    touch-action: none; /* Prevent touch scrolling on iOS */
    -webkit-overflow-scrolling: none;
  }

  /* Also prevent scroll on html element for iOS */
  html:has(.elementor-menu-cart--shown) {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }

  .elementor-menu-cart__container {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100% !important;
    z-index: 99998 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    overflow: hidden !important;
  }

  .elementor-menu-cart__main {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    height: 100vh !important;
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100% !important;
    overflow: hidden !important;
    background: #fff !important;
    z-index: 99999 !important;
    margin: 0 !important;
    transform: none !important;
  }
}

/* Content wrapper - flex container, no scroll */
.elementor-menu-cart__main .widget_shopping_cart_content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Don't scroll the whole content */
  overscroll-behavior: contain; /* Prevent scroll chaining */
  padding-right: 0;
  min-height: 0; /* Important for flex children with overflow */
  height: 100%;
}

/* Scrollbar styling - consolidated for products list and offers section */
.elementor-menu-cart__products.woocommerce-mini-cart::-webkit-scrollbar,
.nf-sidecart-offers-section::-webkit-scrollbar {
  width: 6px;
}

.elementor-menu-cart__products.woocommerce-mini-cart::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.elementor-menu-cart__products.woocommerce-mini-cart::-webkit-scrollbar-thumb,
.nf-sidecart-offers-section::-webkit-scrollbar-thumb {
  background: #35ac5a;
  border-radius: 3px;
}

.elementor-menu-cart__products.woocommerce-mini-cart::-webkit-scrollbar-thumb:hover {
  background: #2e9449;
}

.nf-sidecart-offers-section::-webkit-scrollbar-track {
  background: #e5e5e5;
  border-radius: 3px;
}

/* ============================================
   Free Shipping Progress Bar
   ============================================ */
.nf-sidecart-free-shipping-progress {
  margin-bottom: 20px;
  position: relative;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1rem;
  flex-shrink: 0;
  padding-right: 2rem;
}

.nf-sidecart-free-shipping-progress .nf-shipping-text {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: #000;
  gap: 5px;
}

.nf-sidecart-free-shipping-progress .nf-shipping-text strong {
  color: #000;
  font-weight: 600;
  font-size: 14px;
}

.nf-sidecart-free-shipping-progress .nf-shipping-icon {
  position: absolute;
  top: 15px;
  right: 50px;
  width: 35px;
  height: 35px;
}

.nf-sidecart-free-shipping-progress .nf-shipping-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nf-sidecart-free-shipping-progress .nf-shipping-progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
}

.nf-sidecart-free-shipping-progress .nf-shipping-progress-fill {
  height: 100%;
  background: #35ac5a;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.nf-sidecart-free-shipping-progress.nf-achieved .nf-shipping-text {
  color: #000;
  font-weight: 500;
  font-size: 14px;
}

/* ============================================
   Product Box Layout
   ============================================ */
/* Cart heading */
.nf-cart-heading {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  margin: 0 0 20px 0;
  padding: 0 1rem;
  flex-shrink: 0; /* Don't shrink */
}

/* Product List Container - ONLY this element should scroll */
.elementor-menu-cart__products.woocommerce-mini-cart {
  flex: 1 1 auto;
  min-height: 100px; /* Ensure products list has reasonable minimum height */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  overscroll-behavior: contain; /* Prevent scroll chaining to body */
  display: block;
  width: 100%;
  padding-left: 1rem;
  padding-right: 2rem;
}

.elementor-menu-cart__product {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  grid-template-rows: auto auto;
  gap: 0px 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
  min-height: 80px;
}

.elementor-menu-cart__product:last-child {
  border-bottom: none;
}

/* Product Image */
.elementor-menu-cart__product-image {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border-radius: 8px;
}

.elementor-menu-cart__product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Name */
.elementor-menu-cart__product-name {
  grid-column: 2;
  grid-row: 1;
}

.elementor-menu-cart__product-name a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  display: block;
}

.elementor-menu-cart__product-name a:hover {
  color: #35ac5a;
}

.elementor-menu-cart__product-name .bundlecontent {
  display: block;
  font-size: 13px;
  color: #000000;
  margin-top: 4px;
  font-weight: 300;
}

/* Price and Quantity Container */
.elementor-menu-cart__product-info {
  grid-column: 2 / span 2;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: -8px;
}

.elementor-menu-cart__product-remove:after,
.elementor-menu-cart__product-remove:before {
  background: #000 !important;
}
.elementor-menu-cart__product-price {
  font-size: 14px;
  font-weight: 500;
  color: #000;
}

/* Coupon discounted price display */
.elementor-menu-cart__product-price .nf-price-wrapper.nf-has-discount {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.elementor-menu-cart__product-price .nf-original-price {
  font-size: 14px;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
}

.elementor-menu-cart__product-price .nf-discounted-price {
  font-size: 18px;
  font-weight: 700;
  color: #35ac5a;
  text-decoration: none;
  background: none;
}

/* Quantity Picker - Custom +/- buttons */
.elementor-menu-cart__product-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.elementor-menu-cart__product-quantity .quantity {
  display: flex;
  align-items: center;
  gap: 0px;
}

/* Quantity buttons (+ and -) - consolidated */
.elementor-menu-cart__product-quantity .qty-btn,
button.qty-btn {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border: none;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  line-height: 1;
  box-shadow: none;
  text-transform: none;
  vertical-align: middle;
}

.elementor-menu-cart__product-quantity .qty-btn:hover,
button.qty-btn:hover {
  background: #f5f5f5;
  border-color: #35ac5a;
  color: #35ac5a;
}

.elementor-menu-cart__product-quantity .qty-btn:active,
button.qty-btn:active {
  transform: scale(0.95);
}

.elementor-menu-cart__product-quantity .qty-btn:disabled,
button.qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Quantity number input */
.elementor-menu-cart__product-quantity input[type="number"] {
  width: 40px;
  height: 32px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  padding: 0;
  margin: 0;
  color: #000;
  -moz-appearance: textfield;
}

/* Hide default number input spinners */
.elementor-menu-cart__product-quantity
  input[type="number"]::-webkit-inner-spin-button,
.elementor-menu-cart__product-quantity
  input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Locked quantity picker for offer products */
.elementor-menu-cart__product-quantity input[type="number"][readonly],
.elementor-menu-cart__product-quantity input[type="number"]:read-only {
  background: transparent;
  color: #999;
  cursor: not-allowed;
  pointer-events: none;
}

/* Remove Button */
.elementor-menu-cart__product-remove {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  bottom: auto !important;
  border: none;
}

.elementor-menu-cart__product-remove a {
  display: block;
  width: 24px;
  height: 24px;
  text-align: center;
  line-height: 24px;
  color: #999;
  font-size: 20px;
  text-decoration: none;
  transition: color 0.2s;
}

.elementor-menu-cart__product-remove a::before {
  content: "�";
}

.elementor-menu-cart__product-remove a:hover {
  color: #e53935;
}

/* ============================================
   Coupon Field
   ============================================ */
.nf-sidecart-coupon {
  margin: 20px 0;
  padding: 16px 1rem;
  background: #f6f6f6;
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: 15px;
  margin-right: 30px;
  border: 1px solid #DFDFDF;
}

.nf-sidecart-coupon-form .coupon-input-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nf-sidecart-coupon-form input[type="text"] {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

.nf-sidecart-coupon-form input[type="text"]:focus {
  outline: none;
  border-color: #35ac5a;
}

.nf-sidecart-coupon-form .button.nf-apply-coupon {
  height: 40px;
  padding: 0 20px;
  background: #fff;
  color: #000;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 10px;
}

.nf-sidecart-coupon-form .button.nf-apply-coupon:hover {
  background: #f9f9f9;
  border-color: #35ac5a;
}

/* Applied Coupons */
.nf-sidecart-applied-coupons {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nf-sidecart-coupon-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e8f5e9;
  border: 1px solid #35ac5a;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
}

.nf-sidecart-coupon-item .coupon-code {
  font-weight: 500;
  color: #2e7d32;
}

.nf-sidecart-coupon-item .remove-coupon {
  color: #666;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  transition: color 0.2s;
}

.nf-sidecart-coupon-item .remove-coupon:hover {
  color: #e53935;
}

/* ============================================
   Subtotal, Discount & Total
   ============================================ */
.elementor-menu-cart__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 2rem;
  font-size: 16px;
  flex-shrink: 0; /* Don't shrink */
  border: none;
}

.elementor-menu-cart__subtotal.nf-has-discount {
  padding-bottom: 8px;
}

.elementor-menu-cart__subtotal strong {
  font-weight: 500;
  font-size: 16px;
}

.elementor-menu-cart__subtotal .woocommerce-Price-amount {
  font-size: 16px;
  font-weight: 500;
  color: #000;
}

/* Discounted subtotal display */
.elementor-menu-cart__subtotal .nf-subtotal-prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.elementor-menu-cart__subtotal .nf-original-subtotal {
  font-size: 14px;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
}

.elementor-menu-cart__subtotal .nf-original-subtotal .woocommerce-Price-amount {
  font-size: 14px;
  font-weight: 400;
  color: #999;
}

.elementor-menu-cart__subtotal .nf-discounted-subtotal {
  text-decoration: none;
  background: none;
}

.elementor-menu-cart__subtotal
  .nf-discounted-subtotal
  .woocommerce-Price-amount {
  font-size: 18px;
  font-weight: 700;
  color: #35ac5a;
}

/* Hide tax label */
.elementor-menu-cart__subtotal .tax_label {
  display: none;
}

/* Discount row */
.elementor-menu-cart__discount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 1rem 16px;
  font-size: 14px;
  color: #35ac5a;
  flex-shrink: 0; /* Don't shrink */
}

.elementor-menu-cart__discount strong {
  font-weight: 500;
}

.elementor-menu-cart__discount .nf-discount-amount {
  font-weight: 600;
}

/* ============================================
   Footer Buttons
   ============================================ */
.elementor-menu-cart__footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-left: 1rem;
  padding-right: 1rem;
  flex-shrink: 0; /* Don't shrink, stay at bottom */
}

.elementor-menu-cart__footer-buttons .elementor-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}

.elementor-menu-cart__footer-buttons .elementor-button--checkout {
  height: 48px;
  background: #35ac5a;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.elementor-menu-cart__footer-buttons .elementor-button--checkout:hover {
  background: #2e9449;
}

/* Checkout button arrow icon */
.elementor-menu-cart__footer-buttons .nf-checkout-arrow-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.elementor-menu-cart__footer-buttons .elementor-button--continue-shopping {
  height: auto;
  padding: 8px 0;
  background: transparent;
  color: #000;
  border: none;
  font-weight: 300;
  font-size: 16px;
}

.elementor-menu-cart__footer-buttons
  .elementor-button--continue-shopping:hover {
  color: #333;
  text-decoration: none;
}

.elementor-menu-cart__footer-buttons .nf-continue-shopping-icon {
  width: 10px;
  height: 10px;
  margin-right: 6px;
}

/* ============================================
   Cart Offers (from Offers Module)
   ============================================ */
/* Offers Section Header */
.nf-sidecart-offers-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ececec;
  background-color: #f2f2f2;
  flex-shrink: 0; /* Don't shrink, stay at bottom */
  max-height: 60vh; /* Limit offers section to 60% of viewport */
  overflow-y: auto; /* Allow scrolling if offers exceed max-height */
}


.nf-offers-header {
  display: flex;
  align-items: center;
  padding: 0 12px 12px;
  gap: 10px;
  justify-content: center;
  border-bottom: 1px solid #DFDFDF;
}

.nf-offers-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.nf-offers-timer {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  font-family: 'Fira Sans', sans-serif;
}

.nf-sidecart-upsells {
  padding: 0 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px !important;
  padding-bottom: 80px; /* Extra space for mobile browser UI */
}

.nf-sidecart-upsells::before {
  display: none;
}

/* Card */
.nf-sidecart-upsells .nf-upsell-card {
  background: transparent;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.nf-sidecart-upsells .nf-upsell-body {
  display: grid;
  grid-template-columns: 50px 1fr auto; /* image | text | button */
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  padding: 8px;
}

/* Image */
.nf-sidecart-upsells .nf-upsell-media {
  grid-row: 1 / span 1;
  width: 50px;
  height: 70px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf-sidecart-upsells .nf-upsell-image {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

/* Text */
.nf-sidecart-upsells .nf-upsell-text {
  min-width: 0; /* allow ellipsis */
}

.nf-sidecart-upsells .nf-upsell-title {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  color: #000;
}

/* Rating */
.nf-sidecart-upsells .nf-upsell-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.nf-sidecart-upsells .nf-upsell-rating img.star {
  width: 12px;
  height: 12px;
  display: inline-block;
}

.nf-sidecart-upsells span.rating-count {
  font-size: 14px !important;
  font-weight: 300 !important;
  font-family: 'Fira Sans',sans-serif;
}

/* Description */
.nf-sidecart-upsells .nf-upsell-description {
  margin: 0 0 2px;
  font-size: 12px;
  line-height: 1.4;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 200;
  font-family: 'Fira Sans',sans-serif;
}

.nf-sidecart-upsells .nf-upsell-price {
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  color: #111827;
}

/* Button */
.nf-sidecart-upsells .nf-upsell-actions {
  align-self: end;
}

/* Icon button variant (with image icon) */
.nf-sidecart-upsells .nf-upsell-add.nf-icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  min-width: 0;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: transparent;
  text-transform: none;
  box-shadow: none;
}

.nf-sidecart-upsells .nf-upsell-add.nf-icon-btn:hover {
  background: transparent;
  border: none;
  opacity: 0.8;
}

.nf-sidecart-upsells .nf-upsell-add.nf-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Text button variant (fallback) */
.nf-sidecart-upsells .nf-upsell-add.button:not(.nf-icon-btn) {
  padding: 6px 12px;
  min-width: 0;
  font-size: 12px;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid #35ac5a;
  background: #35ac5a;
  color: #fff;
  text-transform: none;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.nf-sidecart-upsells .nf-upsell-add.button:not(.nf-icon-btn):hover {
  background: #2e9449;
  border-color: #2e9449;
}

.nf-sidecart-upsells .nf-upsell-add.button:not(.nf-icon-btn):disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Icon-only CTA */
.nf-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nf-icon-btn img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

/* Icon button states */
.nf-icon-btn:hover {
  opacity: 0.8;
}

.nf-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Responsive: stack to one column on very small widths */
@media (max-width: 380px) {
  .nf-sidecart-upsells {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Empty Cart State
   ============================================ */
.nf-empty-cart-notice {
  text-align: center;
  padding: 20px 20px;
  margin-bottom: 12px;
}

.nf-empty-cart-icon {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nf-empty-cart-icon svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

.nf-empty-cart-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px 0;
}

.nf-empty-cart-description {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Empty cart layout - push offers to bottom */
.widget_shopping_cart_content:has(.nf-empty-cart-notice) {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 0 !important;
}

/* Progress bar in empty cart - remove top padding */
.widget_shopping_cart_content:has(.nf-empty-cart-notice) .nf-sidecart-free-shipping-progress {
  padding-top: 1rem;
  margin-bottom: 16px;
}

/* Wrapper for empty cart content (progress bar + notice + button) */
.widget_shopping_cart_content:has(.nf-empty-cart-notice) > *:not(.nf-sidecart-offers-section) {
  flex-shrink: 0;
}

/* Offers section in empty cart - stick to bottom */
.widget_shopping_cart_content:has(.nf-empty-cart-notice) .nf-sidecart-offers-section {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid #ececec;
}

/* Continue shopping button in empty cart - center align */
.widget_shopping_cart_content:has(.nf-empty-cart-notice) .elementor-menu-cart__footer-buttons {
  /*margin-top: 8px;*/
  margin-bottom: 16px;
  align-items: center;
}

.widget_shopping_cart_content:has(.nf-empty-cart-notice) .elementor-menu-cart__footer-buttons .elementor-button--continue-shopping {
  width: auto;
}

/* Legacy empty message (fallback) */
.woocommerce-mini-cart__empty-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

/* ============================================
   Loading State
   ============================================ */
.nf-sidecart-loading {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.nf-sidecart-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #35ac5a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.elementor-menu-cart__close-button {
  display: none;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  /* NO padding on main container - allows offers grey background to be full width */
  .elementor-menu-cart__main {
    padding-left: 0;
    padding-right: 0;
  }

  .elementor-menu-cart__product {
    grid-template-columns: 60px 1fr auto;
    gap: 8px;
  }

  .elementor-menu-cart__product-image {
    width: 60px;
    height: 60px;
  }

  /* Utility class for consistent horizontal padding */
  .nf-sidecart-padding-x {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Apply utility class to elements needing horizontal padding */
  .nf-sidecart-free-shipping-progress,
  .nf-cart-heading,
  .elementor-menu-cart__products.woocommerce-mini-cart,
  .elementor-menu-cart__subtotal,
  .elementor-menu-cart__discount,
  .elementor-menu-cart__footer-buttons,
  .nf-offers-header,
  .nf-sidecart-upsells {
    padding-left: 1rem;
    padding-right: 2rem;
  }

  .nf-sidecart-free-shipping-notice {
    font-size: 13px;
    padding: 10px 12px;
  }

  .elementor-menu-cart__products.woocommerce-mini-cart {
    flex: 1 1 auto;
    min-height: 100px; /* Ensure minimum visible height */
    max-height: none;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior: contain; /* Prevent scroll chaining to body */
    touch-action: pan-y; /* Allow vertical scrolling only */
  }

  .nf-sidecart-coupon {
    margin-left: 1rem;
    margin-right: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .elementor-menu-cart__footer-buttons {
    padding-bottom: 0; /* No bottom padding */
    margin-bottom: 0;
  }

  .elementor-menu-cart__footer-buttons .elementor-button {
    height: 44px;
    font-size: 14px;
  }

  /* Offers section - full width, no side padding on container */
  .nf-sidecart-offers-section {
    margin-top: 14px;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 0; /* No bottom padding */
  }

  .nf-sidecart-upsells {
    padding-bottom: max(100px, env(safe-area-inset-bottom, 0px) + 80px); /* Extra space for mobile browser UI bars and safe areas */
  }

  .widget_shopping_cart_content {
    padding-top: 0;
    height: 100% !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    overscroll-behavior: contain;
  }
}

.elementor-menu-cart__product-name.product-name br {
  display: none !important;
}

/* ============================================
   Subscription Badge
   ============================================ */
.nf-subscription-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: #50ab5a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}


.nf-sidecart-coupon-form input::placeholder {
  font-weight: 200;
  font-size: 14px;
  font-family: 'Fira Sans',sans-serif;
}

.elementor-menu-cart__footer-buttons {
  font-size: 16px !important;
  font-weight: 500;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.elementor-menu-cart__product-quantity .quantity * {
  font-weight: 300 !important;
}

span.nf-offers-title__primary {
  font-size: 16px;
  font-weight: 500;
}

span.nf-offers-title__secondary {
  font-size: 16px;
  font-weight: 300;
}


del.nf-upsell-price__regular {
  font-size: 14px;
  font-weight: 300;
}

ins.nf-upsell-price__sale {
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}