/* ══════════════════════════════════════════════════════════════
   SHOP OVERLAY
   ══════════════════════════════════════════════════════════════ */

.shop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.shop-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.shop-panel {
    background: linear-gradient(180deg, #f8f0e0 0%, #ece0c8 100%);
    border: 4px solid #4a3728;
    border-radius: 20px;
    padding: 20px;
    max-width: 340px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(40, 30, 20, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.shop-overlay.visible .shop-panel {
    transform: translateY(0) scale(1);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #d8c8b0;
}

.shop-title {
    font-size: 18px;
    font-weight: bold;
    color: #4a3728;
}

.shop-close {
    width: 48px;
    height: 48px;
    background: #c8a080;
    border: 2px solid #8b7355;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.shop-close:hover {
    background: #a88060;
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #fff8e0 0%, #ffe8a0 100%);
    padding: 8px 14px;
    border-radius: 12px;
    border: 2px solid #d4a020;
    margin-bottom: 16px;
}

.shop-balance-icon {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffd700 0%, #ffb800 50%, #ff9500 100%);
    border-radius: 50%;
}

.shop-balance-text {
    font-size: 14px;
    color: #8b6914;
    font-weight: bold;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.shop-item {
    background: white;
    border: 3px solid #d8c8b0;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.shop-item:hover {
    transform: translateY(-2px);
    border-color: #8b7355;
}

.shop-item.owned {
    background: #e8f0e0;
    border-color: #6a9050;
}

.shop-item.locked {
    opacity: 0.5;
    filter: grayscale(0.3);
    cursor: not-allowed;
}

.shop-item-hint {
    font-size: 13px;
    color: #a08878;
    margin-top: 4px;
    font-style: italic;
}

.shop-item-icon {
    font-size: 28px;
    margin-bottom: 6px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-item-icon img {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain;
}

.shop-ftue-hint {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 12px;
    color: #8a7a6a;
    font-style: italic;
    padding: 4px 0 8px;
}

.shop-item-name {
    font-size: 13px;
    color: #4a3728;
    font-weight: bold;
    margin-bottom: 4px;
}

.shop-item-desc {
    font-size: 13px;
    color: #8b7355;
    margin-bottom: 6px;
    line-height: 1.3;
}

.shop-item-cost {
    font-size: 13px;
    color: #8b6914;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.shop-item-cost-icon {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ffd700 0%, #ff9500 100%);
    border-radius: 50%;
}

.shop-item.owned .shop-item-cost {
    color: #4a7030;
}

/* Use button for consumables/plantables */
.shop-item-use-btn {
    margin-top: 8px;
    padding: 6px 16px;
    background: linear-gradient(180deg, #a8e063 0%, #56ab2f 100%);
    border: 2px solid #3d7a1e;
    border-radius: 16px;
    color: white;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.shop-item-use-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(86, 171, 47, 0.4);
}

.shop-item-use-btn:active {
    transform: scale(0.98);
}

/* ══════════════════════════════════════════════════════════════
   BLOOM LOCKED ITEMS (premium tier tease)
   ══════════════════════════════════════════════════════════════ */

.shop-item.bloom-locked {
    position: relative;
    filter: saturate(0.4) brightness(0.85);
    cursor: pointer;
}

.shop-item.bloom-locked:hover {
    transform: none;
    border-color: #d8c8b0;
}

.shop-item.bloom-locked::after {
    content: '🌸 Bloom';
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #e8b4d8 0%, #d4a0c8 100%);
    color: #6b3a5c;
    font-size: 13px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}

/* ── Bloom toast ── */

.bloom-toast {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #fff0f5 0%, #fce4ec 100%);
    border: 2px solid #d4a0c8;
    border-radius: 12px;
    padding: 10px 16px;
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: #6b3a5c;
    font-weight: bold;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bloom-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Bloom explanation hint ── */

.shop-bloom-hint {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    color: #a08878;
    letter-spacing: 0.2px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .shop-panel {
        background: linear-gradient(180deg, #2a2520 0%, #1e1a16 100%);
        border-color: rgba(180, 160, 130, 0.5);
    }
    .shop-title {
        color: #F5E6D0;
    }
    .shop-header {
        border-bottom-color: rgba(180, 160, 130, 0.3);
    }
    .shop-item {
        background: #2a2520;
        border-color: rgba(180, 160, 130, 0.3);
    }
    .shop-item-name {
        color: #e0d5c5;
    }
    .shop-item-desc {
        color: #b0a090;
    }
}
