@keyframes pulseInteract {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 4px 20px rgba(255, 157, 226, 0.6); }
    100% { transform: translateX(-50%) scale(1); }
}

.shop-content {
    background: linear-gradient(135deg, #f0f4ff 0%, #fff 100%) !important;
    border: 6px solid #4ecdc4 !important;
}

.shop-tabs {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 10px;
}

.shop-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: #eee;
    border-radius: 15px 15px 0 0;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.2s;
}

.shop-tab.active {
    background: #4ecdc4;
    color: white;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-rows: min-content;
    align-content: start;
    gap: 15px;
    padding: 20px;
    max-height: 350px;
    overflow-y: auto;
}

.shop-item {
    background: white;
    border: 3px solid #eee;
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.shop-item:hover {
    border-color: #4ecdc4;
    transform: translateY(-5px);
}

.shop-item.selected {
    border-color: #4ecdc4;
    background: #f0fffb;
}

.shop-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.shop-price {
    font-family: 'Chewy', cursive;
    font-size: 20px;
    color: #f39c12;
}
/* --- Р В Р Р‹Р В Р’ВР В Р Р‹Р В РЎС›Р В РІР‚СћР В РЎС™Р В РЎвЂ™ Р В Р Р‹Р В РЎвЂ™Р В РІР‚СњР В РЎвЂєР В РІР‚в„ўР В РЎвЂєР В РІР‚СњР В Р Р‹Р В РЎС›Р В РІР‚в„ўР В РЎвЂ™ --- */
.farm-plot {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.plot-visual {
    font-size: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plot-dry {
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 20px;
    animation: bounce 2s infinite;
}

.plot-owner {
    position: absolute;
    bottom: -15px;
    font-size: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
.plot-visual.fertilized {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) hue-rotate(20deg);
}

.plot-sparkle {
    position: absolute;
    top: -20px;
    font-size: 14px;
    animation: sparkleAnim 1.5s infinite;
}

@keyframes sparkleAnim {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
}
.main-bits {
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 10px;
    border-radius: 12px;
    font-family: 'Chewy', cursive;
    font-size: 16px;
    color: #f39c12;
    border: 1.5px solid #f1c40f;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: fit-content;
}
.bits-counter {
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 15px;
    border-radius: 20px;
    font-family: 'Chewy', cursive;
    font-size: 22px;
    color: #f39c12 !important;
    border: 2px solid #f1c40f;
    margin: 0 15px;
    min-width: 60px;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bits-counter span {
    color: #e67e22 !important;
    font-weight: bold;
    display: inline-block;
}

/* === СТИЛИ ЯРМАРКИ (В МИРЕ) === */
#fair-bar-container {
    position: absolute;
    width: 200px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 12px;
    border: 3px solid #ff9de2;
    z-index: 5000; /* Выше большинства объектов */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-align: center;
    pointer-events: none;
    transform: translate(-50%, -100%); /* Центрирование по X и смещение вверх */
}

.fair-info {
    font-family: 'Fredoka', sans-serif;
    font-size: 13px;
    color: #ff9de2;
    margin-bottom: 4px;
    font-weight: bold;
    text-shadow: 1px 1px 0px white;
}

.fair-bar-bg {
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
}

#fair-fill {
    height: 100%;
    width: 0%;
    background: #4ecdc4;
    transition: width 0.5s ease;
}

.fair-content {
    border: 6px solid #ff9de2 !important;
    background: linear-gradient(135deg, #fff5fb 0%, #fff 100%) !important;
}

.fair-desc {
    padding: 0 20px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* === МОБИЛЬНАЯ ОПТИМИЗАЦИЯ МАГАЗИНА И ИНВЕНТАРЯ === */
@media (max-width: 480px) {
    .item-details {
        padding: 10px 15px 20px !important;
        flex-shrink: 0;
        overflow-y: auto;
    }

    .detail-header {
        margin-bottom: 5px !important;
        gap: 10px !important;
    }

    .detail-header h3 {
        font-size: 16px !important;
        margin: 0 !important;
    }

    /* Уменьшаем иконку в деталях, если она слишком большая */
    .item-details .item-icon {
        font-size: 40px !important; /* Уменьшаем с того, что на фото */
        line-height: 1;
    }

    #shop-detail-desc, #detail-desc, #fair-detail-desc {
        font-size: 12px !important;
        margin-bottom: 10px !important;
        max-height: 60px !important;
    }

    .shop-action-row {
        margin-top: 5px !important;
    }

    .shop-price {
        font-size: 18px !important;
    }

    .shop-content.modal-content, .fair-content.modal-content {
        padding: 0 !important;
    }
}

