/**
 * Super Modern Fly Cart Pro - Professional Styles
 * Version: 3.2.0
 * Universal layout compatibility + enhanced animations + quantity controls
 */

:root {
  --smfcp-primary: #c8504a;
  --smfcp-bg-light: #f5f5f5;
  --smfcp-border: #e5e5e5;
  --smfcp-text-dark: #111;
  --smfcp-text-light: #666;
  --smfcp-radius: 12px;
  --smfcp-shadow: 0 4px 20px rgba(0,0,0,0.08);
  --smfcp-z-overlay: 999997;
  --smfcp-z-toggle: 999998;
  --smfcp-z-sidebar: 999999;
  --smfcp-z-fly: 9999999;
}

/* ============================================
   RESET & ISOLATION - Nuclear approach
   ============================================ */

#smfcp-flycart {
  all: initial;
  display: block !important;
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#smfcp-flycart *:not(svg):not(path):not(use):not(g),
#smfcp-flycart *::before,
#smfcp-flycart *::after {
  all: unset;
  box-sizing: border-box !important;
}

/* Re-establish essential styles */
#smfcp-flycart,
#smfcp-flycart * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  line-height: 1.5 !important;
  color: var(--smfcp-text-dark);
}

#smfcp-flycart a {
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer !important;
}

#smfcp-flycart button {
  cursor: pointer !important;
  border: none !important;
  background: none !important;
  font-family: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
}

#smfcp-flycart img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  border: none !important;
}

#smfcp-flycart strong {
  font-weight: 600 !important;
}

/* ============================================
   SVG ICON FIX - Critical for PC browsers
   ============================================ */

#smfcp-flycart svg {
  display: inline-block !important;
  vertical-align: middle !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  fill: currentColor !important;
  /* Force hardware acceleration */
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  /* Ensure SVG renders */
  shape-rendering: geometricPrecision !important;
}

#smfcp-flycart svg path {
  fill: inherit !important;
}

/* Specific icon containers */
#smfcp-flycart .smfcp-bag,
#smfcp-flycart .smfcp-header-icon,
#smfcp-flycart .smfcp-remove,
#smfcp-flycart .smfcp-shortcode-icon,
#smfcp-flycart .smfcp-qty-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

#smfcp-flycart .smfcp-bag svg,
#smfcp-flycart .smfcp-header-icon svg,
#smfcp-flycart .smfcp-remove svg,
#smfcp-flycart .smfcp-qty-btn svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

/* ============================================
   HIDDEN STATE
   ============================================ */

#smfcp-flycart.smfcp-hidden {
  display: block !important;
}

#smfcp-flycart.smfcp-hidden .smfcp-toggle {
  display: none !important;
}

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

#smfcp-flycart::before {
  content: '' !important;
  display: block !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0) !important;
  pointer-events: none !important;
  transition: background 0.3s ease !important;
  z-index: var(--smfcp-z-overlay) !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

#smfcp-flycart.smfcp-open::before {
  background: rgba(0, 0, 0, 0.5) !important;
  pointer-events: all !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================
   TOGGLE BUTTON
   ============================================ */

#smfcp-flycart .smfcp-toggle {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  background: #fff !important;
  border-radius: 50% !important;
  border: 1px solid var(--smfcp-border) !important;
  padding: 12px !important;
  box-shadow: var(--smfcp-shadow) !important;
  cursor: pointer !important;
  z-index: var(--smfcp-z-toggle) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 56px !important;
  height: 56px !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease !important;
  margin: 0 !important;
}

#smfcp-flycart .smfcp-toggle:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 6px 25px rgba(0,0,0,0.12) !important;
}

#smfcp-flycart .smfcp-toggle:active {
  transform: scale(0.95) !important;
}

#smfcp-flycart .smfcp-toggle:focus {
  outline: 2px solid var(--smfcp-primary) !important;
  outline-offset: 2px !important;
}

#smfcp-flycart .smfcp-toggle .smfcp-bag {
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  width: 28px !important;
  height: 28px !important;
  position: relative !important;
}

#smfcp-flycart .smfcp-toggle .smfcp-bag svg {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
}

#smfcp-flycart .smfcp-count-bubble {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  background: var(--smfcp-primary) !important;
  color: #fff !important;
  font-size: 12px !important;
  border-radius: 50% !important;
  min-width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  padding: 2px 6px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* ============================================
   SIDEBAR
   ============================================ */

#smfcp-flycart .smfcp-sidebar {
  position: fixed !important;
  top: 0 !important;
  right: -100% !important;
  width: 400px !important;
  max-width: 90vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: var(--smfcp-bg-light) !important;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  z-index: var(--smfcp-z-sidebar) !important;
  overflow: hidden !important;
}

#smfcp-flycart.smfcp-open .smfcp-sidebar {
  right: 0 !important;
}

/* Left position variant */
#smfcp-flycart.smfcp-pos-left .smfcp-sidebar {
  right: auto !important;
  left: -100% !important;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15) !important;
  transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

#smfcp-flycart.smfcp-pos-left.smfcp-open .smfcp-sidebar {
  left: 0 !important;
}

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

#smfcp-flycart .smfcp-sidebar-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 16px 20px !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
  position: relative !important;
  z-index: 1 !important;
  flex-shrink: 0 !important;
}

#smfcp-flycart .smfcp-header-center {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

#smfcp-flycart .smfcp-header-icon-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#smfcp-flycart .smfcp-header-icon {
  width: 24px !important;
  height: 24px !important;
  color: var(--smfcp-text-dark) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#smfcp-flycart .smfcp-header-icon svg {
  width: 24px !important;
  height: 24px !important;
  fill: currentColor !important;
}

#smfcp-flycart .smfcp-count {
  position: absolute !important;
  top: -4px !important;
  right: -8px !important;
  background: var(--smfcp-text-dark) !important;
  color: #fff !important;
  font-size: 10px !important;
  border-radius: 50% !important;
  min-width: 16px !important;
  height: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  box-shadow: 0 0 0 2px #fff !important;
  padding: 2px 4px !important;
}

#smfcp-flycart .smfcp-header-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--smfcp-text-dark) !important;
  display: block !important;
}

#smfcp-flycart .smfcp-close {
  background: none !important;
  border: none !important;
  font-size: 24px !important;
  cursor: pointer !important;
  padding: 5px !important;
  line-height: 1 !important;
  color: var(--smfcp-text-light) !important;
  position: relative !important;
  z-index: 2 !important;
  margin-left: auto !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
  display: block !important;
}

#smfcp-flycart .smfcp-close:hover {
  color: var(--smfcp-primary) !important;
  transform: rotate(90deg) !important;
}

#smfcp-flycart .smfcp-close:focus {
  outline: 2px solid var(--smfcp-primary) !important;
  outline-offset: 2px !important;
}

/* ============================================
   CONTENT AREA
   ============================================ */

#smfcp-flycart .smfcp-content-wrap {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 20px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--smfcp-border) transparent !important;
}

#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar {
  width: 6px !important;
}

#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar-track {
  background: transparent !important;
}

#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar-thumb {
  background: var(--smfcp-border) !important;
  border-radius: 3px !important;
}

#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar-thumb:hover {
  background: #ccc !important;
}

#smfcp-flycart .smfcp-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
}

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

#smfcp-flycart .smfcp-item {
  display: grid !important;
  grid-template-columns: 60px 1fr auto !important;
  grid-template-rows: auto auto !important;
  gap: 12px 12px !important;
  padding: 15px !important;
  background: #fff !important;
  border-radius: var(--smfcp-radius) !important;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease !important;
  position: relative !important;
}

#smfcp-flycart .smfcp-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

#smfcp-flycart .smfcp-item-thumb {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  flex-shrink: 0 !important;
  display: block !important;
}

#smfcp-flycart .smfcp-item-thumb img {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  display: block !important;
}

#smfcp-flycart .smfcp-item-thumb a {
  display: block !important;
}

#smfcp-flycart .smfcp-item-info {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

#smfcp-flycart .smfcp-item-title {
  font-weight: 600 !important;
  text-transform: uppercase !important;
  color: var(--smfcp-text-dark) !important;
  font-size: 14px !important;
  margin-bottom: 0 !important;
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#smfcp-flycart .smfcp-item-title a {
  color: var(--smfcp-text-dark) !important;
  transition: color 0.2s ease !important;
}

#smfcp-flycart .smfcp-item-title a:hover {
  color: var(--smfcp-primary) !important;
}

#smfcp-flycart .smfcp-item-meta {
  display: none !important;
}

/* Top right section - Unit price and Remove button */
#smfcp-flycart .smfcp-item-top-right {
  grid-column: 3 !important;
  grid-row: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  justify-content: flex-end !important;
}

#smfcp-flycart .smfcp-item-unit-price {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--smfcp-primary) !important;
  white-space: nowrap !important;
}

/* Bottom left - Quantity controls */
#smfcp-flycart .smfcp-qty-controls {
  grid-column: 2 !important;
  grid-row: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: var(--smfcp-bg-light) !important;
  border: 1px solid var(--smfcp-border) !important;
  border-radius: 20px !important;
  padding: 4px !important;
  width: fit-content !important;
}

/* Bottom right - Total price */
#smfcp-flycart .smfcp-item-subtotal {
  grid-column: 3 !important;
  grid-row: 2 !important;
  font-size: 16px !important;
  font-weight: bold !important;
  color: var(--smfcp-text-dark) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  white-space: nowrap !important;
}

#smfcp-flycart .smfcp-item-subtotal .amount {
  color: var(--smfcp-text-dark) !important;
}

/* Remove old item-actions styles */
#smfcp-flycart .smfcp-item-actions {
  display: contents !important;
}

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

#smfcp-flycart .smfcp-qty-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: var(--smfcp-text-dark) !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

#smfcp-flycart .smfcp-qty-btn:hover:not(:disabled) {
  background: var(--smfcp-primary) !important;
  color: #fff !important;
  transform: scale(1.1) !important;
}

#smfcp-flycart .smfcp-qty-btn:active:not(:disabled) {
  transform: scale(0.95) !important;
}

#smfcp-flycart .smfcp-qty-btn:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

#smfcp-flycart .smfcp-qty-btn svg {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
  pointer-events: none !important;
}

#smfcp-flycart .smfcp-qty-display {
  min-width: 24px !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--smfcp-text-dark) !important;
  line-height: 1 !important;
  padding: 0 4px !important;
  user-select: none !important;
  display: block !important;
}

#smfcp-flycart .smfcp-remove {
  color: var(--smfcp-text-light) !important;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px !important;
  border-radius: 4px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  background: transparent !important;
  width: 30px !important;
  height: 30px !important;
}

#smfcp-flycart .smfcp-remove:hover {
  background: rgba(200, 80, 74, 0.1) !important;
  transform: scale(1.1) !important;
}

#smfcp-flycart .smfcp-remove:focus {
  outline: 2px solid var(--smfcp-primary) !important;
  outline-offset: 2px !important;
}

#smfcp-flycart .smfcp-remove svg {
  display: block !important;
  pointer-events: none !important;
  width: 20px !important;
  height: 20px !important;
  fill: currentColor !important;
}

/* ============================================
   LAYOUT WITHOUT QUANTITY CONTROLS
   ============================================ */

#smfcp-flycart .smfcp-item.smfcp-no-qty {
  grid-template-rows: auto !important;
}

#smfcp-flycart .smfcp-item.smfcp-no-qty .smfcp-item-info {
  grid-row: 1 !important;
}

#smfcp-flycart .smfcp-item.smfcp-no-qty .smfcp-item-subtotal {
  grid-column: 3 !important;
  align-self: end !important;
}

#smfcp-flycart .smfcp-item-qty-text {
  font-size: 12px !important;
  color: var(--smfcp-text-light) !important;
  margin-top: 4px !important;
  display: block !important;
}

#smfcp-flycart .smfcp-item.smfcp-no-qty .smfcp-qty-controls {
  display: none !important;
}

/* ============================================
   FOOTER AREA
   ============================================ */

#smfcp-flycart .smfcp-sidebar-foot {
  background: #fff !important;
  padding: 20px !important;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05) !important;
  flex-shrink: 0 !important;
  display: block !important;
}

#smfcp-flycart .smfcp-subtotal {
  font-size: 16px !important;
  font-weight: 600 !important;
  display: flex !important;
  justify-content: space-between !important;
  margin-bottom: 20px !important;
  align-items: center !important;
}

#smfcp-flycart .smfcp-subtotal strong {
  font-weight: 600 !important;
  color: var(--smfcp-text-dark) !important;
  display: block !important;
}

#smfcp-flycart .smfcp-subtotal-amount,
#smfcp-flycart .smfcp-subtotal .amount {
  color: var(--smfcp-primary) !important;
  font-weight: 700 !important;
}

#smfcp-flycart .smfcp-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#smfcp-flycart .smfcp-btn {
  display: block !important;
  text-align: center !important;
  padding: 14px !important;
  border-radius: 30px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: none !important;
  font-size: 15px !important;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer !important;
  width: 100% !important;
}

#smfcp-flycart .smfcp-btn:hover {
  opacity: 0.85 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

#smfcp-flycart .smfcp-btn:active {
  transform: translateY(0) !important;
}

#smfcp-flycart .smfcp-btn:focus {
  outline: 2px solid var(--smfcp-primary) !important;
  outline-offset: 2px !important;
}

#smfcp-flycart .smfcp-btn-primary {
  background: var(--smfcp-primary) !important;
  color: #fff !important;
}

#smfcp-flycart .smfcp-btn-secondary {
  background: transparent !important;
  color: var(--smfcp-text-dark) !important;
  border: 2px solid var(--smfcp-border) !important;
}

#smfcp-flycart .smfcp-btn-secondary:hover {
  border-color: var(--smfcp-primary) !important;
  color: var(--smfcp-primary) !important;
}

/* ============================================
   EMPTY & LOADING STATES
   ============================================ */

#smfcp-flycart .smfcp-empty,
#smfcp-flycart .smfcp-loading,
#smfcp-flycart .smfcp-error {
  padding: 40px 20px !important;
  text-align: center !important;
  color: var(--smfcp-text-light) !important;
  font-size: 15px !important;
  display: block !important;
}

#smfcp-flycart .smfcp-empty p {
  margin: 0 !important;
  display: block !important;
}

#smfcp-flycart .smfcp-loading::after {
  content: '' !important;
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  margin: 20px auto 0 !important;
  border: 3px solid var(--smfcp-border) !important;
  border-top-color: var(--smfcp-primary) !important;
  border-radius: 50% !important;
  animation: smfcp-spin 0.8s linear infinite !important;
}

#smfcp-flycart .smfcp-error {
  color: #d32f2f !important;
}

@keyframes smfcp-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   ENHANCED FLY ANIMATION STYLES
   ============================================ */

.smfcp-fly-img,
.smfcp-fly-icon {
  position: fixed !important;
  z-index: var(--smfcp-z-fly) !important;
  pointer-events: none !important;
  will-change: transform, opacity, left, top !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform-origin: center center !important;
}

.smfcp-fly-img {
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3) !important;
  object-fit: cover !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.smfcp-fly-icon {
  border-radius: 50% !important;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4) !important;
}

.smfcp-fly-icon svg {
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  fill: #fff !important;
}

/* Cart button pulse animation */
#smfcp-flycart .smfcp-toggle.smfcp-pulse {
  animation: smfcp-pulse 0.4s ease !important;
}

@keyframes smfcp-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* ============================================
   UNIVERSAL LAYOUT COMPATIBILITY
   ============================================ */

/* Ensure images in custom layouts are detected */
.product-grid-item img,
.product-list-item img,
.grid-item img,
.loop-item img,
.catalog-item img,
.shop-item img,
.wc-product img {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

/* Page builder compatibility */
.elementor-product img,
.et_pb_module img,
.vc_col img,
.fusion-column img {
  display: block !important;
  position: relative !important;
}

/* Shortcode layouts */
[data-product-id] img,
[data-product] img {
  position: relative !important;
}

/* Background image support */
[style*="background-image"] {
  position: relative !important;
}

/* Custom layout support */
[class*="product-image"],
[class*="product_image"],
[class*="prod-img"],
[class*="item-image"] {
  position: relative !important;
}

[class*="product-image"] img,
[class*="product_image"] img,
[class*="prod-img"] img,
[class*="item-image"] img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
}

/* ============================================
   SHORTCODE ICON
   ============================================ */

.smfcp-shortcode-cart-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  position: relative !important;
  text-decoration: none !important;
  transition: transform 0.2s ease !important;
}

.smfcp-shortcode-cart-wrap:hover {
  transform: scale(1.05) !important;
}

.smfcp-shortcode-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  position: relative !important;
}

/* Shortcode icon - clickable cursor */
.smfcp-shortcode-cart-wrap.smfcp-shortcode-trigger {
  cursor: pointer !important;
}

.smfcp-shortcode-cart-wrap.smfcp-shortcode-trigger:hover .smfcp-shortcode-icon {
  transform: scale(1.1) !important;
  transition: transform 0.2s ease !important;
}

.smfcp-shortcode-icon svg {
  display: block !important;
  fill: currentColor !important;
}

.smfcp-shortcode-count {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  background: var(--smfcp-primary) !important;
  color: #fff !important;
  font-size: 11px !important;
  border-radius: 50% !important;
  min-width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  padding: 2px 5px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  #smfcp-flycart .smfcp-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  #smfcp-flycart .smfcp-toggle {
    bottom: 15px !important;
    right: 15px !important;
    width: 50px !important;
    height: 50px !important;
    padding: 10px !important;
  }
  
  #smfcp-flycart .smfcp-item {
    gap: 12px !important;
    padding: 12px !important;
  }
  
  #smfcp-flycart .smfcp-item-thumb img {
    width: 50px !important;
    height: 50px !important;
  }
  
  #smfcp-flycart .smfcp-item-title {
    font-size: 13px !important;
  }
  
  #smfcp-flycart .smfcp-item-meta {
    font-size: 12px !important;
  }
  
  #smfcp-flycart .smfcp-sidebar-head {
    padding: 12px 15px !important;
  }
  
  #smfcp-flycart .smfcp-sidebar-foot {
    padding: 15px !important;
  }
  
  #smfcp-flycart .smfcp-content-wrap {
    padding: 15px !important;
  }
  
  #smfcp-flycart .smfcp-qty-controls {
    padding: 3px !important;
  }
  
  #smfcp-flycart .smfcp-qty-btn {
    width: 22px !important;
    height: 22px !important;
  }
  
  #smfcp-flycart .smfcp-qty-btn svg {
    width: 14px !important;
    height: 14px !important;
  }
  
  #smfcp-flycart .smfcp-qty-display {
    font-size: 12px !important;
    min-width: 20px !important;
  }
}

@media (max-width: 480px) {
  #smfcp-flycart .smfcp-toggle {
    width: 45px !important;
    height: 45px !important;
    padding: 8px !important;
  }
  
  #smfcp-flycart .smfcp-toggle .smfcp-bag svg {
    width: 22px !important;
    height: 22px !important;
  }
  
  #smfcp-flycart .smfcp-count-bubble {
    font-size: 10px !important;
    min-width: 18px !important;
    height: 18px !important;
  }
  
  #smfcp-flycart .smfcp-header-title {
    font-size: 16px !important;
  }
  
  #smfcp-flycart .smfcp-btn {
    padding: 12px !important;
    font-size: 14px !important;
  }
  
  #smfcp-flycart .smfcp-item-actions {
    gap: 6px !important;
  }
  
  #smfcp-flycart .smfcp-qty-controls {
    padding: 2px !important;
    gap: 3px !important;
  }
  
  #smfcp-flycart .smfcp-qty-btn {
    width: 20px !important;
    height: 20px !important;
  }
  
  #smfcp-flycart .smfcp-qty-btn svg {
    width: 12px !important;
    height: 12px !important;
  }
  
  #smfcp-flycart .smfcp-qty-display {
    font-size: 11px !important;
    min-width: 18px !important;
  }
  
  #smfcp-flycart .smfcp-remove {
    width: 28px !important;
    height: 28px !important;
  }
  
  #smfcp-flycart .smfcp-remove svg {
    width: 18px !important;
    height: 18px !important;
  }
}

/* ============================================
   RTL SUPPORT
   ============================================ */

[dir="rtl"] #smfcp-flycart .smfcp-sidebar {
  right: auto !important;
  left: -100% !important;
}

[dir="rtl"] #smfcp-flycart.smfcp-open .smfcp-sidebar {
  left: 0 !important;
  right: auto !important;
}

[dir="rtl"] #smfcp-flycart .smfcp-toggle {
  right: auto !important;
  left: 20px !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

#smfcp-flycart .smfcp-toggle:focus,
#smfcp-flycart .smfcp-close:focus,
#smfcp-flycart .smfcp-btn:focus,
#smfcp-flycart .smfcp-remove:focus,
#smfcp-flycart .smfcp-qty-btn:focus {
  outline: 2px solid var(--smfcp-primary) !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  #smfcp-flycart *,
  #smfcp-flycart *::before,
  #smfcp-flycart *::after,
  .smfcp-fly-img,
  .smfcp-fly-icon {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  #smfcp-flycart .smfcp-toggle,
  #smfcp-flycart .smfcp-sidebar,
  #smfcp-flycart .smfcp-item {
    border: 2px solid currentColor !important;
  }
}

/* Smooth hardware-accelerated animations */
@media (prefers-reduced-motion: no-preference) {
  .smfcp-fly-img,
  .smfcp-fly-icon {
    transform: translate3d(0, 0, 0) !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  #smfcp-flycart {
    display: none !important;
  }
}

/* ============================================
   BROWSER-SPECIFIC FIXES
   ============================================ */

/* Fix for Safari/WebKit SVG rendering */
@supports (-webkit-appearance: none) {
  #smfcp-flycart svg {
    -webkit-backface-visibility: hidden !important;
    -webkit-perspective: 1000 !important;
  }
}

/* Fix for Firefox SVG rendering */
@-moz-document url-prefix() {
  #smfcp-flycart svg {
    shape-rendering: geometricPrecision !important;
  }
}

/* Force repaint in Edge/IE */
#smfcp-flycart .smfcp-bag svg,
#smfcp-flycart .smfcp-header-icon svg,
#smfcp-flycart .smfcp-remove svg,
#smfcp-flycart .smfcp-qty-btn svg {
  will-change: transform !important;
}

/* ============================================
   THEME COMPATIBILITY OVERRIDES
   ============================================ */

/* Override common theme conflicts */
#smfcp-flycart * {
  letter-spacing: normal !important;
  text-transform: none !important;
}

#smfcp-flycart .smfcp-item-title {
  text-transform: uppercase !important;
}

/* Ensure buttons work in all themes */
#smfcp-flycart button,
#smfcp-flycart .smfcp-btn {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Fix for themes that override positioning */
#smfcp-flycart .smfcp-toggle,
#smfcp-flycart .smfcp-sidebar,
#smfcp-flycart::before {
  position: fixed !important;
}

/* Fix for themes with aggressive resets */
#smfcp-flycart img {
  object-fit: cover !important;
  vertical-align: middle !important;
}

/* ============================================
   WooCommerce COMPATIBILITY
   ============================================ */

/* Ensure WooCommerce elements display correctly */
#smfcp-flycart .woocommerce-Price-amount {
  display: inline !important;
}

#smfcp-flycart .woocommerce-Price-currencySymbol {
  margin-right: 2px !important;
}

/* Product variation attributes */
#smfcp-flycart .variation {
  font-size: 13px !important;
  color: var(--smfcp-text-light) !important;
  margin-top: 4px !important;
  display: block !important;
}

#smfcp-flycart .variation dt,
#smfcp-flycart .variation dd {
  display: inline !important;
  margin: 0 !important;
}

#smfcp-flycart .variation dt {
  font-weight: 600 !important;
}

#smfcp-flycart .variation dd {
  margin-left: 4px !important;
}

/* ============================================
   PAGE BUILDER COMPATIBILITY
   ============================================ */

/* Elementor */
.elementor-product .smfcp-fly-img {
  display: block !important;
}

/* Divi */
.et_pb_wc_add_to_cart .smfcp-fly-img {
  display: block !important;
}

/* WPBakery */
.vc_woocommerce .smfcp-fly-img {
  display: block !important;
}

/* Beaver Builder */
.fl-module-woocommerce .smfcp-fly-img {
  display: block !important;
}

/* ============================================
   CUSTOM LAYOUT ENHANCEMENTS
   ============================================ */

/* Grid layouts */
.products.grid .smfcp-fly-img,
.woocommerce-products-grid .smfcp-fly-img {
  display: block !important;
}

/* List layouts */
.products.list .smfcp-fly-img,
.woocommerce-products-list .smfcp-fly-img {
  display: block !important;
}

/* Masonry layouts */
.products.masonry .smfcp-fly-img {
  display: block !important;
}

/* Slider/Carousel layouts */
.products-slider .smfcp-fly-img,
.product-carousel .smfcp-fly-img {
  display: block !important;
  z-index: 9999999 !important;
}

/* Quick view modals */
.quick-view-modal .smfcp-fly-img,
.quickview .smfcp-fly-img,
[class*="quick-view"] .smfcp-fly-img {
  display: block !important;
  z-index: 9999999 !important;
}

/* Off-canvas panels */
.off-canvas .smfcp-fly-img,
[class*="offcanvas"] .smfcp-fly-img {
  display: block !important;
  z-index: 9999999 !important;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Enable GPU acceleration for animations */
#smfcp-flycart .smfcp-sidebar,
#smfcp-flycart .smfcp-toggle,
.smfcp-fly-img,
.smfcp-fly-icon {
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
}

/* Optimize repaints */
#smfcp-flycart .smfcp-item {
  contain: layout style paint !important;
}

/* Optimize scrolling */
#smfcp-flycart .smfcp-content-wrap {
  will-change: scroll-position !important;
}

/* ============================================
   HIGH DPI / RETINA SUPPORT
   ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  #smfcp-flycart .smfcp-toggle {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
  }
  
  .smfcp-fly-img,
  .smfcp-fly-icon {
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
  }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode auto-detection
  
  #smfcp-flycart .smfcp-sidebar {
    background: #1a1a1a !important;
  }
  
  #smfcp-flycart .smfcp-sidebar-head,
  #smfcp-flycart .smfcp-sidebar-foot,
  #smfcp-flycart .smfcp-item {
    background: #2a2a2a !important;
  }
  
  #smfcp-flycart .smfcp-header-title,
  #smfcp-flycart .smfcp-item-title,
  #smfcp-flycart .smfcp-subtotal strong {
    color: #fff !important;
  }
  
  #smfcp-flycart .smfcp-item-meta,
  #smfcp-flycart .smfcp-close {
    color: #aaa !important;
  }
  
  #smfcp-flycart .smfcp-toggle {
    background: #2a2a2a !important;
    border-color: #3a3a3a !important;
  }
  
  #smfcp-flycart .smfcp-btn-secondary {
    border-color: #3a3a3a !important;
    color: #fff !important;
  }
  
  */
}

/* ============================================
   LOADING SKELETON (Optional Enhancement)
   ============================================ */

@keyframes smfcp-skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

#smfcp-flycart .smfcp-loading.smfcp-skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0px,
    #f8f8f8 40px,
    #f0f0f0 80px
  ) !important;
  background-size: 200px 100% !important;
  animation: smfcp-skeleton-loading 1.2s ease-in-out infinite !important;
}

/* ============================================
   CUSTOM SCROLLBAR STYLING
   ============================================ */

/* For Webkit browsers (Chrome, Safari, Edge) */
#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar {
  width: 8px !important;
}

#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 4px !important;
}

#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 4px !important;
  transition: background 0.2s ease !important;
}

#smfcp-flycart .smfcp-content-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3) !important;
}

/* For Firefox */
#smfcp-flycart .smfcp-content-wrap {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
}

/* ============================================
   FOCUS VISIBLE (Modern Focus States)
   ============================================ */

@supports selector(:focus-visible) {
  #smfcp-flycart .smfcp-toggle:focus:not(:focus-visible),
  #smfcp-flycart .smfcp-close:focus:not(:focus-visible),
  #smfcp-flycart .smfcp-btn:focus:not(:focus-visible),
  #smfcp-flycart .smfcp-remove:focus:not(:focus-visible),
  #smfcp-flycart .smfcp-qty-btn:focus:not(:focus-visible) {
    outline: none !important;
  }
  
  #smfcp-flycart .smfcp-toggle:focus-visible,
  #smfcp-flycart .smfcp-close:focus-visible,
  #smfcp-flycart .smfcp-btn:focus-visible,
  #smfcp-flycart .smfcp-remove:focus-visible,
  #smfcp-flycart .smfcp-qty-btn:focus-visible {
    outline: 2px solid var(--smfcp-primary) !important;
    outline-offset: 2px !important;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hide visually but keep for screen readers */
.smfcp-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip to main content link */
.smfcp-skip-link {
  position: absolute !important;
  top: -40px !important;
  left: 0 !important;
  background: var(--smfcp-primary) !important;
  color: white !important;
  padding: 8px !important;
  text-decoration: none !important;
  z-index: 100000 !important;
}

.smfcp-skip-link:focus {
  top: 0 !important;
}

/* ============================================
   ANIMATION PRESETS (For Future Use)
   ============================================ */

@keyframes smfcp-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes smfcp-slide-up {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes smfcp-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes smfcp-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ============================================
   END OF STYLES
   ============================================ */
