/**
 * Shop Integration Frontend Styles
 */

/* Shop Integration Wrapper */
.proddisp-shop-integration {
    margin: 20px 0;
    clear: both;
}

/* Integration Title */
.proddisp-integration-title {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Position-specific styles */
.proddisp-position-before_shop {
    margin-top: 0;
    margin-bottom: 30px;
}

.proddisp-position-after_shop_header {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.proddisp-position-before_products {
    margin-bottom: 25px;
}

.proddisp-position-after_products {
    margin-top: 25px;
}

.proddisp-position-after_shop {
    margin-top: 30px;
    margin-bottom: 0;
}

/* Between products styles */
.proddisp-between-products {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    grid-column: 1 / -1; /* Span full width in grid layouts */
}

.proddisp-between-products .proddisp-integration-title {
    margin-bottom: 20px;
    font-size: 1.3em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .proddisp-shop-integration {
        margin: 15px 0;
    }
    
    .proddisp-integration-title {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
    
    .proddisp-between-products {
        margin: 15px 0;
        padding: 15px;
    }
    
    .proddisp-position-after_shop_header {
        margin: 20px 0;
        padding: 15px 0;
    }
}

/* Theme compatibility */
.woocommerce .proddisp-shop-integration {
    width: 100%;
}

/* Grid layout compatibility */
.woocommerce ul.products .proddisp-between-products {
    list-style: none;
    margin: 20px 0;
    padding: 20px;
    width: 100%;
    flex: 1 1 100%;
}

/* Flexbox layout compatibility */
.woocommerce .products.columns-1 .proddisp-between-products,
.woocommerce .products.columns-2 .proddisp-between-products,
.woocommerce .products.columns-3 .proddisp-between-products,
.woocommerce .products.columns-4 .proddisp-between-products,
.woocommerce .products.columns-5 .proddisp-between-products,
.woocommerce .products.columns-6 .proddisp-between-products {
    flex-basis: 100%;
    max-width: 100%;
}

/* Ensure proper spacing in different themes */
.storefront .proddisp-shop-integration,
.astra .proddisp-shop-integration,
.oceanwp .proddisp-shop-integration,
.generatepress .proddisp-shop-integration {
    margin: 20px auto;
    max-width: 100%;
}

/* Special styling for featured sections */
.proddisp-shop-integration.featured-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.proddisp-shop-integration.featured-section .proddisp-integration-title {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 25px;
}

/* Animation for smooth appearance */
.proddisp-shop-integration {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Delay animations for multiple integrations */
.proddisp-shop-integration:nth-child(1) { animation-delay: 0.1s; }
.proddisp-shop-integration:nth-child(2) { animation-delay: 0.2s; }
.proddisp-shop-integration:nth-child(3) { animation-delay: 0.3s; }
.proddisp-shop-integration:nth-child(4) { animation-delay: 0.4s; }

/* Print styles */
@media print {
    .proddisp-shop-integration {
        break-inside: avoid;
        margin: 10px 0;
    }
    
    .proddisp-integration-title {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
}