/**
 * Stockists Widget Styles
 */

/* Container layout */
.stockists-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.stockists-grid {
    flex: 1;
    min-width: 300px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Header and title styling */
.stockists-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #d4aea8;
    z-index: 10;
}

.stockists-title {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    color: #d4aea8;
}

.stockists-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.stockists-counter {
    font-size: 0.9em;
    color: #555;
}

.stockists-counter span {
    font-weight: bold;
    color: #d4aea8;
}

.stockists-scroll-indicator {
    display: flex;
    align-items: center;
    font-size: 0.8em;
    color: #777;
}

.stockists-scroll-indicator .dashicons {
    font-size: 1.2em;
    margin-right: 5px;
    animation: bounce 2s infinite;
    color: #d4aea8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 
    40% {transform: translateY(-5px);} 
    60% {transform: translateY(-3px);} 
}

.stockists-map-container {
    flex: 2;
    min-width: 300px;
    position: relative;
}

.stockists-map {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Stockist item styling */
.stockist-item {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stockist-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-color: #ccc;
}

.stockist-item.active {
    border-color: #d4aea8;
}

.stockist-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stockist-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.stockist-details {
    flex: 1;
    min-width: 200px;
}

.stockist-name {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #d4aea8;
}

.stockist-address {
    margin-bottom: 8px;
    font-size: 0.9em;
    line-height: 1.4;
}

.stockist-phone {
    margin-bottom: 8px;
    font-size: 0.9em;
    font-weight: 600;
}

.stockist-hours {
    margin-bottom: 12px;
    font-size: 0.85em;
    color: #555;
    line-height: 1.4;
}

.stockist-website,
.stockist-email {
    margin-bottom: 8px;
    font-size: 0.85em;
    line-height: 1.4;
}

.stockist-website a,
.stockist-email a {
    color: #d4aea8;
    text-decoration: none;
}

.stockist-website a:hover,
.stockist-email a:hover {
    text-decoration: underline;
}

.stockist-locate-btn {
    padding: 6px 12px;
    background-color: #d4aea8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s;
}

.stockist-locate-btn:hover {
    background-color: #987574;
}

/* Info window styling */
.stockist-info-window {
    padding: 5px;
    max-width: 300px;
}

.stockist-info-window h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #d4aea8;
}

.info-address,
.info-hours,
.info-website,
.info-email {
    margin-bottom: 8px;
    font-size: 0.9em;
    line-height: 1.4;
}

.info-phone {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-icon {
    margin-right: 5px;
    color: #d4aea8;
    width: 16px;
    display: inline-block;
    text-align: center;
}

.info-website a,
.info-email a {
    color: #d4aea8;
    text-decoration: none;
}

.info-website a:hover,
.info-email a:hover {
    text-decoration: underline;
}

/* Stockist logos carousel */
.stockists-logos-carousel {
    position: relative;
    padding: 20px 40px;
    margin: 30px 0;
    overflow: hidden;
}

.stockists-logos-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0;
    -ms-overflow-style: none;  /* Hide scrollbar in IE and Edge */
    scrollbar-width: none;  /* Hide scrollbar in Firefox */
}

.stockists-logos-wrapper::-webkit-scrollbar {
    display: none;  /* Hide scrollbar in Chrome, Safari and Opera */
}

.stockist-logo-item {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.stockist-logo-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-color: #d4aea8;
}

.stockist-logo-item a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.stockist-logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.stockists-logos-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.stockists-logos-nav button {
    pointer-events: auto;
    width: 36px;
    height: 36px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stockists-logos-nav button:hover {
    background-color: #d4aea8;
    color: white;
    border-color: #d4aea8;
}

.stockists-logos-nav .next-logo {
    margin-right: 5px;
}

.stockists-logos-nav .prev-logo {
    margin-left: 5px;
}

/* Responsive styles for logo carousel */
@media (max-width: 768px) {
    .stockists-logos-carousel {
        padding: 20px 30px;
    }
    
    .stockist-logo-item {
        width: 100px;
        height: 100px;
    }
    
    .stockists-logos-nav button {
        width: 32px;
        height: 32px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stockists-container {
        flex-direction: column;
    }
    
    .stockists-grid {
        order: 2;
        max-height: none;
    }
    
    .stockists-map-container {
        order: 1;
        margin-bottom: 20px;
        position: sticky;
        top: 0;
        z-index: 90;
    }
    
    .stockists-map {
        height: 400px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Improve click target size for mobile */
    .stockist-locate-btn {
        padding: 8px 16px;
        font-size: 0.9em;
        width: 100%;
        margin-top: 10px;
    }
    
    /* Add scroll margin for better positioning */
    html {
        scroll-padding-top: 20px;
    }
} 