/**
 * Product Advertisement - Public Styles
 * Frontend styles for product advertisements in WooCommerce shop
 */

/* ==========================================================================
   Advertisement Product Styling
   ========================================================================== */

/* Advertisement placeholder in product grid */
.products .product.placeholder-ad {
    position: relative;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.products .product.placeholder-ad::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #666;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
    z-index: 10;
}

/* Advertisement content */
.products .product.placeholder-ad .product_thumbnail {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
}

.products .product.placeholder-ad .product_thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.products .product.placeholder-ad:hover .product_thumbnail::after {
    background: rgba(0, 0, 0, 0.2);
}

/* Advertisement link styling */
.products .product.placeholder-ad a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

/* Advertisement text overlay */
.products .product.placeholder-ad .product_thumbnail span {
    position: relative;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* ==========================================================================
   List View Compatibility
   ========================================================================== */

/* List view adjustments */
.wt-list-view .products .product.placeholder-ad {
    width: 100%;
    display: flex;
    flex-direction: row;
    min-height: 150px;
}

.wt-list-view .products .product.placeholder-ad .product_thumbnail {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .products .product.placeholder-ad {
        min-height: 250px;
    }

    .products .product.placeholder-ad .product_thumbnail {
        height: 250px;
    }

    .products .product.placeholder-ad .product_thumbnail span {
        font-size: 18px;
    }

    /* Mobile list view */
    .wt-list-view .products .product.placeholder-ad {
        flex-direction: column;
    }

    .wt-list-view .products .product.placeholder-ad .product_thumbnail {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .products .product.placeholder-ad {
        min-height: 200px;
    }

    .products .product.placeholder-ad .product_thumbnail {
        height: 200px;
    }

    .products .product.placeholder-ad .product_thumbnail span {
        font-size: 16px;
    }
}

/* ==========================================================================
   Theme Compatibility
   ========================================================================== */

/* Ensure compatibility with popular WooCommerce themes */
.woocommerce .products .product.placeholder-ad {
    margin-bottom: 2em;
}

/* Storefront theme compatibility */
.woocommerce.storefront .products .product.placeholder-ad {
    background: #f8f8f8;
    border: 1px solid #e3e3e3;
}

/* Astra theme compatibility */
.woocommerce.astra .products .product.placeholder-ad {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}