/**
 * Amazon Affiliate Banner Styles
 * Drugslib.com - Fixed for site compatibility
 */

/* ========================================
   RESET & BASE
   ======================================== */

.amazon-affiliate-banner,
.amazon-affiliate-banner *,
.amazon-topbar,
.amazon-topbar * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.amazon-affiliate-banner {
    display: block;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

/* ========================================
   HEADER
   ======================================== */

.amazon-banner__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 8px;
}

.amazon-banner__label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.amazon-banner__logo {
    height: 18px;
    width: auto;
    opacity: 0.8;
    display: block;
}

/* ========================================
   PRODUCTS CONTAINER
   ======================================== */

.amazon-banner__products {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
}

@media (max-width: 600px) {
    .amazon-banner__products {
        flex-direction: column;
    }
}

/* ========================================
   PRODUCT CARD
   ======================================== */

.amazon-product {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.2s ease;
    flex: 1 1 0;
    min-width: 0;
}

.amazon-product:hover {
    border-color: #ff9900;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.15);
    text-decoration: none !important;
}

.amazon-product__image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 8px;
    overflow: hidden;
}

.amazon-product__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.amazon-product__info {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.amazon-product__category {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #ff9900;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
    line-height: 1.3;
}

.amazon-product__name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 4px 0;
    padding: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amazon-product__desc {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin: 0 0 6px 0;
    padding: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amazon-product__cta {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #ff9900;
    line-height: 1.3;
}

.amazon-product:hover .amazon-product__cta {
    color: #cc7a00;
}

/* ========================================
   DISCLOSURE
   ======================================== */

.amazon-banner__disclosure {
    font-size: 10px;
    color: #868e96;
    margin: 12px 0 0 0;
    padding: 10px 0 0 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
    line-height: 1.4;
}

/* ========================================
   HORIZONTAL STYLE
   ======================================== */

.amazon-banner--horizontal .amazon-banner__products {
    flex-direction: row;
}

@media (max-width: 600px) {
    .amazon-banner--horizontal .amazon-banner__products {
        flex-direction: column;
    }
}

/* ========================================
   VERTICAL STYLE (Sidebar)
   ======================================== */

.amazon-banner--vertical {
    max-width: 300px;
}

.amazon-banner--vertical .amazon-banner__products {
    flex-direction: column;
}

.amazon-banner--vertical .amazon-product {
    flex-direction: column;
    text-align: center;
}

.amazon-banner--vertical .amazon-product__image {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px auto;
}

.amazon-banner--vertical .amazon-product__info {
    text-align: center;
}

.amazon-banner--vertical .amazon-product__name,
.amazon-banner--vertical .amazon-product__desc {
    white-space: normal;
}

/* ========================================
   COMPACT STYLE (Inline)
   ======================================== */

.amazon-banner--compact {
    padding: 12px;
    margin: 12px 0;
}

.amazon-banner--compact .amazon-banner__header {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.amazon-banner--compact .amazon-product {
    padding: 10px;
}

.amazon-banner--compact .amazon-product__image {
    width: 50px;
    height: 50px;
}

.amazon-banner--compact .amazon-product__desc {
    display: none;
}

.amazon-banner--compact .amazon-banner__disclosure {
    margin-top: 10px;
    padding-top: 8px;
}

/* ========================================
   TOPBAR (Site-wide Banner)
   ======================================== */

.amazon-topbar {
    display: block;
    width: 100%;
    background: linear-gradient(90deg, #232f3e 0%, #37475a 100%);
    padding: 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.amazon-topbar .ddc-width-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.amazon-topbar__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.amazon-topbar__link:hover {
    color: #ff9900 !important;
    text-decoration: none !important;
}

.amazon-topbar__icon {
    font-size: 16px;
    line-height: 1;
}

.amazon-topbar__text {
    color: #ffffff;
}

.amazon-topbar__text strong {
    color: #ff9900;
}

.amazon-topbar__cta {
    display: inline-block;
    background: #ff9900;
    color: #232f3e !important;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.2s;
    white-space: nowrap;
}

.amazon-topbar__link:hover .amazon-topbar__cta {
    background: #ffad33;
}

@media (max-width: 600px) {
    .amazon-topbar {
        padding: 6px 0;
    }

    .amazon-topbar__link {
        font-size: 11px;
        gap: 6px;
        padding: 0 10px;
    }

    .amazon-topbar__text {
        display: none;
    }

    .amazon-topbar__cta {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .amazon-affiliate-banner,
    .amazon-topbar {
        display: none !important;
    }
}
