/* Joint Theme Core - Widget Styles */

/* Inherit Elementor global colors when no explicit color is set */
.jtc-store-information .elementor-heading-title.jtc-store-info-field__title {
    color: var(--e-global-color-primary, inherit);
}

.jtc-store-information .jtc-store-info-field__value {
    color: var(--e-global-color-text, inherit);
}

.jtc-store-information .jtc-store-info-field__value a {
    color: var(--e-global-color-accent, inherit);
}

/* Reset Elementor inherited widget spacing on inner elements */
.jtc-store-information .elementor-widget-heading,
.jtc-store-information .elementor-widget-text-editor {
    --widgets-spacing: 0px 0px;
    --widgets-spacing-row: 0px;
    --widgets-spacing-column: 0px;
    margin: 0;
    padding: 0;
}

.jtc-store-information .jtc-store-hours,
.jtc-store-information .jtc-store-hours-row {
    margin: 0;
    padding: 0;
}

.jtc-store-information .jtc-store-hours__day,
.jtc-store-information .jtc-store-hours__time {
    margin: 0;
    padding: 0;
}

/* Layout */
.jtc-store-information,
.jtc-store-info-field,
.jtc-store-hours--stacked,
.jtc-store-hours--stacked .jtc-store-hours-row {
    display: flex;
    flex-direction: column;
}

.jtc-store-hours--inline {
    display: flex;
    flex-direction: column;
}

.jtc-store-hours--inline .jtc-store-hours-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
}

/* Social Media Icons */
.jtc-social-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.jtc-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, fill 0.2s ease;
    line-height: 1;
}

/* Store Categories Carousel */
.jtc-store-categories-swiper .swiper-slide {
    height: auto;
}

.jtc-store-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease;
    height: 100%;
}

.jtc-store-category__image img {
    object-fit: cover;
    display: block;
}

.jtc-store-category__title {
    color: var(--e-global-color-text, inherit);
    transition: color 0.2s ease;
}

/* Category Grid Cards */
.jtc-cat-grid {
    display: grid;
    gap: 16px;
}

.jtc-cat-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.jtc-cat-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.jtc-cat-card__title {
    margin: 0;
    font-weight: 600;
}

.jtc-cat-card__button {
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.jtc-cat-card__subcategories {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jtc-cat-card__subcat {
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Store Information Chips */
.jtc-store-info-chips {
    display: flex;
    flex-wrap: wrap;
}

.jtc-store-info-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 16px;
    font-size: 12px;
    background: #f0f0f0;
    color: #333;
}

/* Locations Map */
.jtc-locations-map {
    display: flex;
    width: 100%;
    min-height: 600px;
}

.jtc-locations-sidebar {
    width: 380px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.joint-store-menu-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.jtc-locations-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.jtc-locations-nearby {
    display: flex;
    flex-direction: column;
}

.jtc-locations-map-container {
    flex: 1;
    min-height: 600px;
}

.jtc-store-card {
    padding: 16px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.jtc-locations-map .jtc-store-card {
    cursor: pointer;
}

.jtc-store-card.jtc-store-card--focus {
    background-color: #f5f5f5;
}

.jtc-locations-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jtc-locations-state-btn {
    padding: 6px 16px;
    border: 1px solid #ddd;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.jtc-locations-state-btn--active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.jtc-store-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jtc-store-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 16px;
    font-size: 12px;
    background: #f0f0f0;
    color: #333;
}

/* Locations Grid */
.jtc-locations-grid {
    display: grid;
    gap: 16px;
}

/* Map Pins */
.jtc-map-pin {
    background: none !important;
    border: none !important;
}

.jtc-map-pin svg path {
    fill: var(--e-global-color-primary, #333);
    transition: fill 0.2s ease;
}

/* Currently Shopping label */
.jtc-locations-current__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Visit Store Button */
.jtc-store-card__button {
    display: inline-block;
    align-self: flex-start;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.jtc-store-card__image img {
    display: block;
    width: 100%;
}

/* Store Reviews */
.jtc-review-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100%;
}

.jtc-review-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.jtc-review-star {
    font-size: 16px;
    line-height: 1;
}

.jtc-review-star--filled {
    color: #FFB800;
}

.jtc-review-star--empty {
    color: #DDD;
}

.jtc-review-card__text {
    flex: 1;
}

.jtc-review-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.jtc-review-card__author {
    font-weight: 600;
}

.jtc-review-card__source {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    line-height: 1;
}

.jtc-review-card__source i,
.jtc-review-card__source svg {
    width: 1em;
    height: 1em;
}

.jtc-reviews-grid {
    display: grid;
    gap: 16px;
}

.jtc-reviews-swiper .swiper-slide {
    height: auto;
}

.jtc-reviews-swiper {
    position: relative;
}

.jtc-reviews-swiper .jtc-swiper-pagination {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    bottom: auto;
}

.jtc-reviews-swiper .elementor-swiper-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.jtc-reviews-swiper .elementor-swiper-button-prev {
    left: 0;
}

.jtc-reviews-swiper .elementor-swiper-button-next {
    right: 0;
}

/* Pre-init: hide swipers until initialized to prevent layout shift */
.jtc-store-categories-swiper:not(.swiper-initialized),
.jtc-reviews-swiper:not(.swiper-initialized) {
    overflow: hidden;
    opacity: 0;
}

.jtc-store-categories-swiper.swiper-initialized,
.jtc-reviews-swiper.swiper-initialized {
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* Locations Map - Responsive: stack map on top, list below */
@media (max-width: 768px) {
    .jtc-locations-map {
        flex-direction: column;
        min-height: auto !important;
    }

    .jtc-locations-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        order: 2;
    }

    .jtc-locations-map-container {
        min-height: 350px !important;
        order: 1;
    }

    .jtc-locations-list {
        overflow-y: visible;
        flex: none;
    }
}
