.wca-embed-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    background: #f5f5f5;
}

.wca-embed-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #ddd;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: wca-spin 1s linear infinite;
    z-index: 1;
}

.wca-embed-container.loaded::before {
    display: none;
}

.wca-embed-container.loaded {
    background: transparent;
}

.wca-embed-container iframe {
    display: block;
    position: relative;
    z-index: 2;
    transition: height 0.3s ease;
}

.wca-error {
    color: #dc3545;
    padding: 20px;
    text-align: center;
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

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

.wca-marketplace-embed,
.wca-product-embed,
.wca-checkout-embed {
    margin: 20px 0;
}

/* Marketplace Grid Styles */
.wca-marketplace-grid {
    display: grid;
    gap: 24px;
    margin: 20px 0;
}

.wca-marketplace-grid.wca-columns-1 {
    grid-template-columns: 1fr;
}

.wca-marketplace-grid.wca-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wca-marketplace-grid.wca-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wca-marketplace-grid.wca-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .wca-marketplace-grid.wca-columns-3,
    .wca-marketplace-grid.wca-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wca-marketplace-grid.wca-columns-2,
    .wca-marketplace-grid.wca-columns-3,
    .wca-marketplace-grid.wca-columns-4 {
        grid-template-columns: 1fr;
    }
}

.wca-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wca-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.wca-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wca-product-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f3f4f6;
}

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

.wca-product-image-placeholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.wca-product-info {
    padding: 16px;
}

.wca-product-name {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.wca-product-description {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wca-product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #166534; /* Green to match original WCA design */
}

.wca-marketplace-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
}
