/**
 * eBay Country Tabs Styling
 */

/*Google ad*/
.jc-single-ad {
    width: 320px;
    height: 100px;
    margin: 0 auto;
    max-width: 100%;
}
.mid-adv{margin: 1rem 0 !important;}
@media (min-width: 768px) {
    .jc-single-ad { width: 728px; height: 150px; }    
}
@media (min-width: 500px) {
    .jc-single-ad {width: 468px; height: 150px; }
}

.no-images-yet {background-color: #FFFFFF !important;}

/*eBay Country Tabs Styling*/
.ebay-affiliate-widget {
    background-color: #ffffff;
    border-radius: 0px;
    border: none;
    padding: 0px;
    margin: var(--spacing-xl) 0;
    box-shadow: none;
} 

.ebay-affiliate-widget .widget-header{
    display: none !important;
}

.ebay-items-grid{
    gap:10px !important;
}

.country-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 20px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 300;
    color: #000000;
    white-space: nowrap;
}

.country-tab:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.country-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;   
}

.country-tab .flag-emoji {
    font-size: 20px;
    line-height: 1;
}

.country-tab .country-name {
    font-family: var(--font-family-main);
}

.ebay-listings-section{
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-lg);
    border: 1px solid #e8e8e8;
    margin-top: 3rem;
} 

/* ===== COUNTRY TAB NAVIGATION ===== */
.ebay-country-tabs {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin: 1rem 0;
    flex-wrap: wrap;
}


/* ===== COUNTRY CONTENT CONTAINERS ===== */
.country-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.country-content.active {
    display: block;
}

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

/* ===== LOADING STATES ===== */
.ebay-loading-state,
.ebay-loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    min-height: 250px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e8e8e8;
    border-top: 4px solid #3ba095;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ebay-loading-state p,
.ebay-loading-placeholder p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* ===== ERROR STATES ===== */
.ebay-widget-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    background-color: #fff5f5;
    border: 1px solid #ffebee;
    border-radius: 8px;
    min-height: 200px;
}

.ebay-widget-error p {
    color: #d32f2f;
    margin-bottom: 1rem;
    font-size: 14px;
}

.ebay-widget-error small {
    color: #999;
    font-size: 12px;
}

.retry-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background-color: #3ba095;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.retry-btn:hover {
    background-color: #317e76;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 978px) {
    .ebay-country-tabs {overflow-x: auto;scroll-behavior: smooth;-webkit-overflow-scrolling: touch;  scrollbar-width: none;max-width: 85dvw;flex-wrap: nowrap;}    
}

@media (max-width: 768px) {    
    .country-tab {  padding: 0.5rem 1rem;  font-size: 14px;  }    
    .country-tab .flag { font-size: 1em; }    
    .loading-spinner { width: 40px; height: 40px; border-width: 3px; }
    
}

@media (max-width: 480px) {
    .jcad {margin:4rem 0 1rem 0;}
    .country-tab { padding: 0.5rem 0.75rem; font-size: 13px;  flex-direction: row; gap: 0.25rem; }           
    .ebay-loading-state,
    .ebay-loading-placeholder { padding: 2rem 0.5rem; min-height: 200px; }
}