/**
 * React Components Styles
 * Cake Bake & Food Theme
 */

/* ============================================
   BASE STYLES
   ============================================ */
.react-component-wrapper {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #3D2914;
}

.react-component-wrapper * {
    box-sizing: border-box;
}

/* ============================================
   MENU GRID STYLES
   ============================================ */
.react-menu-grid {
    padding: 20px 0;
}

.menu-filters button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(201, 168, 108, 0.3);
}

.menu-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 50px rgba(74, 52, 40, 0.15) !important;
}

.menu-item-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.1) 0%, rgba(74, 52, 40, 0.05) 100%);
}

/* ============================================
   IMAGE GALLERY STYLES
   ============================================ */
.react-image-gallery {
    padding: 20px 0;
}

.gallery-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.react-image-gallery > div > div:hover .gallery-overlay {
    opacity: 1;
}

/* ============================================
   TESTIMONIAL SLIDER STYLES
   ============================================ */
.react-testimonial-slider {
    background: linear-gradient(135deg, #FDF8F3 0%, #F5E6D3 100%);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.react-testimonial-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A86C' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.react-testimonial-slider button:hover {
    background-color: #4A3428 !important;
    color: #fff !important;
    border-color: #4A3428 !important;
}

/* ============================================
   PRODUCT GRID STYLES
   ============================================ */
.react-product-grid {
    padding: 20px 0;
}

.product-card button:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(201, 168, 108, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 991px) {
    .react-menu-grid .menu-items-grid,
    .react-product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .react-image-gallery > div {
        column-count: 2 !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .react-menu-grid .menu-items-grid,
    .react-product-grid,
    .react-image-gallery > div {
        grid-template-columns: 1fr !important;
        column-count: 1 !important;
    }
    
    .menu-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .menu-filters button {
        width: 100%;
        max-width: 250px;
    }
    
    .react-testimonial-slider {
        padding: 30px 15px !important;
    }
    
    .react-testimonial-slider p {
        font-size: 18px !important;
    }
}

/* ============================================
   LIGHTBOX STYLES
   ============================================ */
.lightbox-overlay {
    animation: fadeIn 0.3s ease;
}

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

/* ============================================
   WOOCOMMERCE INTEGRATION
   ============================================ */
.woocommerce .react-product-grid .product-card {
    margin-bottom: 0;
}

.woocommerce .react-product-grid .add-to-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.woocommerce .react-product-grid .add-to-cart-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* ============================================
   ELEMENTOR EDITOR COMPATIBILITY
   ============================================ */
.elementor-editor-active .react-component-wrapper {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elementor-editor-active .react-component-wrapper:empty::before {
    content: 'React Component Loading...';
    color: #C9A86C;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}
