/* ============================================
   Item Shop (v1.7.0)
   ============================================ */

.shop-header-note {
    padding: 8px 14px;
    background: rgba(255, 138, 108, 0.08);
    border: 1px solid rgba(255, 138, 108, 0.25);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.shop-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px 18px 18px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
    /* Flex column so the price row pins to the card bottom - upcoming cards
       have less middle content (no supply bar) and would otherwise float
       their price higher than neighboring live cards. */
    display: flex;
    flex-direction: column;
}

.shop-item-card:hover {
    transform: translateY(-3px);
}

.shop-item-card.battle:hover { border-color: var(--pink-main); }
.shop-item-card.time:hover   { border-color: var(--blue-main); }
.shop-item-card.speed:hover  { border-color: var(--yellow-main); }

.shop-item-card.sold-out {
    opacity: 0.55;
}

.shop-item-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 10px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.shop-item-name {
    font-family: var(--font-display);
    font-size: 18px;
    margin: 0 0 6px;
    color: var(--text-main);
}

.shop-item-boost {
    font-weight: 700;
    font-size: 14px;
    color: var(--green-light);
    margin-bottom: 14px;
}

.shop-item-card.battle .shop-item-boost { color: var(--pink-main); }
.shop-item-card.time .shop-item-boost   { color: var(--blue-main); }
.shop-item-card.speed .shop-item-boost  { color: var(--yellow-main); }

.shop-boost-scope {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.shop-item-supply {
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--text-dim);
}

.shop-supply-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.shop-supply-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-main), var(--blue-main));
    border-radius: 999px;
}

.shop-item-prices {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: auto; /* bottom-align with sibling cards (see .shop-item-card) */
}

.shop-buy-btn {
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.shop-buy-btn.roe {
    background: rgba(255, 138, 108, 0.15);
    border-color: rgba(255, 138, 108, 0.4);
    color: #ff9b7a;
}

.shop-buy-btn.avax {
    background: rgba(232, 65, 66, 0.12);
    border-color: rgba(232, 65, 66, 0.4);
    color: #ff6b6b;
}

.shop-buy-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

.shop-buy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.shop-not-for-sale {
    font-size: 12px;
    color: var(--text-dim);
}

/* ============ Inventory ============ */

.shop-inventory-section .section-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.shop-inventory-hint {
    font-size: 12.5px;
    color: var(--text-dim);
}

/* Inventory reuses the purchase-card layout (.shop-item-card) so the two
   grids read as one design - same card size, hero art, and button line. */
.shop-inventory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.shop-inv-all-equipped {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
    padding: 9px 0;
}

/* Meta rows below are shared by the equip/sell modals' option lists. */
.shop-inv-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shop-inv-name {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-main);
}

.shop-inv-boost {
    font-size: 12px;
    color: var(--text-muted);
}

.shop-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 10px;
    color: var(--text-dim);
}

/* ============ Team item slots (My Teams) ============ */

.team-item-slots {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 2px;
}

.team-item-slots-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-right: 2px;
}

.team-item-slot {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px dashed var(--border-subtle);
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.team-item-slot:hover {
    border-color: var(--green-main);
    transform: translateY(-1px);
}

.team-item-slot.filled {
    border-style: solid;
    border-color: rgba(45, 212, 233, 0.4);
}

.team-item-slot .slot-plus {
    color: var(--text-dim);
    font-size: 16px;
}

/* ============ Equip modal ============ */

.equip-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 2px;
}

.equip-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: var(--text-main);
    transition: border-color 0.15s ease;
}

.equip-option:hover:not(:disabled) {
    border-color: var(--green-main);
}

.equip-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.equip-option .equip-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-dim);
}

.equip-option.remove {
    justify-content: center;
    color: #ff6b6b;
    border-color: rgba(232, 65, 66, 0.3);
}

@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .shop-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ Coming-soon drops ============ */

/* Blur only the art itself - the wrapper stays sharp because it anchors the
   centered countdown badge (which must not inherit the blur). */
.shop-item-card.upcoming .shop-item-icon.blurred {
    position: relative;
    user-select: none;
}

.shop-item-card.upcoming .shop-item-icon.blurred > :not(.shop-countdown-badge) {
    filter: blur(9px) saturate(0.7) drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

.shop-item-card.upcoming {
    border-style: dashed;
    border-color: rgba(255, 214, 168, 0.35);
}

/* Centered over the blurred art (its positioning parent), topmost layer -
   the countdown is the card's one hard fact, so it gets center stage. */
.shop-countdown-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(10, 22, 34, 0.85);
    border: 1px solid rgba(255, 196, 76, 0.55);
    color: var(--yellow-main, #ffc44c);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.shop-item-mystery {
    letter-spacing: 4px;
    color: var(--text-muted);
}

.shop-item-mystery-sub {
    color: var(--text-dim) !important;
    font-weight: 500;
    margin-bottom: 18px;
}

/* ============ Drop Admin ============ */

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 980px) {
    .admin-grid { grid-template-columns: 1fr; }
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px;
}

.admin-card h2 {
    font-family: var(--font-display);
    font-size: 20px;
    margin: 0 0 18px;
}

.admin-row { margin-bottom: 16px; }
.admin-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-card label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.admin-card input[type="text"],
.admin-card input[type="number"],
.admin-card select {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
}

.admin-field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.admin-golive { display: flex; gap: 20px; flex-wrap: wrap; }
.admin-radio { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.admin-inline-num { width: 70px; margin: 0 4px; padding: 6px 8px !important; }
.admin-hint { font-size: 11.5px; color: var(--text-dim); margin: 6px 0 0; }

.admin-dropzone {
    border: 2px dashed var(--border-subtle);
    border-radius: 14px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    overflow: hidden;
}

.admin-dropzone:hover, .admin-dropzone.dragging {
    border-color: var(--green-main);
    background: rgba(45, 212, 233, 0.05);
}

.admin-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    padding: 18px;
    text-align: center;
}

.admin-dropzone-icon { font-size: 30px; }

.admin-image-preview {
    max-height: 180px;
    max-width: 100%;
    object-fit: contain;
}

.admin-shop-preview { display: flex; justify-content: center; }

.shop-item-img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 12px;
}

/* In the shop grid the art is the hero - let it fill the card width. The
   generated art carries its own dark underwater background, so at this size
   it reads as a banner rather than an icon. Other contexts (inventory rows,
   admin drops list, equip modal) keep the small default above. */
.shop-item-card .shop-item-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.admin-submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--green-main), var(--blue-main));
    color: #06121f;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
}

.admin-submit-btn:disabled { opacity: 0.6; cursor: wait; }

.admin-drops-list { display: flex; flex-direction: column; gap: 10px; }

.admin-drop-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}

.admin-drop-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.admin-drop-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-muted); min-width: 0; }
.admin-drop-meta strong { color: var(--text-main); }
.admin-drop-meta em { font-style: normal; color: var(--yellow-main); }

.admin-mini-btn {
    margin-left: auto;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 196, 76, 0.45);
    background: rgba(255, 196, 76, 0.12);
    color: var(--yellow-main);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

/* Equip (primary) + Sell pair on inventory cards - sized like .shop-buy-btn
   so inventory cards mirror the purchase cards' button line. */
.shop-equip-btn {
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid rgba(74, 222, 128, 0.5);
    background: rgba(74, 222, 128, 0.15);
    color: var(--green-light);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.shop-equip-btn:hover {
    background: rgba(74, 222, 128, 0.3);
}

/* Neutral tile for items without uploaded art - deliberately no emoji. */
.shop-item-placeholder {
    display: inline-block;
    background:
        radial-gradient(circle at 30% 30%, rgba(45, 212, 233, 0.25), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(74, 222, 128, 0.18), transparent 60%),
        rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.team-slot-img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.equip-option-img { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; }

/* The Drop Admin nav item is [hidden] unless the connected wallet IS the
   items-contract owner. .nav-item's display:flex would silently override
   the hidden attribute - force it. */
.nav-item[hidden] {
    display: none !important;
}

span.admin-drop-thumb { width: 40px; height: 40px; display: inline-block; flex-shrink: 0; }

.shop-sell-btn {
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid rgba(45, 212, 233, 0.4);
    background: rgba(45, 212, 233, 0.1);
    color: var(--green-light);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.shop-sell-btn:hover {
    background: rgba(45, 212, 233, 0.25);
}

/* Locked equip/disband state on deployed teams - make "disabled" LOOK
   disabled and say why, instead of a silent no-op click. */
.team-item-slot:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-style: dotted;
}
.team-item-slot:disabled:hover {
    border-color: var(--border-subtle);
    transform: none;
}
.team-item-slots.equip-locked {
    flex-wrap: wrap;
}
.team-locked-note {
    flex-basis: 100%;
    font-size: 11px;
    color: var(--text-dim);
    padding-top: 4px;
}
.team-action-btn.disband:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============ Craftable items (v1.1.0) ============ */
.shop-item-card.craftable {
    border-color: rgba(255, 217, 61, 0.4);
}

.shop-craft-recipe {
    font-size: 12px;
    color: var(--text-dim, #94a3b8);
    padding: 6px 10px;
    background: rgba(255, 217, 61, 0.08);
    border: 1px dashed rgba(255, 217, 61, 0.35);
    border-radius: 8px;
    margin: 6px 0;
}

.shop-buy-btn.craft {
    background: linear-gradient(90deg, #ffd93d, #ffa157);
    color: #1a1206;
    font-weight: 800;
}
