/**
 * Amazon affiliate for Elementor - Frontend Styles
 * Author: workflowdone
 */

/* ==========================================
   Base / Reset
   ========================================== */
.aae-products-wrapper * {
    box-sizing: border-box;
}

/* ==========================================
   Grid Layout
   ========================================== */
.aae-products-wrapper {
    width: 100%;
}

.aae-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ==========================================
   Product Card
   ========================================== */
.aae-product-card {
    background: #ffffff;
    border: 1px solid #e3e6e6;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.aae-product-card:hover {
    border-color: #FF9900;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.aae-product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    padding: 20px;
}

/* ==========================================
   Product Image
   ========================================== */
.aae-product-image {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.aae-product-image img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.aae-product-card:hover .aae-product-image img {
    transform: scale(1.05);
}

/* Discount Badge */
.aae-product-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #CC0C39;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 1;
}

/* ==========================================
   Product Content
   ========================================== */
.aae-product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aae-product-brand {
    font-size: 11px;
    color: #565959;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 500;
}

.aae-product-title {
    font-size: 15px;
    font-weight: 600;
    color: #0F1111;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.aae-product-card:hover .aae-product-title {
    color: #C45500;
}

.aae-product-description {
    font-size: 13px;
    color: #565959;
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   Product Meta (Price)
   ========================================== */
.aae-product-meta {
    margin-top: auto;
    padding-top: 8px;
}

.aae-product-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.aae-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #B12704;
}

.aae-product-original-price {
    font-size: 14px;
    color: #565959;
    text-decoration: line-through;
}

/* ==========================================
   Buy Button
   ========================================== */
.aae-product-button-wrap {
    margin-top: 12px;
}

.aae-product-button {
    display: inline-block;
    background: #FFD814;
    color: #0F1111;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 12px 28px;
    border-radius: 25px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.aae-product-button:hover {
    background: #F7CA00;
    transform: scale(1.02);
}

/* ==========================================
   Editor Placeholder
   ========================================== */
.aae-widget-placeholder {
    background: rgba(255, 153, 0, 0.1);
    border: 2px dashed #FF9900;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #FF9900;
}

.aae-widget-placeholder.aae-widget-error {
    background: rgba(204, 12, 57, 0.1);
    border-color: #CC0C39;
    color: #CC0C39;
}

.aae-editor-notice {
    text-align: center;
    padding: 12px;
    margin-top: 16px;
    background: rgba(255, 153, 0, 0.1);
    border-radius: 8px;
    color: #FF9900;
    font-size: 13px;
}

.aae-editor-notice .dashicons {
    vertical-align: middle;
    margin-right: 6px;
}

/* Placeholder shimmer */
.aae-placeholder-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: aae-shimmer 1.5s infinite;
}

.aae-placeholder-text {
    display: inline-block;
    height: 1em;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: aae-shimmer 1.5s infinite;
    border-radius: 4px;
    min-width: 60px;
}

.aae-placeholder-title {
    width: 85%;
    height: 1.2em;
}

.aae-placeholder-desc {
    width: 100%;
    height: 2.4em;
}

.aae-placeholder-price {
    width: 70px;
}

@keyframes aae-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==========================================
   Responsive Styles
   ========================================== */
@media (max-width: 1024px) {
    .aae-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .aae-products-grid {
        grid-template-columns: 1fr;
    }
}
