/* ============================================
   CUSTOMER CART AND DRAWER
   ============================================ */

.sticky-cart {
  position: relative;
  background: var(--nf-white);
  border: 1px solid var(--nf-line);
  border-radius: 16px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.cart-header {
  padding: 20px;
  border-bottom: 2px solid var(--nf-line-soft);
}

.cart-subtitle {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--nf-text-muted);
}

.cart-clear-btn {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.section-cart {
  padding: 0;
}

.cart-items-container {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 300px);
  border-radius: 0 0 16px 16px;
}

.cart-items-container::-webkit-scrollbar {
  width: 6px;
}

.cart-items-container::-webkit-scrollbar-track {
  background: var(--nf-line-soft);
  border-radius: 3px;
}

.cart-items-container::-webkit-scrollbar-thumb {
  background: var(--nf-promo-dot);
  border-radius: 3px;
}

.cart-items-container::-webkit-scrollbar-thumb:hover {
  background: var(--nf-text-faint);
}

.el-drawer.drawer-preview-cart .el-drawer__body,
.drawer-preview-cart .el-drawer__body {
  padding: 10px 12px 14px !important;
}

.el-drawer.drawer-preview-cart .el-drawer__header,
.drawer-preview-cart .el-drawer__header {
  margin-bottom: 0 !important;
  padding: 10px 12px 0 !important;
}

.el-drawer.drawer-preview-cart .el-drawer__body > .mt-3.mb-0,
.drawer-preview-cart .el-drawer__body > .mt-3.mb-0 {
  margin-top: 4px !important;
}

.el-drawer.drawer-preview-cart .el-drawer__body > .mt-3.mb-0 h5,
.drawer-preview-cart .el-drawer__body > .mt-3.mb-0 h5 {
  font-size: 23px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.el-drawer.drawer-preview-cart .el-drawer__body > .mt-3.mb-0 .text-muted,
.drawer-preview-cart .el-drawer__body > .mt-3.mb-0 .text-muted {
  margin-top: 2px !important;
  font-size: 12px;
  line-height: 1.3;
}

.el-drawer.drawer-preview-cart .section-cart,
.drawer-preview-cart .section-cart {
  margin-top: 6px;
}

.el-drawer.drawer-preview-cart
  .d-flex.justify-content-between.align-items-center.mb-1,
.drawer-preview-cart .d-flex.justify-content-between.align-items-center.mb-1 {
  margin: 8px 0 6px !important;
}

.el-drawer.drawer-preview-cart
  .d-flex.justify-content-between.align-items-center.mb-1
  a
  p,
.drawer-preview-cart .d-flex.justify-content-between.align-items-center.mb-1 a p {
  font-size: 12px;
  color: var(--nf-text-soft);
}

.el-drawer.drawer-preview-cart .section-cart .items,
.drawer-preview-cart .section-cart .items,
.el-drawer__body .section-cart .items {
  padding: 10px !important;
  margin-bottom: 8px !important;
  border: 1px solid var(--nf-line-soft) !important;
  border-radius: 10px !important;
  background: var(--nf-white) !important;
}

.el-drawer.drawer-preview-cart .section-cart .items:last-child,
.drawer-preview-cart .section-cart .items:last-child {
  margin-bottom: 0 !important;
}

.el-drawer.drawer-preview-cart .section-cart .line-items,
.drawer-preview-cart .section-cart .line-items {
  margin-bottom: 0 !important;
  align-items: flex-start;
}

.el-drawer.drawer-preview-cart .section-cart .line-items > [class*="col-"],
.drawer-preview-cart .section-cart .line-items > [class*="col-"] {
  padding-left: 4px;
  padding-right: 4px;
}

.el-drawer.drawer-preview-cart .section-cart .line-items .col-3:first-child,
.drawer-preview-cart .section-cart .line-items .col-3:first-child {
  flex: 0 0 56px;
  max-width: 56px;
}

.el-drawer.drawer-preview-cart
  .section-cart
  .line-items
  .col-3:first-child
  .el-image,
.drawer-preview-cart .section-cart .line-items .col-3:first-child .el-image {
  width: 48px !important;
  height: 48px !important;
  border-radius: 8px;
  border: 1px solid var(--nf-line);
  background: var(--nf-surface-soft);
}

.el-drawer.drawer-preview-cart .section-cart .line-items .col-6,
.drawer-preview-cart .section-cart .line-items .col-6 {
  flex: 1 1 auto;
  max-width: calc(100% - 120px);
}

.el-drawer.drawer-preview-cart .section-cart .line-items .col-6 > p.mb-1,
.drawer-preview-cart .section-cart .line-items .col-6 > p.mb-1 {
  margin-bottom: 2px !important;
  font-size: 13px;
  line-height: 1.3;
  color: var(--nf-ink);
  font-weight: 600;
}

.el-drawer.drawer-preview-cart .section-cart .line-items .col-6 > p.m-0.font11,
.drawer-preview-cart .section-cart .line-items .col-6 > p.m-0.font11 {
  font-size: 12px !important;
  line-height: 1.3;
  color: var(--nf-text-soft);
}

.el-drawer.drawer-preview-cart .section-cart a.rounded-pill,
.el-drawer.drawer-preview-cart .section-cart a.qty-btn,
.drawer-preview-cart .section-cart a.rounded-pill,
.drawer-preview-cart .section-cart a.qty-btn {
  padding: 0 !important;
}

.el-drawer.drawer-preview-cart .section-cart .line-items .col-6 > .quantity,
.drawer-preview-cart .section-cart .line-items .col-6 > .quantity,
.el-drawer__body .section-cart .line-items .col-6 > .quantity {
  margin-top: 6px !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: var(--nf-surface-soft) !important;
  background-image: none !important;
  border: 1px solid var(--nf-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  padding: 2px 4px !important;
}

.el-drawer.drawer-preview-cart
  .section-cart
  .line-items
  .col-6
  > .quantity
  .qty-btn,
.drawer-preview-cart .section-cart .line-items .col-6 > .quantity .qty-btn,
.el-drawer__body .section-cart .line-items .col-6 > .quantity .qty-btn {
  width: 20px !important;
  height: 20px !important;
  border-radius: 6px !important;
  border: 1px solid var(--nf-line) !important;
  background: var(--nf-white) !important;
  color: var(--nf-text-muted) !important;
  transform: none !important;
  box-shadow: none !important;
}

.el-drawer.drawer-preview-cart
  .section-cart
  .line-items
  .col-6
  > .quantity
  .qty-btn
  i,
.drawer-preview-cart .section-cart .line-items .col-6 > .quantity .qty-btn i,
.el-drawer__body .section-cart .line-items .col-6 > .quantity .qty-btn i {
  font-size: 13px !important;
  color: inherit !important;
}

.el-drawer.drawer-preview-cart
  .section-cart
  .line-items
  .col-6
  > .quantity
  .qty-btn:hover,
.drawer-preview-cart
  .section-cart
  .line-items
  .col-6
  > .quantity
  .qty-btn:hover {
  background: var(--nf-line-soft) !important;
  color: var(--nf-ink) !important;
}

.el-drawer.drawer-preview-cart
  .section-cart
  .line-items
  .col-6
  > .quantity
  .qty,
.drawer-preview-cart .section-cart .line-items .col-6 > .quantity .qty,
.el-drawer__body .section-cart .line-items .col-6 > .quantity .qty {
  min-width: 16px !important;
  color: var(--nf-ink) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.el-drawer.drawer-preview-cart .section-cart .line-items .col-3.quantity,
.drawer-preview-cart .section-cart .line-items .col-3.quantity,
.el-drawer__body .section-cart .line-items .col-3.quantity {
  flex: 0 0 60px !important;
  max-width: 60px !important;
  width: 60px !important;
  padding: 0 4px !important;
  text-align: right !important;
  background: transparent !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.el-drawer.drawer-preview-cart
  .section-cart
  .line-items
  .col-3.quantity
  > a.rounded-pill,
.drawer-preview-cart .section-cart .line-items .col-3.quantity > a.rounded-pill,
.el-drawer__body .section-cart .line-items .col-3.quantity > a.rounded-pill {
  width: 20px !important;
  height: 20px !important;
  line-height: 20px !important;
  border: 1px solid var(--nf-line) !important;
  background: var(--nf-surface-soft) !important;
  color: var(--nf-text-faint) !important;
}

.el-drawer.drawer-preview-cart
  .section-cart
  .line-items
  .col-3.quantity
  > a.rounded-pill:hover,
.drawer-preview-cart
  .section-cart
  .line-items
  .col-3.quantity
  > a.rounded-pill:hover {
  background: var(--nf-line-soft) !important;
  color: var(--nf-text-soft) !important;
}

.el-drawer.drawer-preview-cart .section-cart .line-items .col-3.quantity > p,
.drawer-preview-cart .section-cart .line-items .col-3.quantity > p,
.el-drawer__body .section-cart .line-items .col-3.quantity > p {
  margin-top: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: var(--nf-ink) !important;
  background: transparent !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.el-drawer.drawer-preview-cart .section-cart .addon-items,
.drawer-preview-cart .section-cart .addon-items {
  margin-bottom: 0 !important;
  margin-top: 4px;
}

.el-drawer.drawer-preview-cart .section-cart .addon-items .col-9,
.drawer-preview-cart .section-cart .addon-items .col-9 {
  padding-left: 4px !important;
}

.el-drawer.drawer-preview-cart .section-cart .addon-items p,
.drawer-preview-cart .section-cart .addon-items p {
  font-size: 12px;
  line-height: 1.3;
  color: var(--nf-text-muted);
}

.el-drawer.drawer-preview-cart .divider,
.drawer-preview-cart .divider {
  margin: 10px 0;
  background: var(--nf-line) !important;
}

.el-drawer.drawer-preview-cart .btn.btn-green,
.drawer-preview-cart .btn.btn-green {
  height: 42px;
  border-radius: 10px !important;
  background: var(--nf-success-dark) !important;
  background-image: none !important;
  box-shadow: 0 3px 10px var(--nf-success-shadow-deep) !important;
  transform: none !important;
}

.el-drawer.drawer-preview-cart .btn.btn-green:hover,
.el-drawer.drawer-preview-cart .btn.btn-green:active,
.drawer-preview-cart .btn.btn-green:hover,
.drawer-preview-cart .btn.btn-green:active {
  background: var(--nf-success-deep) !important;
  background-image: none !important;
  transform: none !important;
}

.empty-cart-center {
  text-align: center;
  padding: 40px 20px;
}

.empty-bag-icon {
  color: var(--nf-promo-dot);
  margin-bottom: 16px;
}

.empty-main-text {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--nf-text-soft);
  margin-bottom: 6px;
}

.empty-sub-text {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
  color: var(--nf-text-faint);
}

.cart-line {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--nf-line-soft);
}

.cart-line:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.cart-item-main {
  flex: 1;
  min-width: 0;
  padding-right: 12px;
}

.item-title {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--nf-ink-soft);
  margin-bottom: 4px;
  line-height: 1.4;
}

.item-size {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 12px;
  color: var(--nf-text-soft);
  background: var(--nf-surface-soft);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.cart-item-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.item-total {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--nf-ink-soft);
}

.item-total.sale {
  color: var(--nf-success);
}

.remove-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--nf-danger-surface);
  color: var(--nf-danger);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.remove-btn:hover {
  background: var(--nf-danger-surface-strong);
  transform: scale(1.1);
}

.cart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.price-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 13px;
}

.free-badge {
  color: var(--nf-success);
  font-weight: 600;
}

.original-price {
  color: var(--nf-text-faint);
  text-decoration: line-through;
}

.sale-price {
  color: var(--nf-success);
  font-weight: 600;
}

.unit-price {
  color: var(--nf-text-soft);
}

.qty-controls {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: var(--nf-surface-soft) !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  border: 1px solid var(--nf-line) !important;
}

.qty-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  border: none !important;
  background: var(--nf-white) !important;
  color: var(--nf-ink-soft) !important;
  font-size: 20px !important;
  font-weight: 300 !important;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: var(--nf-shadow-xs) !important;
  flex-shrink: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.qty-btn:hover {
  background: var(--nf-black) !important;
  color: var(--nf-white) !important;
}

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

.qty-btn i {
  font-size: 14px !important;
  display: block !important;
}

.qty-num {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--nf-ink-soft) !important;
  min-width: 36px !important;
  text-align: center !important;
  user-select: none !important;
  display: inline-block !important;
}

.cart-extras {
  margin-top: 8px;
  padding: 8px;
  background: var(--nf-surface-soft);
  border-radius: 6px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 12px;
  color: var(--nf-text-soft);
  line-height: 1.5;
}

.instructions {
  font-style: italic;
}

.attributes {
  margin-top: 4px;
  color: var(--nf-text-faint);
}

.cart-addons {
  margin-top: 8px;
  padding: 8px;
  background: var(--nf-warning-surface);
  border-radius: 6px;
  border-left: 3px solid var(--nf-warning);
}

.addon-group {
  margin-bottom: 8px;
}

.addon-group:last-child {
  margin-bottom: 0;
}

.addon-title {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--nf-warning-text);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.addon-line {
  display: flex;
  justify-content: space-between;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 12px;
  color: var(--nf-warning-deep);
  margin-bottom: 2px;
}

.addon-detail {
  flex: 1;
}

.addon-price {
  font-weight: 600;
}

.cart-summary {
  padding: 16px 20px;
  background: var(--nf-surface-soft);
  border-top: 1px solid var(--nf-line);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
  color: var(--nf-text-muted);
  flex-shrink: 0;
}

.cart-summary h6 {
  font-size: 16px;
  font-weight: 700;
  color: var(--nf-ink-soft);
}

/* Cart Checkout Button - High Specificity */
.sticky-cart a.cart-checkout-btn.btn,
.sticky-cart .cart-checkout-btn,
a.btn.cart-checkout-btn {
  background: var(--nf-black) !important;
  background-image: none !important;
  color: var(--nf-white) !important;
  border: none !important;
  border-radius: 0 0 14px 14px !important;
  padding: 18px 20px !important;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
  display: flex !important;
}

.sticky-cart a.cart-checkout-btn.btn:hover,
.sticky-cart .cart-checkout-btn:hover,
a.btn.cart-checkout-btn:hover {
  background: var(--nf-ink-soft) !important;
  background-image: none !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--nf-card-shadow-dark-soft) !important;
  color: var(--nf-white) !important;
  text-decoration: none !important;
}

.sticky-cart a.cart-checkout-btn.btn:active,
.sticky-cart .cart-checkout-btn:active,
a.btn.cart-checkout-btn:active {
  transform: translateY(0) !important;
}

.sticky-cart a.cart-checkout-btn.btn.btn-disabled,
.sticky-cart a.cart-checkout-btn.btn-disabled,
.sticky-cart a.cart-checkout-btn[disabled],
a.btn.cart-checkout-btn.btn-disabled,
a.btn.cart-checkout-btn[disabled] {
  background: var(--nf-slate-disabled) !important;
  background-image: none !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: none !important;
  transform: none !important;
}

.cart-checkout-btn .checkout-label {
  font-weight: 600 !important;
}

.cart-checkout-btn .checkout-total {
  font-weight: 700 !important;
  font-size: 17px !important;
}

@media (max-width: 991px) {
  .sticky-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    border-radius: 16px 16px 0 0;
    z-index: 1000;
    max-height: 70vh;
  }

  .cart-items-container {
    max-height: 50vh;
  }
}
