/* ==========================================
   IN-CONTENT ADVERTISEMENT STYLING
   Elite Furniture Gallery Shop - Natural Ad Integration
   ========================================== */

/* Remove the sticky sidebar approach */
.right-ad-area {
    position: relative; /* Changed from fixed */
    right: auto;
    top: auto;
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    z-index: 1;
}

/* Sidebar Ads Header - Simplified */
.sidebar-ads-header {
    padding: 0;
    background: transparent;
    color: #666;
    border: none;
    position: relative;
    margin-bottom: 10px;
}

.sidebar-ads-header h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    text-align: center;
}

/* Sidebar Ads Container - In-content style */
.sidebar-ads-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: none;
}

/* Ad Wrapper - Natural integration */
.ad-wrapper {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Professional Ad Card - W3Schools style */
.professional-ad {
    background: var(--surface-color, #ffffff);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
    border: 1px solid #e0e0e0;
    width: 300px;
    margin: 0 auto;
}

.professional-ad:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ad Badge - Top corner label */
.ad-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
    border: 1px solid #e0e0e0;
}

.ad-badge i {
    font-size: 9px;
}

/* Ad Image Container */
.ad-image-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 150px;
    overflow: hidden;
    background: #f5f5f5;
}

.ad-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.professional-ad:hover .ad-image {
    transform: scale(1.02);
}

/* Corner Badge - Sale/Hot tags */
.ad-corner-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4444;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Ad Text Content */
.ad-text-content {
    padding: 15px;
    background: var(--surface-color, #ffffff);
}

.ad-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.3;
}

.ad-description {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-secondary, #666);
    line-height: 1.5;
}

/* Discount Badge */
.ad-discount {
    margin-bottom: 12px;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffd700;
    color: #1a1a1a;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.discount-badge i {
    font-size: 11px;
}

/* CTA Button - Simple & clear */
.ad-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: #04AA6D;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

.ad-cta-button:hover {
    background: #059862;
    box-shadow: 0 2px 6px rgba(4, 170, 109, 0.3);
}

.ad-cta-button i {
    font-size: 12px;
}

/* Ad Footer */
.ad-footer {
    padding: 10px 15px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.ad-company {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

/* Ad Type Variations - Subtle borders */
.professional-ad.promotional {
    border-left: 3px solid #ff4444;
}

.professional-ad.info {
    border-left: 3px solid #04AA6D;
}

.professional-ad.special {
    border-left: 3px solid #ffd700;
}

/* Placeholder Ad Styling */
.ad-placeholder-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 40px 20px;
    text-align: center;
    color: #999;
    min-height: 250px;
    width: 300px;
    margin: 0 auto;
}

.ad-placeholder-vertical i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.ad-placeholder-vertical p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

/* In-Page Ad Container */
.in-page-ad-container {
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .right-ad-area {
        max-width: 280px;
    }
    
    .professional-ad {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .right-ad-area {
        max-width: 100%;
        margin: 20px 15px;
    }
    
    .professional-ad {
        width: 100%;
        max-width: 300px;
    }
}

/* Dark Theme Support */
body.dark-theme .professional-ad {
    background: var(--surface-dark, #2a2a2a);
    border-color: var(--border-dark, #3a3a3a);
}

body.dark-theme .ad-title {
    color: var(--text-primary-dark, #f0f0f0);
}

body.dark-theme .ad-description {
    color: var(--text-secondary-dark, #b0b0b0);
}

body.dark-theme .ad-footer {
    background: var(--bg-secondary-dark, #1a1a1a);
    border-top-color: var(--border-dark, #3a3a3a);
}

body.dark-theme .ad-company {
    color: var(--text-secondary-dark, #999);
}

body.dark-theme .ad-badge {
    background: rgba(42, 42, 42, 0.95);
    color: #ccc;
    border-color: #3a3a3a;
}

/* Loading State */
.ad-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #999);
}

.ad-loading i {
    font-size: 28px;
    animation: spin 1s linear infinite;
}

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

/* No Ads Message */
.no-ads-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #999);
}

.no-ads-message i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.no-ads-message p {
    margin: 0;
    font-size: 13px;
}

/* Integration with main content */
.main-content-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.ads-area {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .main-content-wrapper {
        flex-direction: column;
    }
    
    .ads-area {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}