/* Geo-Affiliate Linker Styles v2.4 */
.gal-container {
    max-width: 800px;
    margin: 2em auto;
    padding: 1em 2em;
    text-align: center;
}

.gal-header {
    margin-bottom: 2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1em;
}

.gal-title {
    margin: 0;
    font-size: 1.5em;
    text-align: left;
}

.gal-lang-switcher-wrapper {
    flex-shrink: 0; /* Prevents the switcher from shrinking */
}

/* --- Product Image Styles --- */
#gal-product-image-container {
    text-align: center; /* Center the image within its container */
    margin-bottom: 2.5em; /* Space between the image and the first store section */
}

.gal-product-image {
    max-height: 300px; /* As requested */
    width: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Ensure it's responsive and doesn't overflow on small screens */
    height: auto; /* Good practice for responsive images */
}

.gal-section {
    margin-bottom: 2.5em;
}

.gal-section h3 {
    font-size: 1.3em;
    font-weight: 500;
    margin-bottom: 1em;
    color: #555;
}

.gal-link-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gal-link {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 80%;
    max-width: 450px;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    color: #333;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-left: 5px solid transparent;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-align: left;
}

/* Affiliate link style */
.gal-link.is-affiliate {
    border-left-color: lightgreen;
}

.gal-link:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    color: #000;
}

/* Alternate colors for nearby stores */
.gal-section-nearby .gal-link {
    background-color: #e9f5ff;
    border-color: #aed9ff;
}

.gal-section-nearby .gal-link:hover {
    background-color: #d1eaff;
}

/* Disclaimer styles */
.gal-disclaimer {
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 1px solid #eee;
    font-size: 0.85em;
    color: #777;
}

.gal-disclaimer p {
    margin: 0;
}

/* --- Store Logo Styles --- */

.gal-link-logo-container {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    /* FIREFOX FIX */
    min-width: 0;
}

.gal-link-logo {
    max-width: 100%;
    max-height: 40px;
    height: auto;
    object-fit: contain;
}

.gal-link-text {
    flex-grow: 1;
}

/* --- ADDED: Country Override Styles --- */
#gal-country-override-container {
    margin: 2em 0;
    font-size: 0.9em;
    color: #555;
}

.gal-country-override-trigger {
    color: #555;
    text-decoration: none;
    display: inline-block;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.gal-country-override-trigger .change-link {
    text-decoration: underline;
    color: #0073aa;
    font-weight: bold;
}

.gal-country-override-trigger:hover {
    background-color: #f0f0f0;
}

.gal-country-selector {
    max-width: 450px;
    margin: 10px auto 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #fff;
}

.gal-country-search {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.gal-country-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
    text-align: left;
}

.gal-country-list li a {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
}

.gal-country-list li a:hover {
    background-color: #f0f0f0;
}