/* Market Module Premium Styles */

/* Grid Container */
.market-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* Bundle Card */
.market-bundle-card {
    background: linear-gradient(180deg, #1a1a20 0%, #121215 100%);
    border: 1px solid #333;
    border-radius: 6px;
    width: 100%;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.market-bundle-card:hover {
    transform: translateY(-2px);
    border-color: #555;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.market-bundle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #b92b27, #1565c0);
    z-index: 10;
}

/* Card Header */
.market-card-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #aaa;
}

.market-card-header strong {
    color: #ddd;
}

/* Items Container (Slot Grid) */
.market-card-items {
    padding: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 80px;
}

/* Inventory Item Slot */
.item-slot {
    width: 46px;
    height: 46px;
    background-color: #080808;
    border: 1px solid #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}

.item-slot:hover {
    border-color: #666;
    background-color: #111;
}

.item-slot img {
    max-width: 40px;
    max-height: 40px;
}

/* Selection State (for 'Sell' page) */
.item-slot.selected {
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.slot-check {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4CAF50;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
    /* hidden by default */
}

.item-slot.selected .slot-check {
    display: flex;
}

/* Card Footer */
.market-card-footer {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-tag {
    font-size: 16px;
    font-weight: bold;
    color: #ffb74d;
    /* Jewel/Gold color */
    display: flex;
    align-items: center;
    gap: 5px;
}

.buy-btn {
    background: #1b5e20;
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 3px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.buy-btn:hover {
    background: #2e7d32;
}

/* Responsive adjustment for cols */
@media (max-width: 768px) {
    .market-bundle-card {
        margin-bottom: 15px;
    }
}

/* Dark Panel Override */
.market-panel {
    background-color: #111;
    border-color: #333;
    color: #ccc;
}

.market-panel .panel-body {
    background-color: #111;
}

/* Tabs Dark Mode */
.nav-tabs>li>a {
    color: #aaa;
    border-color: transparent;
}

.nav-tabs>li>a:hover {
    background-color: #222;
    color: #fff;
    border-color: #333;
}

.nav-tabs>li.active>a,
.nav-tabs>li.active>a:hover,
.nav-tabs>li.active>a:focus {
    color: #fff;
    background-color: #111;
    border: 1px solid #333;
    border-bottom-color: transparent;
}

/* Dark Mode Components (Instructions, Wells, Inputs) */
.market-panel .well {
    background-color: #1a1a1a;
    border-color: #333;
    color: #ccc;
}

.market-panel .alert-info {
    background-color: #0d2b3a;
    /* Dark blueish for info */
    border-color: #1a4f66;
    color: #bce8f1;
}

.market-panel .form-control {
    background-color: #222;
    border-color: #444;
    color: #fff;
}

.market-panel .input-group-addon {
    background-color: #333;
    border-color: #444;
    color: #ccc;
}