/* =====================
   CURRENCY CHIP
   ===================== */

.store-currency-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.85rem;
    color: #ffbf00;
    font-weight: bold;
    white-space: nowrap;
    padding: 4px 14px;
    border-radius: 20px;
    border: 2px solid rgba(255, 191, 0, 0.35);
    background: rgba(255, 191, 0, 0.06);
    height: 30px;
    box-sizing: border-box;
    margin: 0 6px;
}

.store-currency-chip i {
    font-size: 0.85rem;
}

/* =====================
   FILTER DROPDOWNS
   ===================== */

.store-filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-select {
    padding: 4px 28px 4px 10px;
    border-radius: 20px;
    border: 2px solid rgba(255, 191, 0, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    height: 30px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,191,0,0.6)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.store-select:hover,
.store-select:focus {
    border-color: rgba(255, 191, 0, 0.5);
    box-shadow: 0 0 8px rgba(255, 191, 0, 0.15);
}

.store-select option {
    background: #1a1a1a;
    color: #f0ece6;
}

.store-mobile-filters {
    display: flex;
    gap: 6px;
}

.store-mobile-filters .store-select {
    flex: 1;
    min-width: 0;
}

/* =====================
   SKIN GRID
   ===================== */

.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    align-items: start;
    gap: 16px;
    max-width: 1300px;
    margin: 16px auto 0;
    padding: 0 16px 40px;
}

.skin-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 16px;
    padding: 60px 20px;
}

/* =====================
   SKIN TILE
   ===================== */

.skin-tile {
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.skin-tile:hover { transform: translateY(-4px); }

.skin-tile.rarity-COMMON:hover   { box-shadow: 0 8px 28px rgba(158,158,158,0.20); border-color: rgba(158,158,158,0.25); }
.skin-tile.rarity-UNCOMMON:hover { box-shadow: 0 8px 28px rgba(76,175,80,0.25);   border-color: rgba(76,175,80,0.3); }
.skin-tile.rarity-RARE:hover     { box-shadow: 0 8px 28px rgba(33,150,243,0.28);  border-color: rgba(33,150,243,0.3); }
.skin-tile.rarity-EPIC:hover     { box-shadow: 0 8px 28px rgba(171,71,188,0.28);  border-color: rgba(171,71,188,0.3); }
.skin-tile.rarity-ANCIENT:hover  { box-shadow: 0 8px 32px rgba(255,152,0,0.32);   border-color: rgba(255,152,0,0.35); }

.skin-tile.is-active {
    border-color: rgba(255, 191, 0, 0.45);
    box-shadow: 0 0 16px rgba(255, 191, 0, 0.1);
}

/* Rarity accent bar at top */
.skin-tile-rarity-bar {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
}
.rarity-bar-COMMON   { background: #9e9e9e; }
.rarity-bar-UNCOMMON { background: #4caf50; }
.rarity-bar-RARE     { background: #2196f3; }
.rarity-bar-EPIC     { background: linear-gradient(90deg, #7b1fa2, #ce93d8); }
.rarity-bar-ANCIENT  { background: linear-gradient(90deg, #e65100, #ffbf00); }

/* Image fills tile width, height is natural — no cropping, no blank space */
.skin-tile-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
}

.skin-tile:hover .skin-tile-image { transform: scale(1.04); }

/* Info below image */
.skin-tile-info {
    padding: 9px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #0f0f0f;
}

.skin-tile-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.skin-tile-name {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    min-width: 0;
}

.skin-tile-rarity {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.skin-tile-price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    color: #ffbf00;
    font-weight: bold;
}

.skin-tile-price i { font-size: 12px; }

/* =====================
   TYPE SECTION HEADERS (ALL view grouping)
   ===================== */

.skin-grid-container {
    max-width: 1300px;
    margin: 16px auto 0;
    padding: 0 0 40px;
}

.skin-type-section {
    margin-bottom: 32px;
}

.skin-type-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 12px;
}

.skin-type-header-label {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    color: rgba(255, 191, 0, 0.85);
    white-space: nowrap;
}

.skin-type-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 191, 0, 0.2), transparent);
}

.skin-type-header-count {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.5px;
}

/* Section grids — different column widths per skin type */
.skin-section-grid {
    display: grid;
    align-items: start;
    gap: 16px;
    padding: 0 16px;
}

.skin-section-grid.grid-wide {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.skin-section-grid.grid-portrait {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.skin-section-grid.grid-square {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* =====================
   RARITY COLORS
   ===================== */

.rarity-COMMON   { background: #9e9e9e; }
.rarity-UNCOMMON { background: #4caf50; }
.rarity-RARE     { background: #2196f3; }
.rarity-EPIC     { background: #ab47bc; }
.rarity-ANCIENT  { background: #ff9800; }

.price-original {
    text-decoration: line-through;
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
}

.price-sale { color: #ffbf00; }

/* =====================
   SALE TAG
   ===================== */

.sale-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e53935;
    color: #fff;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* =====================
   STATUS BADGES
   ===================== */

.owned-badge, .active-badge {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 10px;
    width: fit-content;
    line-height: 1;
}

.owned-badge {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.active-badge {
    background: rgba(255, 191, 0, 0.12);
    color: #ffbf00;
    border: 1px solid rgba(255, 191, 0, 0.3);
}

/* =====================
   ACTION BUTTONS
   ===================== */

.skin-buy-btn {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    background: #ffbf00;
    color: #0e0e0e;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    height: auto;
    line-height: 1;
}

.skin-buy-btn:hover {
    background: #ffd54f;
    box-shadow: 0 2px 16px rgba(255, 191, 0, 0.4);
}

.skin-activate-btn {
    width: 100%;
    padding: 8px 0;
    border: 1px solid rgba(255, 191, 0, 0.3);
    border-radius: 8px;
    background: transparent;
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    height: auto;
    line-height: 1;
}

.skin-activate-btn:hover {
    background: rgba(255, 191, 0, 0.1);
    border-color: rgba(255, 191, 0, 0.6);
}

/* =====================
   PURCHASE MODAL
   ===================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

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

.modal-card {
    background: #1a1a1a;
    border: 1px solid rgba(255, 191, 0, 0.2);
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.modal-skin-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.modal-skin-name {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 18px;
    color: #fff;
    font-weight: bold;
}

.modal-cost {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 20px;
    color: #ffbf00;
    font-weight: bold;
}

.modal-cost i { font-size: 20px; }

.modal-error {
    color: #e53935;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 13px;
    min-height: 18px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.modal-confirm-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    background: #ffbf00;
    color: #0e0e0e;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background 0.18s;
    height: auto;
}

.modal-confirm-btn:hover { background: #ffd54f; }

.modal-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-cancel-btn {
    flex: 1;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background 0.18s;
    height: auto;
}

.modal-cancel-btn:hover { background: rgba(255, 255, 255, 0.06); }

/* =====================
   LOAD MORE BUTTON
   ===================== */

.load-more-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 10px 0 20px;
}

.load-more-btn {
    padding: 10px 32px;
    border: 2px solid rgba(255, 191, 0, 0.3);
    border-radius: 10px;
    background: transparent;
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
    height: auto;
}

.load-more-btn:hover {
    background: rgba(255, 191, 0, 0.08);
    border-color: rgba(255, 191, 0, 0.5);
    box-shadow: 0 2px 12px rgba(255, 191, 0, 0.15);
}

/* =====================
   LOADING STATE
   ===================== */

.store-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 16px;
    padding: 80px 20px;
}

/* =====================
   MOBILE FILTER BAR
   ===================== */

.store-filter-mobile {
    display: none;
}

/* =====================
   MOBILE STYLES
   ===================== */

@media only screen and ((max-width: 767px) or (hover: none)) {

    /* Hide filter from the cramped bottom action bar */
    .action-bar .search-bar {
        display: none;
    }

    /* Show mobile filter bar fixed above action-bar */
    .store-filter-mobile {
        display: flex;
        width: 100%;
        background: rgba(8, 8, 8, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 191, 0, 0.06);
        border-bottom: none;
        padding: 10px 14px;
        box-sizing: border-box;
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        z-index: 999;
    }

    .store-filter-form-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .store-mobile-bottom {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .store-mobile-bottom .store-currency-chip {
        flex-shrink: 0;
    }

    .mobile-search-group {
        flex: 1;
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .mobile-search-input {
        width: 100%;
        padding: 8px 38px 8px 14px;
        border-radius: 20px;
        border: 1px solid rgba(255, 191, 0, 0.3);
        background: rgba(255, 255, 255, 0.04);
        color: #f0ece6;
        font-family: 'HwyGothic', Arial, sans-serif;
        font-size: 0.9rem;
        outline: none;
        box-sizing: border-box;
        transition: border-color 0.18s ease, box-shadow 0.18s ease;
    }

    .mobile-search-input:focus {
        border-color: rgba(255, 191, 0, 0.55);
        box-shadow: 0 0 8px rgba(255, 191, 0, 0.15);
    }

    .mobile-search-btn {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        background: transparent;
        border: none;
        color: #ffbf00;
        cursor: pointer;
        padding: 0 12px;
        font-size: 0.9rem;
        height: auto;
        font-weight: normal;
        border-radius: 0 20px 20px 0;
        transition: color 0.18s ease;
    }

    .mobile-search-btn:hover {
        color: #ffd966;
        transform: none;
        box-shadow: none;
        background: transparent;
    }

    /* Mobile skin grids */
    .skin-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px 14px 180px;
    }

    .skin-grid-container {
        padding-bottom: 180px;
    }

    .skin-section-grid {
        padding: 0 14px;
        gap: 10px;
    }

    .skin-section-grid.grid-wide {
        grid-template-columns: 1fr;
    }

    .skin-section-grid.grid-portrait {
        grid-template-columns: repeat(3, 1fr);
    }

    .skin-section-grid.grid-square {
        grid-template-columns: repeat(2, 1fr);
    }

    .skin-type-header {
        padding: 0 14px;
    }

    .modal-card {
        padding: 22px 20px;
    }
}
