/**
 * Biorganica Cart AI Recommendations - Mobile-First CSS
 *
 * Design Philosophy:
 * - Mobile-first responsive design
 * - Smooth animations and transitions
 * - Accessibility-focused (min 44px touch targets)
 * - Performance-optimized (GPU-accelerated animations)
 *
 * @package Biorganica_Cart_AI_Recommendations
 */

/* ========================================
   1. FLOATING ICON (Mobile-First) - REDESIGNED
   ======================================== */

.bcar-floating-icon {
    position: fixed !important;
    bottom: 100px !important; /* Position above WooCommerce mini-cart */
    right: 16px !important;
    left: auto !important;
    width: auto;
    max-width: calc(100vw - 32px);
    height: auto;
    padding: 0;
    background: white;
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(139, 92, 246, 0.1);
    cursor: pointer;
    z-index: 9998 !important; /* Below WooCommerce cart (9999) */
    display: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient accent bar at top */
.bcar-floating-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    z-index: 1;
}

.bcar-floating-icon:hover,
.bcar-floating-icon:focus {
    transform: translateY(-2px);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(139, 92, 246, 0.2);
}

.bcar-floating-icon:active {
    transform: translateY(0);
}

/* Main container with flexbox */
.bcar-floating-icon-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    position: relative;
}

/* AI Sparkle icon */
.bcar-floating-icon .icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    animation: bcar-sparkle-pulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 8px;
}

.bcar-floating-icon .icon::before {
    content: '✨';
}

/* Text content */
.bcar-floating-icon-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.bcar-floating-icon-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.bcar-floating-icon-subtitle {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge counter */
.bcar-floating-icon .badge {
    position: relative;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border-radius: 10px;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
    animation: bcar-badge-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Pulse animation when icon appears */
.bcar-floating-icon.pulse {
    animation: bcar-slideInRight 0.5s ease-out, bcar-gentle-pulse 2.5s ease-in-out infinite 0.5s;
}

/* Hide floating icon on cart page - show inline instead */
.page-template-page-cos-de-cumparaturi-lp .bcar-floating-icon {
    display: none !important;
}

/* Hide floating icon on checkout page - show CTA button instead */
.page-template-page-finalizeaza-comanda-lp .bcar-floating-icon {
    display: none !important;
}

/* Desktop adjustments */
@media (min-width: 769px) {
    .bcar-floating-icon {
        bottom: 100px !important;
        right: 24px !important;
        max-width: 320px;
        border-radius: 18px;
    }

    .bcar-floating-icon::before {
        height: 4px;
    }

    .bcar-floating-icon-container {
        gap: 14px;
        padding: 16px 18px;
    }

    .bcar-floating-icon .icon {
        font-size: 26px;
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .bcar-floating-icon-title {
        font-size: 15px;
    }

    .bcar-floating-icon-subtitle {
        font-size: 12px;
    }

    .bcar-floating-icon .badge {
        min-width: 32px;
        height: 32px;
        border-radius: 12px;
        font-size: 14px;
    }
}

/* ========================================
   INLINE RECOMMENDATIONS (Cart Page)
   ======================================== */

.bcar-inline-recommendations {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 0;
    opacity: 0;
    animation: bcar-fadeInUp 0.6s ease-out forwards;
    width: 100%;
}

/* Divider between cart items and recommendations */
.bcar-cart-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 32px 0 24px 0;
    padding: 0 8px;
}

.bcar-cart-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e5e7eb 50%, transparent 100%);
}

.bcar-cart-divider-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.bcar-cart-divider-text {
    font-size: 15px;
    font-weight: 700;
    color: #8b5cf6;
    white-space: nowrap;
    position: relative;
}

.bcar-cart-divider-text::before {
    content: '✨';
    margin-right: 8px;
}

.bcar-cart-divider-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
    white-space: nowrap;
    line-height: 1.4;
}

/* Mobile: Stack divider text */
@media (max-width: 640px) {
    .bcar-cart-divider {
        flex-direction: column;
        gap: 12px;
    }

    .bcar-cart-divider-line {
        width: 100%;
    }

    .bcar-cart-divider-text,
    .bcar-cart-divider-subtitle {
        white-space: normal;
    }
}

.bcar-inline-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mobile: Grid layout with proper column spans */
.bcar-inline-product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 70px 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 8px;
    align-items: start;
}

.bcar-inline-product-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.bcar-inline-product-image {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    background: #f9fafb;
}

.bcar-inline-product-image a {
    display: block;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease;
}

.bcar-inline-product-image a:hover {
    opacity: 0.9;
}

.bcar-inline-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bcar-inline-product-category {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bcar-inline-product-title {
    grid-column: 2;
    grid-row: 2;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bcar-inline-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bcar-inline-product-title a:hover {
    color: #8b5cf6;
}

/* Price and button container */
.bcar-inline-product-actions {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.bcar-inline-product-price {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    flex-shrink: 0;
}

.bcar-inline-product-reason {
    grid-column: 1 / -1;
    grid-row: 4;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-left: 2px solid #8b5cf6;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #4b5563;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.bcar-inline-product-reason .icon {
    font-size: 12px;
    flex-shrink: 0;
}

.bcar-inline-add-to-cart {
    padding: 8px 16px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.bcar-inline-add-to-cart:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.bcar-inline-add-to-cart:active {
    transform: translateY(0);
}

.bcar-inline-add-to-cart.added {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Desktop: Horizontal layout */
@media (min-width: 769px) {
    .bcar-inline-product-card {
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto auto auto;
        padding: 16px;
        gap: 8px 16px;
        align-items: start;
    }

    .bcar-inline-product-image {
        grid-column: 1;
        grid-row: 1 / -1;
        width: 100px;
        height: 100px;
    }

    .bcar-inline-product-image a:hover {
        opacity: 0.85;
    }

    .bcar-inline-product-category {
        grid-column: 2;
        grid-row: 1;
        font-size: 11px;
    }

    .bcar-inline-product-title {
        grid-column: 2;
        grid-row: 2;
        font-size: 15px;
    }

    .bcar-inline-product-title a:hover {
        color: #7c3aed;
    }

    .bcar-inline-product-actions {
        grid-column: 2;
        grid-row: 3;
        gap: 16px;
    }

    .bcar-inline-product-price {
        font-size: 16px;
    }

    .bcar-inline-product-reason {
        grid-column: 2;
        grid-row: 4;
        margin-top: 4px;
        font-size: 12px;
    }

    .bcar-inline-add-to-cart {
        padding: 10px 24px;
        font-size: 13px;
    }
}

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

/* ========================================
   2. MODAL LAYOUT (Mobile-First)
   ======================================== */

/* Mobile: Full-screen overlay */
.bcar-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999999 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none; /* Hidden by default */
}

.bcar-modal.entering {
    animation: bcar-slideUp 0.3s ease-out;
}

.bcar-modal-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bcar-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bcar-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.bcar-modal-close:hover,
.bcar-modal-close:focus {
    background: #f3f4f6;
    color: #1a1a1a;
}

.bcar-modal-body {
    padding-bottom: 20px;
}

/* Desktop: Dropdown from bar */
@media (min-width: 769px) {
    .bcar-modal {
        position: fixed !important;
        bottom: 90px !important;
        right: 30px !important;
        top: auto !important;
        left: auto !important;
        width: 420px;
        max-height: 600px;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        z-index: 999999 !important;
    }

    .bcar-modal.entering {
        animation: bcar-fadeIn 0.3s ease-out;
    }

    .bcar-modal-header {
        display: none; /* Hide sticky header on desktop */
    }

    .bcar-modal-title {
        padding: 20px 20px 16px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
    }

    .bcar-modal-title-content {
        flex: 1;
    }

    .bcar-modal-title h3 {
        margin: 0 0 8px 0;
        font-size: 20px;
        font-weight: 700;
        color: #1a1a1a;
    }

    .bcar-modal-subtitle {
        margin: 0;
        font-size: 13px;
        line-height: 1.5;
        color: #6b7280;
        font-weight: 400;
    }

    .bcar-modal-title .bcar-modal-close {
        margin-top: -4px;
        flex-shrink: 0;
    }
}

/* Mobile subtitle styling */
.bcar-modal-subtitle-mobile {
    padding: 16px 20px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.bcar-modal-subtitle-mobile p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    font-weight: 400;
}

/* Prevent body scroll when mobile modal is open */
body.bcar-modal-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    body.bcar-modal-open {
        overflow: auto; /* Allow scroll on desktop */
    }
}

/* ========================================
   3. PRODUCT CARDS
   ======================================== */

.bcar-products-list {
    padding: 0;
}

.bcar-product-card {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
    background: white;
}

.bcar-product-card:hover,
.bcar-product-card:focus-within {
    background: #f9fafb;
}

.bcar-product-card:last-child {
    border-bottom: none;
}

.bcar-product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.bcar-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bcar-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* Prevent flex overflow */
}

.bcar-product-category {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.2;
    opacity: 0.9;
}

.bcar-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bcar-product-price {
    font-size: 14px;
    font-weight: 700;
    color: #2d5016;
    line-height: 1.2;
}

.bcar-product-price del {
    color: #9ca3af;
    font-weight: 400;
    margin-right: 6px;
    font-size: 12px;
}

/* ========================================
   4. AI REASON BOX
   ======================================== */

.bcar-ai-reason {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    border-left: 3px solid #3b82f6;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #1e3a8a;
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin: 4px 0;
    line-height: 1.4;
}

.bcar-ai-reason .ai-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.bcar-ai-reason .reason-text {
    flex: 1;
}

/* ========================================
   5. ADD-TO-CART BUTTON
   ======================================== */

.bcar-add-to-cart {
    background: #7d5ba6;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-top: 4px;
    width: 100%;
    min-height: 44px; /* Touch-friendly */
    display: flex;
    align-items: center;
    justify-content: center;
}

.bcar-add-to-cart:hover,
.bcar-add-to-cart:focus {
    background: #6a4d8f;
    transform: translateY(-1px);
}

.bcar-add-to-cart:active {
    transform: translateY(0);
}

.bcar-add-to-cart:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.bcar-add-to-cart.added {
    background: #10b981 !important;
}

/* Desktop: Smaller button width */
@media (min-width: 769px) {
    .bcar-add-to-cart {
        width: auto;
        min-width: 120px;
    }
}

/* ========================================
   6. CHECKOUT PAGE CTA
   ======================================== */

.bcar-checkout-cta {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.bcar-checkout-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
}

.bcar-checkout-cta:hover {
    border-color: #7c3aed;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
    transform: translateY(-2px);
}

.bcar-checkout-cta:active {
    transform: translateY(0);
}

.bcar-checkout-cta-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
}

/* Row 1: Icon + Title + Subtitle */
.bcar-checkout-cta-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bcar-checkout-cta-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    animation: bcar-sparkle-pulse 2s ease-in-out infinite;
}

.bcar-checkout-cta-text {
    flex: 1;
    min-width: 0;
}

.bcar-checkout-cta-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.bcar-checkout-cta-text p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Row 2: Product Previews + Badge */
.bcar-checkout-cta-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bcar-checkout-cta-previews {
    display: flex;
    align-items: center;
}

/* Row 3: Click Link */
.bcar-checkout-cta-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #8b5cf6;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bcar-checkout-cta:hover .bcar-checkout-cta-link {
    color: #7c3aed;
    transform: translateX(2px);
}

.bcar-checkout-cta-preview-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-left: -8px;
    background: white;
}

.bcar-checkout-cta-preview-img:first-child {
    margin-left: 0;
}

.bcar-checkout-cta-preview-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bcar-checkout-cta-preview-more {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    margin-left: -8px;
}

.bcar-checkout-cta-badge {
    flex-shrink: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border-radius: 20px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Desktop: Better spacing and larger */
@media (min-width: 769px) {
    .bcar-checkout-cta {
        margin-bottom: 28px;
    }

    .bcar-checkout-cta-content {
        padding: 20px 24px;
        gap: 14px;
    }

    .bcar-checkout-cta-icon {
        font-size: 32px;
    }

    .bcar-checkout-cta-text h4 {
        font-size: 18px;
    }

    .bcar-checkout-cta-text p {
        font-size: 13px;
    }

    .bcar-checkout-cta-link {
        font-size: 14px;
    }

    .bcar-checkout-cta-preview-img {
        width: 48px;
        height: 48px;
        margin-left: -10px;
    }

    .bcar-checkout-cta-preview-img:first-child {
        margin-left: 0;
    }

    .bcar-checkout-cta-preview-more {
        width: 48px;
        height: 48px;
        font-size: 14px;
        margin-left: -10px;
    }

    .bcar-checkout-cta-badge {
        min-width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ========================================
   7. TOAST NOTIFICATIONS
   ======================================== */

.bcar-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999999 !important;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 300px;
}

.bcar-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.bcar-toast.success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.bcar-toast.error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* ========================================
   8. ANIMATIONS
   ======================================== */

@keyframes bcar-gentle-pulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow:
            0 4px 6px -1px rgba(0, 0, 0, 0.1),
            0 2px 4px -1px rgba(0, 0, 0, 0.06),
            0 0 0 1px rgba(139, 92, 246, 0.1);
    }
    50% {
        transform: translateY(-2px);
        box-shadow:
            0 10px 15px -3px rgba(0, 0, 0, 0.1),
            0 4px 6px -2px rgba(0, 0, 0, 0.05),
            0 0 0 1px rgba(139, 92, 246, 0.2);
    }
}

@keyframes bcar-badge-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bcar-sparkle-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

@keyframes bcar-gentle-bounce {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, calc(-50% - 4px));
    }
}

@keyframes bcar-slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes bcar-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   9. LOADING STATE
   ======================================== */

.bcar-loading {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.bcar-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #7d5ba6;
    border-radius: 50%;
    animation: bcar-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

/* ========================================
   10. EMPTY STATE
   ======================================== */

.bcar-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.bcar-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.bcar-empty-text {
    font-size: 14px;
    line-height: 1.5;
}

/* ========================================
   11. ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus styles */
.bcar-floating-icon:focus,
.bcar-add-to-cart:focus,
.bcar-banner-btn:focus,
.bcar-modal-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bcar-floating-icon,
    .bcar-modal,
    .bcar-product-card,
    .bcar-add-to-cart,
    .bcar-toast {
        animation: none;
        transition: none;
    }
}

/* ========================================
   12. DARK MODE SUPPORT (Future)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode styles */
    /* Uncomment and customize when implementing dark mode */

    /* .bcar-modal {
        background: #1f2937;
        color: #f3f4f6;
    }

    .bcar-product-card:hover {
        background: #374151;
    }

    .bcar-product-title {
        color: #f3f4f6;
    } */
}

/* ========================================
   13. PRINT STYLES
   ======================================== */

@media print {
    .bcar-floating-icon,
    .bcar-modal,
    .bcar-checkout-banner {
        display: none !important;
    }
}
