/* ==========================================================================
   PKMN Shop — v1.0.11
   ========================================================================== */

.pkmn-shop-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.pkmn-filter-bar {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* -- Top row: search + count + sort + expand chevron -- */

.pkmn-filter-bar__top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pkmn-filter-bar__search {
    position: relative;
    flex: 1;
    max-width: 280px;
}

.pkmn-filter-bar__search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.pkmn-filter-bar .pkmn-filter-search {
    width: 100%;
    padding: 8px 10px 8px 32px;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    background: #f8f9fa;
    color: #333;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.pkmn-filter-bar .pkmn-filter-search:focus {
    outline: none;
    border-color: #1e8496;
    background: #fff;
}

.pkmn-filter-count {
    flex: 1;
    color: #999;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-align: right;
}

.pkmn-filter-bar__right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* -- Sort icon + dropdown -- */

.pkmn-filter-bar__sort-wrapper {
    position: relative;
}

.pkmn-filter-bar__sort-btn,
.pkmn-filter-bar__expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    background: #f8f9fa;
    color: #555;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
}

.pkmn-filter-bar__sort-btn:hover,
.pkmn-filter-bar__expand-btn:hover {
    border-color: #1e8496;
    color: #1e8496;
}

.pkmn-filter-bar__expand-arrow {
    transition: transform 0.2s;
    font-size: 12px;
}

.pkmn-filter-bar__expand-btn--open .pkmn-filter-bar__expand-arrow {
    transform: rotate(180deg);
}

.pkmn-sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    padding: 4px 0;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid #eee;
}

.pkmn-sort-dropdown__item {
    padding: 8px 14px;
    border: none;
    background: none;
    color: #555;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}

.pkmn-sort-dropdown__item:hover {
    background: #f5f5f5;
}

.pkmn-sort-dropdown__item--active {
    color: #1e8496;
    font-weight: 600;
}

/* ==========================================================================
   Big accordion body (all filters)
   ========================================================================== */

.pkmn-filter-bar__body {
    display: none;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.pkmn-filter-bar__body--open {
    display: block;
}

/* -- Filter sections inside body -- */

.pkmn-filter-section {
    margin-bottom: 12px;
}

.pkmn-filter-section__title {
    color: #1e8496;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

/* ==========================================================================
   Type icons (no text, no pill)
   ========================================================================== */

.pkmn-filter-bar__types {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pkmn-type-icon-toggle {
    display: inline-flex;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.pkmn-type-icon-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pkmn-type-icon-toggle img {
    display: block;
    width: 24px;
    height: 24px;
    opacity: 0.45;
    transition: all 0.15s;
    filter: grayscale(30%);
}

.pkmn-type-icon-toggle img:hover {
    opacity: 0.75;
    filter: none;
}

.pkmn-type-icon-toggle__input:checked + img {
    opacity: 1;
    filter: none;
    transform: scale(1.15);
}

/* ==========================================================================
   Chips (pills)
   ========================================================================== */

.pkmn-filter-bar__chips {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pkmn-filter-bar__separator {
    width: 1px;
    height: 20px;
    background: #e0e0e0;
    margin: 0 4px;
    flex-shrink: 0;
}

.pkmn-chip {
    display: inline-flex;
    cursor: pointer;
    user-select: none;
}

.pkmn-chip__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pkmn-chip__body {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #f8f9fa;
    color: #555;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.pkmn-chip__body img {
    display: block;
    flex-shrink: 0;
}

.pkmn-chip__body:hover {
    border-color: #1e8496;
    background: #e8f4f6;
}

.pkmn-chip__input:checked + .pkmn-chip__body {
    background: #1e8496;
    border-color: #1e8496;
    color: #fff;
}

.pkmn-chip__input:checked + .pkmn-chip__body img {
    filter: brightness(0) invert(1);
}

/* Size chip */
.pkmn-chip--size .pkmn-chip__body--size {
    padding: 4px 8px;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Footer: reset link
   ========================================================================== */

.pkmn-filter-bar__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.pkmn-filter-reset-link {
    border: none;
    background: none;
    color: #999;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.15s;
}

.pkmn-filter-reset-link:hover {
    color: #e74c3c;
}

/* ==========================================================================
   Content
   ========================================================================== */

.pkmn-shop__content {
    position: relative;
}

/* ==========================================================================
   Product Cards Grid
   ========================================================================== */

.pkmn-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.pkmn-product-item {
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.pkmn-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* -- Media area -- */

.pkmn-product-item__media {
    position: relative;
    height: 120px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px 7px 0 0;
}

.pkmn-product-item__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    border-radius: 7px 7px 0 0;
}

.pkmn-product-item__sprite {
    position: relative;
    z-index: 3;
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
    image-rendering: pixelated;
    margin-bottom: -75px;
}

/* -- Top-left badges (shiny, purified, size) -- */

.pkmn-product-item__badges {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pkmn-product-item__badge-icon {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.pkmn-product-item__size-badge {
    display: inline-block;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    letter-spacing: 0.3px;
}

/* -- Info area (two-column layout: left=name+event, right=icons+price) -- */

.pkmn-product-item__info {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 10px 10px;
    position: relative;
    z-index: 2;
}

/* Center vertically when only one line (no event, no price) */
.pkmn-product-item__info--center {
    align-items: center;
}

.pkmn-product-item__left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.pkmn-product-item__title {
    margin: 0;
    color: #222;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pkmn-product-item__event {
    color: #888;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.pkmn-product-item__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    gap: 2px;
}

.pkmn-product-item__icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pkmn-product-item__types {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pkmn-product-item__types img {
    display: block;
    width: 16px;
    height: 16px;
}

.pkmn-product-item__gender {
    width: 16px;
    height: 16px;
    display: block;
}

/* Price */
.pkmn-product-item__price {
    color: #111;
    font-size: 17px;
    font-weight: 800;
    white-space: nowrap;
}

.pkmn-product-item__price del {
    color: #ccc;
    font-weight: 400;
    font-size: 11px;
    margin-right: 4px;
}

.pkmn-product-item__price ins {
    color: #111;
    text-decoration: none;
    font-weight: 800;
}

/* ==========================================================================
   Legacy
   ========================================================================== */

.pkmn-icons-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-bottom: 10px;
}

.pkmn-icons-inline img {
    display: block;
    width: 22px;
    height: 22px;
}

.pkmn-icons-divider {
    width: 1px;
    height: 20px;
    margin: 0 6px;
    background: #eee;
    flex: 0 0 1px;
}

/* ==========================================================================
   No results / Loading
   ========================================================================== */

.pkmn-no-results {
    grid-column: 1 / -1;
    padding: 40px;
    color: #999;
    font-size: 15px;
    text-align: center;
}

.pkmn-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 7px;
}

.pkmn-loader--active {
    display: flex;
}

.pkmn-loader__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e8ea;
    border-top-color: #1e8496;
    border-radius: 50%;
    animation: pkmn-spin 0.7s linear infinite;
}

@keyframes pkmn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Load More
   ========================================================================== */

.pkmn-load-more-wrapper {
    padding: 24px 0;
    text-align: center;
}

.pkmn-load-more-btn {
    padding: 10px 28px;
    border: 2px solid #1e8496;
    border-radius: 7px;
    background: transparent;
    color: #1e8496;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pkmn-load-more-btn:hover {
    background: #1e8496;
    color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .pkmn-filter-bar__search {
        max-width: 100%;
        width: 100%;
    }

    .pkmn-filter-bar__top {
        flex-wrap: wrap;
    }

    .pkmn-products-grid {
        gap: 10px;
    }

    .pkmn-product-item__media {
        height: 100px;
    }

    .pkmn-product-item__sprite {
        max-width: 80px;
        max-height: 80px;
        margin-bottom: -55px;
    }

    .pkmn-product-item__title {
        font-size: 16px;
    }

    .pkmn-product-item__event {
        font-size: 12px;
    }

    .pkmn-product-item__price {
        font-size: 15px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .pkmn-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .pkmn-products-grid {
        grid-template-columns: repeat(var(--pkmn-columns, 4), 1fr);
    }

    .pkmn-product-item__media {
        height: 140px;
    }

    .pkmn-product-item__sprite {
        max-width: 110px;
        max-height: 110px;
        margin-bottom: -75px;
    }
}
