/* ── Finish Selector (shop product loop) ── */
.mtg-finish-selector {
    text-align: center;
    margin: 5px 0 8px;
}
.mtg-finish-select {
    width: auto;
    max-width: 100%;
    padding: 4px 10px 4px 8px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #333;
    transition: border-color .2s, box-shadow .2s;
    appearance: auto;
}
.mtg-finish-select:hover { border-color: #0073aa; }
.mtg-finish-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}
.mtg-finish-non-foil   { background: #f0f0f0; color: #555; }
.mtg-finish-foil        { background: #cfe2ff; color: #084298; }
.mtg-finish-etched-foil { background: #e2d9f3; color: #432874; }
/* ─────────────────────────────────────────── */

/* Search */
.mtg-search-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

#mtg-search {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Filters */
.mtg-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mtg-filters select,
.mtg-filters input {
    padding: 8px;
    font-size: 14px;
}

/* Results grid */
#mtg-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Card */
.mtg-card {
    border: 1px solid #ddd;
    background: #fff;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.mtg-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ── WooCommerce Shop: MTG card proportions (5:7 ratio) ── */
ul.products li.product .woocommerce-loop-product__link img,
ul.products li.product img.wp-post-image,
ul.products li.product img {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: contain;
    object-position: center;
    background: #111;
    border-radius: 8px;
}

ul.products li.product a img {
    height: auto;
}

/* Remove any hard-coded height on the thumbnail wrapper */
ul.products li.product .attachment-woocommerce_thumbnail,
ul.products li.product .size-woocommerce_thumbnail {
    height: auto !important;
    max-height: none !important;
}

.mtg-card h4 {
    margin: 8px 0 4px;
    font-size: 15px;
}

.mtg-type {
    font-size: 13px;
    color: #555;
}

.mtg-price {
    font-weight: bold;
    margin: 6px 0;
}

/* Buttons */
.mtg-add-deck {
    background: #6b21a8;
    color: #fff;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
}

.mtg-add-deck:hover {
    background: #581c87;
}