@import url(https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap);
/* Sheet animations */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation classes */
.animate-slide-left {
  animation: slideInFromRight 0.3s ease-out;
}

.animate-slide-right {
  animation: slideInFromLeft 0.3s ease-out;
}

.animate-slide-down {
  animation: slideInFromTop 0.3s ease-out;
}

.animate-slide-up {
  animation: slideInFromBottom 0.3s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out;
}

/* Chat widget specific styles */
.cosmera-chat-floating-button {
  transition: all 0.3s ease;
}

.cosmera-chat-floating-button:hover {
  transform: scale(1.1);
}

.cosmera-chat-message {
  animation: fadeIn 0.3s ease-out;
}

/* Responsive styles */
@media (max-width: 768px) {
  .cosmera-chat-sheet-right,
  .cosmera-chat-sheet-left {
    width: 100% !important;
  }
  
  .cosmera-chat-popup {
    width: 90% !important;
    margin: 0 5% !important;
  }
}

/* Focus styles for accessibility */
.cosmera-chat-input:focus {
  outline: none;
  ring: 2px;
  ring-offset: 2px;
}

.cosmera-chat-button:focus {
  outline: none;
  ring: 2px;
  ring-offset: 2px;
}

/* Slide up animation for mobile drawer */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Spin animation for loading */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Pulse animation for skeleton loaders */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

.pulse-animation {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Chat Widget Styles */

/* Import better fonts */

/* CSS Variables for theme colors */
:root {
    --cosmera-primary-color: #667eea;
    --cosmera-primary-dark: #5a67d8;
    --cosmera-secondary-color: #764ba2;
    --cosmera-message-bg: #f7fafc;
    --cosmera-user-message-bg: #667eea;
    --cosmera-text-primary: #1a202c;
    --cosmera-text-secondary: #4a5568;
    --cosmera-border-color: #e2e8f0;
    --cosmera-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --cosmera-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --cosmera-button-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Base styles */
.cosmera-chat-widget {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cosmera-chat-widget * {
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Force font on all text elements */
.cosmera-chat-widget div,
.cosmera-chat-widget span,
.cosmera-chat-widget p,
.cosmera-chat-widget h1,
.cosmera-chat-widget h2,
.cosmera-chat-widget h3,
.cosmera-chat-widget h4,
.cosmera-chat-widget h5,
.cosmera-chat-widget h6,
.cosmera-chat-widget button,
.cosmera-chat-widget input,
.cosmera-chat-widget textarea,
.cosmera-chat-widget label,
.cosmera-chat-widget a,
.cosmera-chat-widget li,
.cosmera-chat-widget ul,
.cosmera-chat-widget ol {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Floating button */
.cosmera-chat-button {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--cosmera-primary-color) 0%, var(--cosmera-secondary-color) 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.35) !important;
    cursor: pointer !important;
    z-index: 999998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cosmera-chat-button:hover {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.45) !important;
    transform: translateY(-3px) scale(1.08) !important;
}

.cosmera-chat-button svg {
    width: 32px !important;
    height: 32px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
}

/* Container styles */
#cosmera-chat-widget {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    z-index: 2147483647 !important; /* Maximum z-index */
    pointer-events: none !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

#cosmera-chat-widget > * {
    pointer-events: auto !important;
}

#cosmera-chat-widget *,
#cosmera-chat-widget *::before,
#cosmera-chat-widget *::after {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Reset WordPress input styles */
#cosmera-chat-widget input[type="text"],
.cosmera-chat-widget input[type="text"],
.cosmera-chat-input {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    background-clip: padding-box !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

/* Chat window styles */
.cosmera-chat-window-right {
    position: fixed !important;
    bottom: 100px !important;
    right: 24px !important;
    width: 400px !important;
    height: 650px !important;
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12) !important;
    z-index: 999999 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Popover content styles */
[data-radix-popper-content-wrapper] {
    z-index: 999999 !important; /* Match chat window z-index */
}

/* Floating window specific styles */
.cosmera-popover-custom .cosmera-chat-container {
    width: 380px !important;
    max-height: 600px !important;
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Animation styles for popover */
@keyframes slideUpAndFade {
    from {
        opacity: 0;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-state="open"][data-side="top"] {
    animation: slideUpAndFade 200ms ease-out;
}

/* Enhanced product card styles */
.cosmera-product-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cosmera-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Product card image */
.cosmera-product-card .product-image-container {
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f9fafb !important;
    margin-bottom: 12px !important;
    height: 140px !important;
}

.cosmera-product-card img {
    width: 100% !important;
    height: 100% !important;
    -o-object-fit: cover !important;
       object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.cosmera-product-card:hover img {
    transform: scale(1.05) !important;
}

/* Product card content */
.cosmera-product-card .product-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 4px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Product card description - prevent theme overrides */
.cosmera-product-description,
.cosmera-product-description p,
.cosmera-product-description span,
.cosmera-product-description div,
.cosmera-product-description * {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: inherit !important;
    line-height: 1.6 !important;
    color: #4b5563 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cosmera-product-card .product-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #6b21a8 !important;
    margin-bottom: 12px !important;
}

/* Add to cart button in product card */
.cosmera-product-card .add-to-cart-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.cosmera-product-card .add-to-cart-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6b21a8 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
}

/* Quantity controls in product card */
.cosmera-product-card .quantity-controls {
    background: #f3f4f6 !important;
    border-radius: 8px !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.cosmera-product-card .quantity-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.cosmera-product-card .quantity-btn:hover {
    background: #f9fafb !important;
    border-color: #9333ea !important;
    color: #7c3aed !important;
}

.cosmera-product-card .quantity-display {
    font-weight: 600 !important;
    color: #374151 !important;
    min-width: 40px !important;
    text-align: center !important;
}

/* Enhanced chat messages container */
.cosmera-messages-container {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem 0.5rem;
    /* Smooth scrolling for better UX */
    scroll-behavior: smooth;
    /* Disable scroll anchoring which might cause jumps */
    overflow-anchor: none;
    /* Prevent focus-related scroll jumps */
    overscroll-behavior: contain;
    /* Ensure stable height */
    min-height: 0;
    /* Fix flexbox scroll jump issue */
    height: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(249, 250, 251, 0.5) 100%);
}

/* Mobile-specific messages container */
@media (max-width: 768px) {
    .cosmera-messages-container {
        padding: 1rem 0.25rem;
        background: #fafbfc;
    }
}

/* Enhanced message styles */
.cosmera-chat-widget .cosmera-message {
    max-width: 85% !important;
    min-width: auto !important;
    padding: 0.875rem 1.25rem !important;
    border-radius: 18px !important;
    margin-bottom: 0.5rem !important;
    word-wrap: break-word !important;
    word-break: normal !important;
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    letter-spacing: 0.01em !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
    width: auto !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-transform: none !important;
}

/* Override WordPress theme styling on all message child elements */
.cosmera-chat-widget .cosmera-message p,
.cosmera-chat-widget .cosmera-message span,
.cosmera-chat-widget .cosmera-message div,
.cosmera-chat-widget .cosmera-message h1,
.cosmera-chat-widget .cosmera-message h2,
.cosmera-chat-widget .cosmera-message h3,
.cosmera-chat-widget .cosmera-message h4,
.cosmera-chat-widget .cosmera-message h5,
.cosmera-chat-widget .cosmera-message h6,
.cosmera-chat-widget .cosmera-message li,
.cosmera-chat-widget .cosmera-message ul,
.cosmera-chat-widget .cosmera-message ol,
.cosmera-chat-widget .cosmera-message strong,
.cosmera-chat-widget .cosmera-message em,
.cosmera-chat-widget .cosmera-message a,
.cosmera-chat-widget .cosmera-message code,
.cosmera-chat-widget .cosmera-message pre,
.cosmera-chat-widget .cosmera-message blockquote {
    text-transform: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    font-weight: inherit !important;
}

/* Specific overrides for headings to maintain hierarchy - prevent theme overrides */
.cosmera-chat-widget .cosmera-message h1,
.cosmera-chat-widget h1 {
    font-size: 1.5em !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.cosmera-chat-widget .cosmera-message h2,
.cosmera-chat-widget h2 {
    font-size: 1.3em !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.cosmera-chat-widget .cosmera-message h3,
.cosmera-chat-widget h3 {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.cosmera-chat-widget .cosmera-message h4,
.cosmera-chat-widget .cosmera-message h5,
.cosmera-chat-widget .cosmera-message h6,
.cosmera-chat-widget h4,
.cosmera-chat-widget h5,
.cosmera-chat-widget h6 {
    font-size: 1em !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* Code and strong elements */
.cosmera-chat-widget .cosmera-message code {
    font-size: 0.9em !important;
}

.cosmera-chat-widget .cosmera-message strong {
    font-weight: 600 !important;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cosmera-chat-widget .cosmera-message.cosmera-message-user {
    background: linear-gradient(135deg, var(--cosmera-primary-color) 0%, var(--cosmera-secondary-color) 100%) !important;
    color: white !important;
    margin-left: auto !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    border-bottom-right-radius: 4px !important;
    position: relative !important;
    min-width: -moz-fit-content !important;
    min-width: fit-content !important;
    width: auto !important;
    display: inline-block !important;
}

/* New message animation - only on initial render */
.cosmera-message-wrapper.new-message:not(.animation-complete) .cosmera-message {
    animation: messageSlideIn 0.2s ease-out forwards;
}

/* Mark animation as complete to prevent re-triggers */
.cosmera-message-wrapper.animation-complete .cosmera-message {
    animation: none !important;
}

/* History messages - no animation */
.cosmera-message-wrapper.history-message .cosmera-message {
    animation: none !important;
}

.cosmera-chat-widget .cosmera-message.cosmera-message-assistant {
    background: #f8f9fa !important;
    color: var(--cosmera-text-primary) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
    border-bottom-left-radius: 4px !important;
    position: relative !important;
    min-width: auto !important;
    max-width: 75% !important;
    width: auto !important;
    display: inline-block !important;
    padding: 1rem 1.5rem !important;
}

/* Message wrapper for proper alignment */
.cosmera-message-wrapper {
    display: flex;
    margin-bottom: 0.75rem;
    align-items: flex-end;
    padding: 0 1rem;
}

.cosmera-message-wrapper.user {
    justify-content: flex-end;
}

.cosmera-message-wrapper.assistant {
    justify-content: flex-start;
}

/* Message content container */
.cosmera-message-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
}

/* Assistant message content should respect the width constraints */
.cosmera-chat-widget .cosmera-message-wrapper.assistant .cosmera-message-content {
    position: relative !important;
    margin-left: 0 !important;
    min-width: auto !important;
    max-width: 75% !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Override WordPress paragraph and text styles inside messages */
.cosmera-chat-widget .cosmera-message p,
.cosmera-chat-widget .cosmera-message span,
.cosmera-chat-widget .cosmera-message div {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
}

/* Ensure assistant messages fill available width naturally */
.cosmera-chat-widget .cosmera-message-assistant {
    width: -moz-fit-content !important;
    width: fit-content !important;
    max-width: 75% !important;
}

/* Timestamp styling */
.cosmera-message-timestamp {
    font-size: 0.75rem;
    color: var(--cosmera-text-secondary);
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* Input container with better spacing */
.cosmera-input-container {
    padding: 1rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: linear-gradient(to top, #ffffff 0%, #fafbfc 100%) !important;
    -webkit-backdrop-filter: blur(20px);
            backdrop-filter: blur(20px);
    flex-shrink: 0;
    min-height: 80px;
    /* Prevent layout shifts */
    position: relative;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03) !important;
    display: block !important;
}

/* Enhanced chat input */
.cosmera-chat-input {
    flex: 1;
    padding: 0.75rem 1rem !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 24px !important;
    font-size: 0.9375rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 400 !important;
    transition: all 0.15s ease !important;
    background-color: #ffffff !important;
    resize: none !important;
    /* Prevent focus from causing layout shifts */
    box-sizing: border-box !important;
    /* Disable mobile zoom on focus */
    touch-action: manipulation;
    outline: none !important;
    min-height: 44px !important;
    height: 44px !important;
    line-height: 1.4 !important;
    color: #1a202c !important;
}

/* Disabled state styling */
.cosmera-chat-input:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background-color: #f9fafb !important;
}

.cosmera-chat-input:focus {
    border-color: var(--cosmera-primary-color) !important;
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
    transform: translateY(-1px) !important;
    outline: none !important;
}

.cosmera-chat-input::-moz-placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

.cosmera-chat-input::placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

/* Send button */
.cosmera-send-button {
    padding: 0 !important;
    width: 40px !important;
    height: 40px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
}

.cosmera-send-button::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translate(-50%, -50%) !important;
    transition: width 0.4s ease, height 0.4s ease !important;
}

.cosmera-send-button:hover::before {
    width: 100% !important;
    height: 100% !important;
}

.cosmera-send-button:hover:not(:disabled) {
    transform: scale(1.05) !important;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4) !important;
}

.cosmera-send-button:active {
    transform: scale(0.95) !important;
}

.cosmera-send-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: #e5e7eb !important;
    box-shadow: none !important;
}

.cosmera-send-button:disabled svg {
    stroke: #9ca3af !important;
}

.cosmera-chat-widget .cosmera-send-button svg,
#cosmera-chat-widget .cosmera-send-button svg {
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: white !important;
    stroke-width: 2.5 !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    transform: rotate(45deg) !important;
}

/* Input form layout */
.cosmera-input-form {
    display: flex !important;
    gap: 0.75rem !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix WordPress form styles */
.cosmera-input-container form {
    margin: 0 !important;
    padding: 0 !important;
}

/* Chat footer */
.cosmera-chat-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.cosmera-logo {
    height: 20px;
    width: auto;
}

.cosmera-powered-by {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.75rem;
}

.cosmera-powered-by:hover {
    color: #4b5563;
}

/* Carousel adjustments for chat */
.cosmera-chat-content .embla {
    overflow: hidden;
}

.cosmera-chat-content .embla__container {
    display: flex;
    gap: 1rem;
}

.cosmera-chat-content .embla__slide {
    flex: 0 0 100%;
    min-width: 0;
}

@media (min-width: 640px) {
    .cosmera-chat-content .embla__slide {
        flex: 0 0 50%;
    }
}

@media (min-width: 1024px) {
    .cosmera-chat-content .embla__slide {
        flex: 0 0 33.333%;
    }
}

/* Answer buttons container */
.cosmera-answer-buttons {
    padding: 0 !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* Animate only on first appearance */
.cosmera-answer-buttons:not(.shown) {
    animation: fadeInUp 0.3s ease-out forwards;
    opacity: 0;
}

.cosmera-answer-buttons.shown {
    opacity: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cosmera-answer-button {
    font-family: inherit;
    white-space: nowrap !important;
    min-width: -moz-fit-content !important;
    min-width: fit-content !important;
    padding: 0.5rem 1.25rem !important;
    /* Individual button staggered appearance */
    opacity: 0;
    animation: fadeIn 0.2s ease-out forwards;
    animation-delay: calc(var(--button-index, 0) * 0.05s);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Answer buttons styling */
.cosmera-answer-button {
    background: white !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    color: #374151 !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 22px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    font-family: 'Poppins', sans-serif !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    margin: 0 !important;
    display: inline-block !important;
    cursor: pointer !important;
}

/* Answer button hover styles */
.cosmera-answer-button:hover {
    background: linear-gradient(135deg, var(--cosmera-primary-color) 0%, var(--cosmera-secondary-color) 100%) !important;
    border-color: transparent !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25) !important;
}

/* Loading dots container */
.cosmera-loading-container {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: inline-block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-left: 0;
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure Sheet and Dialog overlays are above floating button */
[data-radix-dialog-overlay],
[data-radix-sheet-overlay] {
    z-index: 999999 !important;
}

[data-radix-dialog-content],
[data-radix-sheet-content] {
    z-index: 1000000 !important;
}

/* Custom popover positioning */
.cosmera-popover-custom {
    z-index: 999999 !important;
}

/* Hide floating button when chat is open */
.cosmera-chat-widget:has([data-state="open"]) .cosmera-chat-button,
.cosmera-chat-widget:has(.cosmera-popover-custom) .cosmera-chat-button,
.cosmera-chat-widget:has([data-state="open"]) .cosmera-circular-logo-button,
.cosmera-chat-widget:has(.cosmera-popover-custom) .cosmera-circular-logo-button {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
}

/* Chat container for BOTTOM_RIGHT mode */
.cosmera-chat-container {
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cosmera-chat-header-minimal {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    background: #f9fafb;
}

.cosmera-close-button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.cosmera-close-button:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.cosmera-chat-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Chat header styling */
.cosmera-chat-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--cosmera-primary-color) 0%, var(--cosmera-secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cosmera-chat-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.cosmera-chat-header-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.125rem;
}

/* Loading dots enhancement */
.cosmera-loading-dots {
    display: flex;
    gap: 0.375rem;
    padding: 0;
}

.cosmera-loading-dot {
    width: 6px;
    height: 6px;
    background: #667eea;
    border-radius: 50%;
    animation: loadingPulse 1.4s ease-in-out infinite;
}

.cosmera-loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.cosmera-loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loadingPulse {
    0%, 80%, 100% {
        opacity: 0.25;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Scrollbar styling */
.cosmera-messages-container::-webkit-scrollbar {
    width: 4px;
}

.cosmera-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.cosmera-messages-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.cosmera-messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Product recommendation styling */
.cosmera-product-recommendation {
    margin: 0.75rem 0;
    padding: 0;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.cosmera-product-recommendation:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cosmera-product-image-section {
    position: relative;
    height: 180px;
    background: #f8f9fa;
    overflow: hidden;
}

.cosmera-product-image-section img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    transition: transform 0.3s ease;
}

.cosmera-product-recommendation:hover .cosmera-product-image-section img {
    transform: scale(1.05);
}

.cosmera-product-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 700;
    font-size: 15px;
}

.cosmera-product-details {
    padding: 16px;
}

.cosmera-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.cosmera-product-cart-button {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 12px;
}

/* Fix for flashing on input - prevent unnecessary animations */
.cosmera-input-container,
.cosmera-input-container * {
    transform: none !important;
    will-change: auto !important;
}

/* Prevent any layout shift when typing */
.cosmera-chat-input:focus {
    outline-offset: -2px;
}

.cosmera-chat-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Prevent layout shift and flashing */
.cosmera-chat-content {
    isolation: isolate;
}

.cosmera-messages-container {
    /* Remove contain property that causes reflow */
    /* contain: layout style; */
}

/* Disable animations while typing */
.cosmera-chat-widget:has(.cosmera-chat-input:focus) .cosmera-message {
    animation: none !important;
}

/* Prevent scroll jumps on input focus - disabled as it may cause issues */
/* .cosmera-messages-container:has(~ .cosmera-input-container .cosmera-chat-input:focus) {
    overflow-anchor: auto;
    scroll-behavior: auto;
} */

/* Fix for dialog-specific scroll issues */
.cosmera-dialog-content .cosmera-messages-container {
    /* Ensure messages stay in place when typing */
    overflow-anchor: none;
    scroll-behavior: auto;
    /* Prevent iOS bounce effect that causes scroll jumps */
    -webkit-overflow-scrolling: auto;
}

/* Prevent layout shifts when messages are added */
.cosmera-messages-container > div {
    /* Each message container should maintain its size */
    /* contain: layout style; */
}

/* Enhanced mobile styling */
@media (max-width: 768px) {
    /* Chat message bubbles - better width on mobile */
    .cosmera-chat-widget .cosmera-message {
        max-width: 90% !important;
        min-width: 120px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        text-transform: none !important;
    }

    /* Override text-transform and font sizing on mobile for all message elements */
    .cosmera-chat-widget .cosmera-message p,
    .cosmera-chat-widget .cosmera-message span,
    .cosmera-chat-widget .cosmera-message div,
    .cosmera-chat-widget .cosmera-message li,
    .cosmera-chat-widget .cosmera-message ul,
    .cosmera-chat-widget .cosmera-message ol,
    .cosmera-chat-widget .cosmera-message * {
        text-transform: none !important;
        font-size: inherit !important;
        line-height: inherit !important;
        letter-spacing: inherit !important;
    }

    /* Allow assistant messages to be wider on mobile */
    .cosmera-chat-widget .cosmera-message-assistant {
        min-width: auto !important;
        max-width: 92% !important;
    }
    
    .cosmera-chat-widget .cosmera-message-wrapper.assistant .cosmera-message-content {
        min-width: auto !important;
        max-width: 100% !important;
    }
    
    /* User messages */
    .cosmera-chat-widget .cosmera-message-user {
        max-width: 90% !important;
    }
    
    /* Message wrapper padding */
    .cosmera-drawer-content .cosmera-message-wrapper {
        padding: 0.25rem 0.75rem !important;
        display: flex !important;
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Ensure messages are visible on mobile */
    .cosmera-drawer-content .cosmera-message-wrapper.user {
        justify-content: flex-end !important;
    }
    
    .cosmera-drawer-content .cosmera-message-wrapper.assistant {
        justify-content: flex-start !important;
    }
    
    /* Message content wrapper */
    .cosmera-drawer-content .cosmera-message-content {
        max-width: 85% !important;
    }
    
    /* Force message visibility on mobile */
    .cosmera-drawer-content .cosmera-message {
        visibility: visible !important;
        opacity: 1 !important;
        display: inline-block !important;
        padding: 0.75rem 1rem !important;
        border-radius: 18px !important;
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        word-wrap: break-word !important;
        text-transform: none !important;
    }

    /* Override text-transform and font sizing in drawer for all message elements */
    .cosmera-drawer-content .cosmera-message p,
    .cosmera-drawer-content .cosmera-message span,
    .cosmera-drawer-content .cosmera-message div,
    .cosmera-drawer-content .cosmera-message li,
    .cosmera-drawer-content .cosmera-message ul,
    .cosmera-drawer-content .cosmera-message ol,
    .cosmera-drawer-content .cosmera-message * {
        text-transform: none !important;
        font-size: inherit !important;
        line-height: inherit !important;
        letter-spacing: inherit !important;
    }

    /* User messages on mobile */
    .cosmera-drawer-content .cosmera-message-user {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
    }
    
    /* Assistant messages on mobile */
    .cosmera-drawer-content .cosmera-message-assistant {
        background: #f3f4f6 !important;
        color: #1f2937 !important;
        border: 1px solid #e5e7eb !important;
    }
    
    /* Product card mobile optimization */
    .cosmera-drawer-content .cosmera-product-card {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0.5rem 0 !important;
    }
    
    /* Ensure product cards are visible in mobile drawer */
    .cosmera-drawer-content .cosmera-message-content .cosmera-product-card {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Product recommendation width */
    .cosmera-product-recommendation {
        max-width: 100% !important;
    }
    
    /* Ensure product cards in messages are full width */
    .cosmera-message-wrapper.assistant .cosmera-message-content > div {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Mobile chat container adjustments */
    .cosmera-messages-container {
        padding: 1rem 0.25rem;
    }
    
    /* Mobile input container */
    .cosmera-input-container {
        padding: 0.875rem !important;
    }
    
    /* Mobile input field */
    .cosmera-chat-input {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 0.625rem 0.875rem !important;
        min-height: 42px !important;
        height: 42px !important;
    }
    
    /* Send button on mobile */
    .cosmera-send-button {
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Answer buttons on mobile */
    .cosmera-answer-button {
        padding: 0.5rem 1rem !important;
        font-size: 0.8125rem !important;
    }
    
    /* Mobile floating button */
    .cosmera-chat-button,
    .cosmera-circular-logo-button {
        width: 56px !important;
        height: 56px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    /* Remove this rule that was hiding the messages! */
    /* This was meant to hide the header but was hiding the entire messages container */
    
    /* Drawer content adjustments */
    .cosmera-drawer-content {
        padding: 0 !important;
    }
    
    .cosmera-drawer-content .cosmera-messages-container {
        padding: 1rem 0.5rem;
    }
    
    /* Drawer header styling */
    .cosmera-drawer-header {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid #e5e7eb;
        background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .cosmera-drawer-handle {
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 100px;
        margin: 4px auto 8px;
    }
    
    .cosmera-drawer-close {
        width: 32px;
        height: 32px;
        padding: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        color: #6b7280;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .cosmera-drawer-close:active {
        background: #f3f4f6;
        transform: scale(0.95);
    }
    
    .cosmera-drawer-close svg {
        width: 18px;
        height: 18px;
    }
    
    /* Mobile chat footer */
    .cosmera-drawer-content .cosmera-chat-footer {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }
    
    /* Fix mobile chat content layout */
    .cosmera-drawer-content .cosmera-chat-content {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        flex: 1 !important;
    }
    
    /* Ensure messages container fills available space on mobile */
    .cosmera-drawer-content .cosmera-messages-container {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        padding: 1rem !important;
    }
    
    /* Fix input container on mobile */
    .cosmera-drawer-content .cosmera-input-container {
        flex-shrink: 0 !important;
        display: block !important;
        padding: 1rem !important;
        background: white !important;
        border-top: 1px solid #e5e7eb !important;
        margin-top: auto !important;
    }
    
    /* Ensure input form is visible */
    .cosmera-drawer-content .cosmera-input-form {
        display: flex !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    /* Mobile input field */
    .cosmera-drawer-content .cosmera-chat-input {
        flex: 1 !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 0.75rem !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 24px !important;
        background: #f9fafb !important;
    }
    
    /* Mobile send button */
    .cosmera-drawer-content .cosmera-send-button {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        background: var(--cosmera-primary-color, #667eea) !important;
        color: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
    }
}

/* Ensure short messages don't get too wide */
.cosmera-message:has(span:only-child) {
    min-width: -moz-fit-content;
    min-width: fit-content;
    padding: 0.75rem 1.25rem;
}

/* Ensure TikTok embeds are clickable */
.tiktok-embed-container {
    pointer-events: auto !important;
    position: relative;
    z-index: 2;
}
/* Shadcn UI Component Styles */

/* Popover Content */
.cosmera-popover-content {
    position: relative;
    z-index: 999999;
    width: 380px;
    height: 550px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background-color: white;
    padding: 0;
    color: #111827;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    outline: none;
    overflow: hidden;
}

/* Animation for popover */
.cosmera-popover-content[data-state="open"] {
    animation: cosmera-fade-in 200ms ease-out;
}

.cosmera-popover-content[data-state="closed"] {
    animation: cosmera-fade-out 200ms ease-in;
}

@keyframes cosmera-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cosmera-fade-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Sheet Content */
.cosmera-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cosmera-sheet-content {
    position: fixed;
    z-index: 1000000;
    background-color: white;
    padding: 0;
    box-shadow: -10px 0 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Ensure sheet content fills available height */
.cosmera-sheet-content > div:first-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cosmera-sheet-content[data-side="right"] {
    inset: 0 0 0 auto;
    height: 100%;
    width: 400px;
    max-width: 100%;
    border-left: 1px solid #e5e7eb;
}

.cosmera-sheet-content[data-side="left"] {
    inset: 0 auto 0 0;
    height: 100%;
    width: 400px;
    max-width: 100%;
    border-right: 1px solid #e5e7eb;
}

/* Override width for 50% on desktop when using Tailwind classes */
@media (min-width: 640px) {
    .cosmera-sheet-content[data-side="right"].sm\:w-1\/2,
    .cosmera-sheet-content[data-side="left"].sm\:w-1\/2 {
        width: 50% !important;
        max-width: 50% !important;
    }
}

/* Sheet animations */
.cosmera-sheet-content[data-side="right"][data-state="open"] {
    animation: cosmera-slide-in-from-right 0.3s ease-out;
}

.cosmera-sheet-content[data-side="right"][data-state="closed"] {
    animation: cosmera-slide-out-to-right 0.3s ease-in;
}

.cosmera-sheet-content[data-side="left"][data-state="open"] {
    animation: cosmera-slide-in-from-left 0.3s ease-out;
}

.cosmera-sheet-content[data-side="left"][data-state="closed"] {
    animation: cosmera-slide-out-to-left 0.3s ease-in;
}

@keyframes cosmera-slide-in-from-right {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes cosmera-slide-out-to-right {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

@keyframes cosmera-slide-in-from-left {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes cosmera-slide-out-to-left {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* Dialog Content */
.cosmera-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cosmera-dialog-content {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000000;
    width: 900px;
    max-width: calc(100vw - 2rem);
    height: 80vh;
    max-height: 80vh;
    border-radius: 1rem;
    background-color: white;
    padding: 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Isolate the dialog from body scroll issues */
    contain: layout style;
    /* Create a new stacking context */
    isolation: isolate;
    /* Prevent transform from affecting children scroll */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Ensure dialog content fills available height */
.cosmera-dialog-content > div:first-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Dialog animations */
.cosmera-dialog-content[data-state="open"] {
    animation: cosmera-dialog-fade-in 200ms ease-out;
}

.cosmera-dialog-content[data-state="closed"] {
    animation: cosmera-dialog-fade-out 200ms ease-in;
}

@keyframes cosmera-dialog-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes cosmera-dialog-fade-out {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
}

/* Drawer Content (for mobile/bottom sheet) */
.cosmera-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cosmera-drawer-content {
    position: fixed;
    z-index: 50;
    background-color: white;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ensure drawer content fills available height */
.cosmera-drawer-content > div:nth-child(2) {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cosmera-drawer-content[data-side="bottom"] {
    inset: auto 0 0 0;
    height: 80vh;
    max-height: 80vh;
    border-top: 1px solid #e5e7eb;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

/* Drawer animations */
.cosmera-drawer-content[data-side="bottom"][data-state="open"] {
    animation: cosmera-slide-in-from-bottom 0.3s ease-out;
}

.cosmera-drawer-content[data-side="bottom"][data-state="closed"] {
    animation: cosmera-slide-out-to-bottom 0.3s ease-in;
}

@keyframes cosmera-slide-in-from-bottom {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes cosmera-slide-out-to-bottom {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

/* Common header styles */
.cosmera-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Drawer header specific styles */
.cosmera-drawer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
    min-height: 60px;
}

/* Drawer handle indicator */
.cosmera-drawer-handle {
    width: 40px;
    height: 4px;
    background-color: #d1d5db;
    border-radius: 2px;
    margin: 0 auto;
}

/* More specific selectors to override WordPress styles */
.cosmera-chat-widget .cosmera-drawer-close,
button.cosmera-drawer-close {
    position: absolute !important;
    right: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 50% !important;
    border: 1px solid #e5e7eb !important;
    background: white !important;
    color: #6b7280 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    font-size: inherit !important;
    line-height: 1 !important;
    text-decoration: none !important;
    outline: none !important;
}

.cosmera-chat-widget .cosmera-drawer-close:hover,
button.cosmera-drawer-close:hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #d1d5db !important;
}

.cosmera-chat-widget .cosmera-drawer-close:focus,
button.cosmera-drawer-close:focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px !important;
}

.cosmera-chat-widget .cosmera-drawer-close svg,
button.cosmera-drawer-close svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    stroke-width: 2 !important;
}

.cosmera-chat-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.cosmera-chat-header button {
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.cosmera-chat-header button:hover {
    color: #374151;
}

/* Minimal header for popover */
.cosmera-chat-header-minimal {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.cosmera-close-button {
    color: #9ca3af;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cosmera-close-button:hover {
    color: #374151;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Chat footer */
.cosmera-chat-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.cosmera-logo {
    width: 24px;
    height: 24px;
    -o-object-fit: contain;
       object-fit: contain;
}

.cosmera-powered-by {
    font-size: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cosmera-powered-by:hover {
    color: #374151;
    text-decoration: underline;
}

/* Chat content container */
.cosmera-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cosmera-chat-container .flex-1 {
    flex: 1;
    overflow: hidden;
}

/* Main chat area */
.cosmera-chat-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Chat content layout */
.cosmera-chat-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    min-height: 100%;
    overflow: hidden;
}

/* Messages container with proper scrolling */
.cosmera-messages-container {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    /* Disable scroll anchoring which might cause jumps */
    overflow-anchor: none;
    /* Prevent focus-related scroll jumps */
    overscroll-behavior: contain;
    /* Ensure stable scroll position */
    position: relative;
    /* Prevent transform-based scroll jumps */
    transform: translateZ(0);
    will-change: scroll-position;
}

/* Ensure messages stay within bounds */
.cosmera-messages-container > div {
    flex-shrink: 0;
}

/* Input container fixed at bottom */
.cosmera-input-container {
    flex: 0 0 auto;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

/* Custom popover for click outside functionality */
.cosmera-popover-custom {
    width: 380px;
    height: 550px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: cosmera-fade-in 200ms ease-out;
    display: flex;
    flex-direction: column;
}

.cosmera-popover-custom[data-closing="true"] {
    animation: cosmera-fade-out 200ms ease-in;
}

/* Input and form styles */
.cosmera-chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    background-color: #f9fafb;
    height: 40px;
    line-height: 1.5;
}

.cosmera-chat-input:focus {
    border-color: #64748b;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

.cosmera-chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #e5e7eb;
}

.cosmera-send-button {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background-color: #64748b;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cosmera-send-button:hover:not(:disabled) {
    background-color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cosmera-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Message styles */
.cosmera-message {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
    text-transform: none !important;
}

/* Override WordPress theme styling on all message child elements */
.cosmera-message p,
.cosmera-message span,
.cosmera-message div,
.cosmera-message h1,
.cosmera-message h2,
.cosmera-message h3,
.cosmera-message h4,
.cosmera-message h5,
.cosmera-message h6,
.cosmera-message li,
.cosmera-message ul,
.cosmera-message ol,
.cosmera-message strong,
.cosmera-message em,
.cosmera-message a,
.cosmera-message code,
.cosmera-message pre,
.cosmera-message blockquote,
.cosmera-message * {
    text-transform: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    font-weight: inherit !important;
}

/* Specific overrides for headings */
.cosmera-message h1 {
    font-size: 1.5em !important;
    font-weight: 600 !important;
}

.cosmera-message h2 {
    font-size: 1.3em !important;
    font-weight: 600 !important;
}

.cosmera-message h3 {
    font-size: 1.1em !important;
    font-weight: 600 !important;
}

.cosmera-message h4,
.cosmera-message h5,
.cosmera-message h6 {
    font-size: 1em !important;
    font-weight: 600 !important;
}

/* Code and strong elements */
.cosmera-message code {
    font-size: 0.9em !important;
}

.cosmera-message strong {
    font-weight: 600 !important;
}

.cosmera-message-user {
    background-color: #64748b;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.cosmera-message-assistant {
    background-color: #f3f4f6;
    color: #1f2937;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* Min-width utility */
.min-w-\[400px\] { min-width: 400px; }
.min-w-\[500px\] { min-width: 500px; }

/* Flexbox utilities for message layout */
.gap-3 { gap: 0.75rem; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

/* Additional utilities */
.p-4 { padding: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.bg-transparent { background-color: transparent; }
.shadow-none { box-shadow: none; }
.border-0 { border-width: 0; }

/* Utility classes */
.text-gray-400 { color: #9ca3af; }
.text-gray-600 { color: #4b5563; }
.text-gray-800 { color: #1f2937; }
.bg-gray-100 { background-color: #f3f4f6; }
.border { border: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.rounded-lg { border-radius: 0.5rem; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-1 > * + * { margin-left: 0.25rem; }

/* Padding utilities */
.p-4 { padding: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }

/* Text utilities */
.text-sm { font-size: 0.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* Width utilities */
.w-full { width: 100%; }
.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }

/* Max width utilities */
.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }

/* Overflow utilities */
.overflow-y-auto { overflow-y: auto; }
.overflow-hidden { overflow: hidden; }

/* Animation utilities */
.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Focus utilities */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Disabled utilities */
.disabled\:opacity-50:disabled { opacity: 0.5; }

/* Hover utilities */
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }

/* Transition utilities */
.transition-shadow { transition: box-shadow 150ms ease; }
.transition-opacity { transition: opacity 150ms ease; }

/* Terms Agreement Component Styles */
.cosmera-terms-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* Terms Agreement Scrollbar Styling */
.cosmera-terms-content::-webkit-scrollbar {
    width: 6px;
}

.cosmera-terms-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cosmera-terms-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.cosmera-terms-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animation for slide up drawer on mobile */
@keyframes animate-slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: animate-slide-up 0.3s ease-out;
}
/* Product Card Styles - High specificity to override WordPress styles */
.cosmera-chat-widget .cosmera-product-card,
.cosmera-chat-content .cosmera-product-card,
#cosmera-chat-root .cosmera-product-card,
#cosmera-chat-widget .cosmera-product-card {
  display: flex !important;
  background-color: #ffffff !important;
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transition: all 200ms ease !important;
  width: 100% !important;
  max-width: 300px !important;
  min-height: 100px !important;
  overflow: hidden !important;
  margin: 0 auto 8px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  position: relative !important;
}

.cosmera-product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-2px) !important;
}

/* Reset all child elements */
.cosmera-product-card * {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: inherit !important;
}

/* Product image container */
.cosmera-product-card > div:first-child {
  position: relative !important;
  width: 100px !important;
  min-width: 100px !important;
  height: 100px !important;
  flex-shrink: 0 !important;
  background: linear-gradient(145deg, #FFF3E8 0%, #FDDEC3 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 12px !important;
}

/* Product image */
.cosmera-product-card img {
  width: 100% !important;
  height: 100% !important;
  -o-object-fit: contain !important;
     object-fit: contain !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Content container */
.cosmera-product-card > div:last-child {
  flex: 1 !important;
  padding: 12px 12px 12px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  margin: 0 !important;
  min-width: 0 !important;
  gap: 4px !important;
}

/* Product title */
.cosmera-product-card h3 {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  white-space: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Price */
.cosmera-product-card > div:last-child > div > div[style*="fontSize: '18px'"],
.cosmera-product-card > div:last-child > div > div:nth-child(2) {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #333333 !important;
  margin: 2px 0 !important;
  padding: 0 !important;
}

/* Description */
.cosmera-product-card p {
  font-size: 12px !important;
  color: #666666 !important;
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Buttons */
.cosmera-product-card button {
  border: none !important;
  outline: none !important;
  text-transform: none !important;
  letter-spacing: 0.3px !important;
  font-family: inherit !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 150ms ease !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Add to cart button - using attribute selector for inline styles */
.cosmera-product-card button[style*="backgroundColor: '#7c3aed'"],
.cosmera-product-card button[style*="backgroundColor: rgb(124, 58, 237)"],
.cosmera-product-card button[style*="background-color: #7c3aed"],
.cosmera-product-card button[style*="background-color: rgb(124, 58, 237)"] {
  background-color: #7c3aed !important;
  color: white !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  width: 100% !important;
  text-align: center !important;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.2) !important;
  margin-top: auto !important;
}

.cosmera-product-card button[style*="backgroundColor: '#7c3aed'"]:hover,
.cosmera-product-card button[style*="backgroundColor: rgb(124, 58, 237)"]:hover {
  background-color: #6b21a8 !important;
  transform: scale(1.02) !important;
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3) !important;
}

/* Quantity controls container */
.cosmera-product-card > div:last-child > div[style*="display: 'flex'"][style*="gap: '12px'"] {
  background-color: #f8f8f8 !important;
  padding: 6px !important;
  border-radius: 8px !important;
  margin-top: auto !important;
}

/* Quantity button container */
.cosmera-product-card div[style*="backgroundColor: 'white'"][style*="borderRadius: '6px'"] {
  background-color: white !important;
  border-radius: 6px !important;
  padding: 3px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Quantity buttons */
.cosmera-product-card button[style*="width: '28px'"],
.cosmera-product-card button[style*="width: 28px"] {
  width: 26px !important;
  height: 26px !important;
  background-color: transparent !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.cosmera-product-card button[style*="width: '28px'"]:hover,
.cosmera-product-card button[style*="width: 28px"]:hover {
  background-color: #f0f0f0 !important;
}

/* Quantity display */
.cosmera-product-card span[style*="fontSize: '14px'"][style*="fontWeight: '600'"] {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #333333 !important;
  min-width: 20px !important;
  text-align: center !important;
}

/* Panier button */
.cosmera-product-card button[style*="flex: 1"] {
  flex: 1 !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  background-color: #f0f0f0 !important;
  color: #555 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.cosmera-product-card button[style*="flex: 1"]:hover {
  background-color: #e8e8e8 !important;
}

/* Quantity badge */
.cosmera-product-card > div:first-child > div[style*="position: 'absolute'"] {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  background-color: #7c3aed !important;
  color: white !important;
  font-size: 10px !important;
  font-weight: bold !important;
  min-width: 20px !important;
  height: 20px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
  padding: 0 5px !important;
}

/* Override any WordPress/WooCommerce styles */
.woocommerce .cosmera-product-card,
.woocommerce-page .cosmera-product-card,
.woocommerce .cosmera-product-card *,
.woocommerce-page .cosmera-product-card *,
.cosmera-product-card .button,
.cosmera-product-card .woocommerce-button,
.cosmera-product-card .wp-element-button,
.cosmera-product-card a.button,
.cosmera-product-card button.button {
  background-image: none !important;
  border-radius: 8px !important;
  text-shadow: none !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  min-height: unset !important;
  height: auto !important;
}

/* Fix for WordPress button hover states */
.cosmera-product-card button:focus,
.cosmera-product-card button:active,
.woocommerce .cosmera-product-card button:focus,
.woocommerce .cosmera-product-card button:active {
  outline: none !important;
  box-shadow: none !important;
}

/* Ensure product card takes full width in carousel */
.embla__slide .cosmera-product-card {
  margin: 0 !important;
  width: 100% !important;
}

/* Mobile-specific product card enhancements */
@media (max-width: 768px) {
    .cosmera-chat-widget .cosmera-product-card,
    .cosmera-chat-content .cosmera-product-card,
    #cosmera-chat-root .cosmera-product-card,
    #cosmera-chat-widget .cosmera-product-card {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0.5rem 0 !important;
        min-height: 90px !important;
    }
    
    /* Adjust image container for mobile */
    .cosmera-product-card > div:first-child {
        width: 85px !important;
        min-width: 85px !important;
        height: 85px !important;
        padding: 10px !important;
    }
    
    /* Content container on mobile */
    .cosmera-product-card > div:last-child {
        padding: 10px 10px 10px 8px !important;
        gap: 3px !important;
    }
    
    /* Product title on mobile */
    .cosmera-product-card h3 {
        font-size: 13px !important;
        -webkit-line-clamp: 2 !important;
    }
    
    /* Price on mobile */
    .cosmera-product-card > div:last-child > div > div[style*="fontSize: '18px'"],
    .cosmera-product-card > div:last-child > div > div:nth-child(2) {
        font-size: 15px !important;
    }
    
    /* Description on mobile */
    .cosmera-product-card p {
        font-size: 11px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        -webkit-line-clamp: 2 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
    }
    
    /* Add to cart button on mobile */
    .cosmera-product-card button[style*="backgroundColor: '#7c3aed'"],
    .cosmera-product-card button[style*="backgroundColor: rgb(124, 58, 237)"],
    .cosmera-product-card button[style*="background-color: #7c3aed"],
    .cosmera-product-card button[style*="background-color: rgb(124, 58, 237)"] {
        font-size: 12px !important;
        padding: 7px 12px !important;
        border-radius: 7px !important;
    }
    
    /* Quantity controls on mobile */
    .cosmera-product-card > div:last-child > div[style*="display: 'flex'"][style*="gap: '12px'"] {
        padding: 5px !important;
        gap: 8px !important;
    }
    
    /* Quantity buttons on mobile */
    .cosmera-product-card button[style*="width: '28px'"],
    .cosmera-product-card button[style*="width: 28px"] {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Quantity display on mobile */
    .cosmera-product-card span[style*="fontSize: '14px'"][style*="fontWeight: '600'"] {
        font-size: 12px !important;
    }
    
    /* Panier button on mobile */
    .cosmera-product-card button[style*="flex: 1"] {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}
