/* --- START OF FILE shop-ui.css --- */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

#shop-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    padding: 10px;
    box-sizing: border-box;
}

#shop-overlay.hidden {
    display: none;
}

#shop-panel {
    width: 100%;
    max-width: 550px;
    height: 85vh;
    background: #202028;
    border: 4px solid #fff;
    outline: 4px solid #000;
    box-shadow: 12px 12px 0px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    padding: 20px;
    color: white;
    font-family: 'Press Start 2P', cursive, monospace;
    animation: shopEntrance 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes shopEntrance {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #333;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.shop-header h2 {
    font-size: 16px;
    color: #4ade80;
    text-shadow: 2px 2px 0 #064e3b;
    margin: 0;
}

#shop-close {
    background: #ef4444;
    border: 2px solid #fff;
    color: white;
    font-family: inherit;
    width: 32px; height: 32px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
}

#shop-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px;
}

#shop-list::-webkit-scrollbar { width: 8px; }
#shop-list::-webkit-scrollbar-thumb { background: #555; }

/* --- NEW STACKED ROW STYLES --- */

.shop-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    padding: 10px;
    border: 2px solid #333;
    transition: background-color 0.1s, border-color 0.1s;
}

.shop-item-row.active {
    background: #161e29;
    border-color: #555;
}

.shop-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.shop-row-img {
    width: 42px; height: 42px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}

.shop-row-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-row-name {
    font-size: 10px;
    color: #fff;
}

.shop-row-rarity {
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 2px;
    background: #222;
    width: fit-content;
}

.rarity-common { color: #cbd5e1; }
.rarity-rare { color: #4ade80; }
.rarity-epic { color: #d946ef; }
.rarity-legendary { color: #fbbf24; }

.shop-row-price {
    font-size: 10px;
    color: #fbbf24;
}

.price-unit {
    color: #666;
    font-size: 8px;
}

/* CONTROLS RIGHT */
.shop-row-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.shop-stack-info {
    font-size: 8px;
    color: #888;
}

.shop-control-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-btn-qty {
    width: 24px; height: 24px;
    background: #333;
    border: 2px solid #000;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-btn-qty:active {
    background: #555;
    transform: translateY(1px);
}

.shop-qty-input {
    width: 30px;
    height: 24px;
    background: #000;
    border: 2px solid #444;
    color: #fff;
    font-family: inherit;
    font-size: 10px;
    text-align: center;
    pointer-events: none;
}

.shop-btn-max {
    height: 24px;
    padding: 0 6px;
    background: #fbbf24;
    color: #451a03;
    border: 2px solid #000;
    font-family: inherit;
    font-size: 8px;
    cursor: pointer;
    margin-left: 4px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.shop-btn-max:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

/* FOOTER */

.shop-footer {
    border-top: 4px solid #333;
    margin-top: 15px;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.total-value {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

#shop-total {
    color: #fbbf24;
    font-size: 14px;
}

#sell-all-btn {
    width: 100%;
    padding: 16px;
    background: #22c55e;
    color: #fff;
    border: 2px solid #000;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
    font-size: 12px;
    transition: opacity 0.2s;
    text-transform: uppercase;
}

#sell-all-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

@media (max-width: 600px) {
    .shop-row-img { width: 32px; height: 32px; }
    .shop-row-name { font-size: 8px; width: 80px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .shop-btn-qty { width: 20px; height: 20px; }
    .shop-qty-input { width: 24px; height: 20px; font-size: 8px; }
    .shop-btn-max { height: 20px; font-size: 7px; }
}

/* --- UniFish Swap Router Accent --- */
#shop-panel {
    border-color: #00f5ff;
    box-shadow: 0 0 0 4px #000, 0 0 26px rgba(0, 245, 255, 0.32), 12px 12px 0 rgba(0,0,0,0.5);
}

.shop-header h2 {
    color: #00f5ff;
    text-shadow: 2px 2px 0 #0f172a, 0 0 8px rgba(0,245,255,0.65);
}

.shop-header h2::after {
    content: "  FISH -> $UNIFISH";
    color: #d946ef;
    font-size: 8px;
}

.shop-item-row.active {
    border-color: #00f5ff;
    background: linear-gradient(90deg, rgba(0, 245, 255, 0.12), rgba(124, 58, 237, 0.10));
}

.shop-row-price,
#shop-total {
    color: #00f5ff;
    text-shadow: 0 0 6px rgba(0,245,255,0.55);
}

.price-unit {
    color: #d946ef;
}

#sell-all-btn {
    background: linear-gradient(180deg, #22d3ee, #7c3aed);
    border: 4px solid #000;
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.25), inset 4px 4px 0 rgba(255,255,255,0.18), 4px 4px 0 #000;
}

.shop-btn-max {
    background: #00f5ff;
    color: #020617;
}
