/* Стили для триггера магазинов */
.shop-trigger-compact {
    background: none;
    border: none;
    padding: 8px 0;
    margin: 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.shop-trigger-compact:hover {
    opacity: 0.9;
}

.shop-trigger-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
    position: relative;
    min-height: 20px;
}

.shop-trigger-label {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.shop-trigger-dots {
    flex: 1;
    height: 1px;
    margin: 0 8px;
    background-image: radial-gradient(circle, #ddd 1px, transparent 1px);
    background-size: 4px 1px;
    background-position: 0 50%;
    background-repeat: repeat-x;
    opacity: 0.6;
}

.shop-trigger-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.shop-trigger-value {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}

.shop-trigger-arrow {
    color: #999;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.shop-trigger-compact:hover .shop-trigger-label,
.shop-trigger-compact:hover .shop-trigger-value,
.shop-trigger-compact:hover .shop-trigger-arrow {
    color: #d32f2f;
}

.shop-trigger-compact:hover .shop-trigger-arrow {
    transform: translateX(2px);
}

.shop-trigger-compact:hover .shop-trigger-dots {
    opacity: 0.8;
    background-image: radial-gradient(circle, #aaa 1px, transparent 1px);
}

/* Стили для модального окна магазинов */
:root {
    --shop-color-primary: #d32f2f;
    --shop-color-primary-light: #ffebee;
    --shop-color-primary-dark: #b71c1c;
    --shop-color-yandex: #ff3333;
    --shop-color-yandex-hover: #e60000;
    --shop-color-google: #4285F4;
    --shop-color-google-hover: #3367d6;
    --shop-color-warning: #ff9800;
    --shop-color-warning-light: #fff3cd;
    --shop-color-warning-dark: #e0a800;
    --shop-color-gray-50: #f8f9fa;
    --shop-color-gray-100: #e9ecef;
    --shop-color-gray-200: #dee2e6;
    --shop-color-gray-300: #ced4da;
    --shop-color-gray-400: #adb5bd;
    --shop-color-gray-500: #6c757d;
    --shop-color-gray-600: #495057;
    --shop-color-gray-700: #343a40;
    --shop-color-gray-800: #212529;
    --shop-color-gray-900: #121416;
    --shop-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shop-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shop-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shop-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shop-radius-sm: 3px;
    --shop-radius: 5px;
    --shop-radius-md: 8px;
    --shop-radius-lg: 12px;
}

.shop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.shop-modal.is-open {
    display: block;
}

.shop-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: shopFadeIn 0.2s ease;
}

@keyframes shopFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shop-modal__container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background: white;
    animation: shopSlideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes shopSlideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.shop-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.shop-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--shop-color-gray-200);
    flex-shrink: 0;
}

.shop-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--shop-color-gray-100);
    border: none;
    border-radius: var(--shop-radius);
    color: var(--shop-color-gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-right: 16px;
}

.shop-back:hover {
    background: var(--shop-color-gray-200);
    color: var(--shop-color-gray-800);
    transform: translateX(-2px);
}

.shop-header__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--shop-color-gray-900);
    flex: 1;
}

.shop-header__empty {
    width: 40px;
    flex-shrink: 0;
}

.shop-main-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.shop-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.shop-card {
    padding: 20px;
    background: white;
    border: 1px solid var(--shop-color-gray-200);
    border-radius: var(--shop-radius-lg);
    display: flex;
    gap: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.shop-card:hover {
    border-color: var(--shop-color-gray-300);
    box-shadow: var(--shop-shadow);
    transform: translateY(-2px);
}

.shop-card__logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--shop-radius);
    overflow: hidden;
    background: white;
    border: 1px solid var(--shop-color-gray-200);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.shop-card__logo:hover {
    transform: scale(1.02);
}

.shop-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--shop-radius);
}

.shop-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.shop-card__logo:hover .shop-image {
    transform: scale(1.05);
}

.shop-image-zoom {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(211, 47, 47, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.shop-card__logo:hover .shop-image-zoom {
    opacity: 1;
}

.shop-card__main {
    flex: 1;
    min-width: 0;
}

.shop-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--shop-color-gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-card__details {
    margin-bottom: 16px;
}

.shop-card__description {
    font-size: 13px;
    color: var(--shop-color-gray-600);
    line-height: 1.5;
    margin-bottom: 12px;
}

.shop-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.shop-detail-icon {
    color: var(--shop-color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.shop-detail-content {
    flex: 1;
}

.shop-detail-label {
    font-weight: 600;
    color: var(--shop-color-gray-900);
    margin-bottom: 4px;
    font-size: 13px;
}

.shop-detail-text {
    color: var(--shop-color-gray-900);
    font-size: 13px;
    line-height: 1.4;
}

.shop-phone-link {
    color: var(--shop-color-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.shop-phone-link:hover {
    color: var(--shop-color-primary-dark);
    text-decoration: underline;
    transform: translateX(2px);
}

.shop-maps-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.shop-map-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--shop-radius);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.shop-map-button--yandex {
    background: var(--shop-color-yandex);
    color: white;
}

.shop-map-button--yandex:hover {
    background: var(--shop-color-yandex-hover);
    transform: translateY(-1px);
    box-shadow: var(--shop-shadow);
}

.shop-map-button--google {
    background: var(--shop-color-google);
    color: white;
}

.shop-map-button--google:hover {
    background: var(--shop-color-google-hover);
    transform: translateY(-1px);
    box-shadow: var(--shop-shadow);
}

/* Модалка для увеличенного изображения магазина */
.shop-image-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.shop-image-zoom-modal.is-open {
    display: block;
}

.shop-image-zoom-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: shopImageZoomFadeIn 0.3s ease;
}

@keyframes shopImageZoomFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shop-image-zoom-modal__container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #000;
    border-radius: var(--shop-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: shopImageZoomIn 0.3s ease;
}

@keyframes shopImageZoomIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.shop-image-zoom-header {
    padding: 16px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

.shop-image-zoom-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-image-zoom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.shop-image-zoom-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.shop-image-zoom-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--shop-radius);
}

.shop-image-zoom-footer {
    padding: 16px;
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.shop-image-zoom-caption {
    color: white;
    font-size: 14px;
    line-height: 1.4;
}

/* Адаптивность */
@media (max-width: 768px) {
    .shop-modal__container {
        max-width: 100%;
    }
    
    .shop-header {
        padding: 14px 16px;
    }
    
    .shop-back {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .shop-header__title {
        font-size: 16px;
    }
    
    .shop-list {
        padding: 16px;
        gap: 16px;
    }
    
    .shop-card {
        padding: 16px;
        gap: 12px;
    }
    
    .shop-card__logo {
        width: 80px;
        height: 80px;
    }
    
    .shop-card__title {
        font-size: 15px;
    }
    
    .shop-card__description {
        font-size: 12px;
    }
    
    .shop-detail-label,
    .shop-detail-text,
    .shop-phone-link {
        font-size: 12px;
    }
    
    .shop-map-button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .shop-image-zoom-modal__container {
        width: 95%;
    }
    
    .shop-image-zoom-content {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .shop-header {
        padding: 12px;
    }
    
    .shop-back {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .shop-header__title {
        font-size: 15px;
    }
    
    .shop-list {
        padding: 12px;
        gap: 12px;
    }
    
    .shop-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .shop-card__logo {
        width: 100%;
        height: 150px;
    }
    
    .shop-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .shop-maps-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .shop-map-button {
        width: 100%;
        justify-content: center;
    }
}

.shop-modal-open,
.shop-image-zoom-modal-open {
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
}

@media (hover: none) and (pointer: coarse) {
    .shop-card__logo:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
    
    .shop-map-button:active {
        opacity: 0.8;
        transform: scale(0.95);
    }
}