/*
 * nova-market.css — the market (market.tpl, __feeds_product.tpl, ajax.market_catalog.tpl)
 * and the product page (_product_page.tpl). Light and night mode, phones.
 */

.ele_market_page,
.ele_product_page,
.ele_mcard_col {
    --mk-accent: #2563EB;
    --mk-accent-hover: #1D4ED8;
    --mk-accent-ink: #ffffff;
    --mk-accent-soft: rgba(37, 99, 235, 0.1);
    --mk-surface: var(--ele-gray-surface, #ffffff);
    --mk-input: var(--ele-gray-input, #e2e4e8);
    --mk-input-hover: var(--ele-gray-input-focus, #d8dce1);
    --mk-border: var(--ele-gray-border, #dcdfe3);
    --mk-text: #111827;
    --mk-muted: #6b7280;
    --mk-stage: #f1f3f5;
    --mk-promo-bg: linear-gradient(100deg, #fffaf0 0%, #ffffff 70%);
    --mk-promo-border: #f2d792;
    --mk-badge-bg: #fde68a;
    --mk-badge-ink: #92400e;
    --mk-green: #16a34a;
    --mk-red: #dc2626;
    --mk-amber: #d97706;
    --mk-heart: #ef4444;
    --mk-radius: 16px;
}
body.night-mode .ele_market_page,
body.night-mode .ele_product_page,
body.night-mode .ele_mcard_col {
    --mk-accent: #22D3EE;
    --mk-accent-hover: #67e8f9;
    --mk-accent-ink: #04212a;
    --mk-accent-soft: rgba(34, 211, 238, 0.12);
    --mk-text: #f3f4f6;
    --mk-muted: #9ca3af;
    --mk-stage: #161616;
    --mk-promo-bg: linear-gradient(100deg, #262115 0%, #1e1e1e 75%);
    --mk-promo-border: rgba(234, 179, 8, 0.32);
    --mk-badge-bg: #f59e0b;
    --mk-badge-ink: #1f1300;
    --mk-green: #4ade80;
    --mk-red: #f87171;
    --mk-amber: #fbbf24;
}


/* ------------------------------- */
/* Buttons */
/* ------------------------------- */

.ele_mk_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    background: var(--mk-surface);
    color: var(--mk-text) !important;
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.ele_mk_btn:hover {
    background: var(--mk-input);
}
.ele_mk_btn:active {
    transform: scale(0.97);
}
.ele_mk_btn:focus {
    outline: none;
}
.ele_mk_btn:focus-visible {
    box-shadow: 0 0 0 3px var(--mk-accent-soft);
}
.ele_mk_btn svg {
    flex: none;
}
.ele_mk_btn_icon {
    width: 40px;
    padding: 0;
}
.ele_mk_btn_primary {
    border-color: transparent;
    background: var(--mk-accent);
    color: var(--mk-accent-ink) !important;
}
.ele_mk_btn_primary:hover {
    background: var(--mk-accent-hover);
}


/* ------------------------------- */
/* Market: head, search, sort, chips */
/* ------------------------------- */

.ele_mk_head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.ele_mk_title {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--mk-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.ele_mk_back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: -4px;
    border-radius: 10px;
    color: var(--mk-text) !important;
}
.ele_mk_back:hover {
    background: var(--mk-input);
}
.ele_mk_head_actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ele_mk_bar {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.ele_mk_search {
    position: relative;
    flex: 1;
    min-width: 0;
    margin: 0;
}
.ele_mk_search svg {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--mk-muted);
    pointer-events: none;
}
.ele_mk_search input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--mk-border);
    border-radius: 14px;
    background: var(--mk-surface);
    color: var(--mk-text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}
.ele_mk_search input::placeholder {
    color: var(--mk-muted);
}
.ele_mk_search input:focus {
    border-color: var(--mk-accent);
    box-shadow: 0 0 0 3px var(--mk-accent-soft);
}

.ele_mk_sort {
    display: flex;
    flex: none;
    align-items: center;
    gap: 2px;
    height: 50px;
    padding: 5px;
    border: 1px solid var(--mk-border);
    border-radius: 14px;
    background: var(--mk-surface);
}
.ele_mk_sort > button,
.ele_mk_sort_near {
    height: 100%;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--mk-muted);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.ele_mk_sort > button:hover,
.ele_mk_sort_near:hover {
    color: var(--mk-text);
}
.ele_mk_sort > button.active {
    background: var(--mk-input);
    color: var(--mk-text);
}
.ele_mk_sort_near.active {
    color: var(--mk-accent);
}
.ele_mk_sort > button:focus,
.ele_mk_sort_near:focus {
    outline: none;
}
.ele_mk_sort .dropdown {
    height: 100%;
}
.ele_mk_sort_near {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
}
.ele_mk_near_menu {
    width: 260px;
}

.ele_mk_chips {
    margin-bottom: 22px;
}
/* one line that scrolls sideways (wheel and drag on desktop: ele-market.js); the edge that has more
   chips behind it fades out */
.ele_mk_chips_row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ele_mk_chips_row::-webkit-scrollbar {
    display: none;
}
.ele_mk_chips_row.has-more-right {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}
.ele_mk_chips_row.has-more-left {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px);
    mask-image: linear-gradient(90deg, transparent, #000 56px);
}
.ele_mk_chips_row.has-more-left.has-more-right {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
}
.ele_mk_chips_row.is-dragging {
    cursor: grabbing;
    user-select: none;
}
.ele_mk_chips_row.is-dragging .ele_mk_chip {
    pointer-events: none;
}
.ele_mk_chips_row + .ele_mk_chips_row {
    margin-top: 10px;
}
.ele_mk_chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--mk-border);
    border-radius: 999px;
    background: var(--mk-surface);
    color: var(--mk-text) !important;
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.ele_mk_chip span {
    color: var(--mk-muted);
    font-size: 12px;
    font-weight: 600;
}
.ele_mk_chip:hover {
    background: var(--mk-input);
}
.ele_mk_chip.active {
    border-color: var(--mk-accent);
    background: var(--mk-accent-soft);
    color: var(--mk-accent) !important;
}
.ele_mk_chip.active span {
    color: inherit;
    opacity: 0.75;
}
/* sub-categories: a size smaller */
.ele_mk_chips_row.is-sub .ele_mk_chip {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}


/* ------------------------------- */
/* Market: sections, promoted, grid */
/* ------------------------------- */

.ele_mk_section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--mk-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 800;
}
.ele_mk_section_count {
    color: var(--mk-muted);
    font-size: 13px;
    font-weight: 600;
}
.ele_mk_badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--mk-badge-bg);
    color: var(--mk-badge-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ele_mk_promo_list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.ele_mcard_promo {
    display: flex;
    min-width: 0;
    height: 172px;
    overflow: hidden;
    border: 1px solid var(--mk-promo-border);
    border-radius: var(--mk-radius);
    background: var(--mk-promo-bg);
}
.ele_mcard_promo_img {
    position: relative;
    flex: 0 0 38%;
    overflow: hidden;
    background: var(--mk-input);
}
.ele_mcard_promo_body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px;
    color: var(--mk-text) !important;
    text-decoration: none !important;
}
.ele_mcard_promo .ele_mcard_price {
    font-size: 24px;
}
.ele_mcard_promo .ele_mcard_name {
    margin-top: 4px;
    font-size: 16px;
}
.ele_mcard_promo .ele_mcard_meta {
    margin-top: 4px;
}
.ele_mcard_seller {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-top: auto;
    color: var(--mk-text);
    font-size: 13px;
    font-weight: 600;
}
.ele_mcard_seller img {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.ele_mcard_seller span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* the grid takes the cards out of their bootstrap columns (the same card sits in .row lists elsewhere) */
.ele_mk_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    transition: opacity 0.2s ease;
}
.ele_mk_grid.is-loading {
    opacity: 0.5;
}
.ele_mk_grid > .ele_mcard_col {
    flex: none;
    width: auto;
    max-width: none;
    padding: 0;
}
.ele_mk_grid > .col-12,
.ele_mk_more_wrap {
    grid-column: 1 / -1;
    max-width: none;
    padding: 0;
}
.ele_mk_more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    margin-top: 4px;
    border: 1px solid var(--mk-border);
    border-radius: 14px;
    background: var(--mk-surface);
    color: var(--mk-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.ele_mk_more:hover {
    background: var(--mk-input);
}
.ele_mk_more:focus {
    outline: none;
}

/* a card: the picture (4:3) with the heart, the price, the name, "where · condition" */
.ele_mcard_col {
    margin-bottom: 0;
}
.row > .ele_mcard_col {
    margin-bottom: 16px;
}
.ele_mcard {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius);
    background: var(--mk-surface);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.ele_mcard:hover {
    border-color: var(--mk-input-hover);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
body.night-mode .ele_mcard:hover {
    border-color: #444;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.ele_mcard_img {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--mk-input);
}
.ele_mcard_img img,
.ele_mcard_promo_img img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.ele_mcard:hover .ele_mcard_img img,
.ele_mcard_promo:hover .ele_mcard_promo_img img {
    transform: scale(1.03);
}
.ele_mcard_noimg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    color: var(--mk-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}
.ele_mcard_noimg span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_mcard_count,
.ele_mcard_flag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 7px;
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.ele_mcard_flag {
    background: var(--mk-red);
}
.ele_mcard.is-sold .ele_mcard_img img {
    filter: grayscale(0.7);
    opacity: 0.75;
}
.ele_mcard_fav {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: transform 0.15s ease, background-color 0.18s ease;
}
.ele_mcard_fav:hover {
    background: rgba(0, 0, 0, 0.7);
}
.ele_mcard_fav:active {
    transform: scale(0.9);
}
.ele_mcard_fav:focus {
    outline: none;
}
.ele_mcard_fav.is-saved svg path,
.ele_product_fav.is-saved svg path {
    fill: var(--mk-heart);
    stroke: var(--mk-heart);
}
.ele_mcard_body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 12px 14px 14px;
    color: var(--mk-text) !important;
    text-decoration: none !important;
}
.ele_mcard_price {
    overflow: hidden;
    color: var(--mk-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_mcard_name {
    overflow: hidden;
    color: var(--mk-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_mcard_meta {
    overflow: hidden;
    color: var(--mk-muted);
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_mcard_locked {
    display: block;
    padding: 16px;
}


/* ------------------------------- */
/* Product page */
/* ------------------------------- */

/* the page sits in .post (the post handlers need it): none of the post card (night mode paints .post
   with !important, hence body.night-mode here; desktop makes it a block of its own, below) */
.post.ele_product,
body.night-mode .post.ele_product {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ele_product_crumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-bottom: 14px;
    overflow: hidden;
    color: var(--mk-muted);
    font-size: 13px;
    white-space: nowrap;
}
.ele_product_crumbs a {
    flex: none;
    color: var(--mk-muted) !important;
}
.ele_product_crumbs a:hover {
    color: var(--mk-accent) !important;
    text-decoration: none;
}
.ele_product_crumbs_sep {
    flex: none;
    opacity: 0.6;
}
.ele_product_crumbs_here {
    min-width: 0;
    overflow: hidden;
    color: var(--mk-text);
    text-overflow: ellipsis;
}

.ele_product_layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.ele_product_main {
    flex: 1;
    min-width: 0;
}
.ele_product_side {
    position: sticky;
    top: 84px;
    flex: 0 0 360px;
    min-width: 0;
}

.ele_product_card {
    padding: 18px 20px;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius);
    background: var(--mk-surface);
    color: var(--mk-text);
}
.ele_product_main > .ele_product_card,
.ele_product_side > .ele_product_card + .ele_product_card {
    margin-top: 16px;
}
.ele_product_card_title {
    margin: 0 0 12px;
    color: var(--mk-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 17px;
    font-weight: 800;
}
.ele_product_card_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.ele_product_card_head .ele_product_card_title {
    margin: 0;
}
.ele_product_card_head a {
    color: var(--mk-accent) !important;
    font-size: 13px;
    font-weight: 700;
}

/* gallery: one photo at a time (scroll-snap, so a swipe works on phones), arrows, the counter, thumbnails */
.ele_product_stage {
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 72vh;
    overflow: hidden;
    border-radius: var(--mk-radius);
    background: var(--mk-stage);
}
.ele_product_slides {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ele_product_slides::-webkit-scrollbar {
    display: none;
}
.ele_product_slide {
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    justify-content: center;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    cursor: zoom-in;
}
.ele_product_slide img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}
.ele_product_noimg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    color: var(--mk-muted);
    font-size: 13px;
    font-weight: 600;
}
.ele_product_nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    opacity: 0;
    transform: translateY(-50%);
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: opacity 0.18s ease, background-color 0.18s ease;
}
.ele_product_nav.is-prev {
    left: 14px;
}
.ele_product_nav.is-next {
    right: 14px;
}
.ele_product_stage:hover .ele_product_nav {
    opacity: 1;
}
.ele_product_stage:hover .ele_product_nav.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.ele_product_nav:hover {
    background: rgba(0, 0, 0, 0.72);
}
.ele_product_nav:focus {
    outline: none;
}
.ele_product_counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}
.ele_product_thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.ele_product_thumbs::-webkit-scrollbar {
    display: none;
}
.ele_product_thumb {
    flex: 0 0 104px;
    height: 78px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--mk-input);
    opacity: 0.65;
    cursor: pointer;
    transition: opacity 0.18s ease, border-color 0.18s ease;
}
.ele_product_thumb:hover {
    opacity: 1;
}
.ele_product_thumb.active {
    border-color: var(--mk-accent);
    opacity: 1;
}
.ele_product_thumb:focus {
    outline: none;
}
.ele_product_thumb img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* description and details */
.ele_product_text {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
}
.ele_product_text .post-text {
    padding: 0 !important;
    color: var(--mk-text);
    font-size: 15px;
}
.ele_product_specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 32px;
    margin: 0;
}
.ele_product_specs > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 11px 0;
    border-top: 1px solid var(--mk-border);
}
.ele_product_specs dt {
    flex: none;
    color: var(--mk-muted);
    font-size: 13px;
    font-weight: 500;
}
.ele_product_specs dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--mk-text);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}
.ele_product_specs dd a {
    color: var(--mk-accent) !important;
}

/* comments in their card (the post footer of the core) */
.ele_product_comments.post-footer {
    padding: 18px 20px !important;
    border-top: 1px solid var(--mk-border) !important;
}
.ele_product_comments .post-comments {
    padding: 0 !important;
}

/* price card */
.ele_product_info_head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.ele_product_name {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--mk-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
}
.ele_product_info_head .ele_post_hdr_menu {
    position: static !important;
    flex: none;
    margin: -4px -8px 0 0;
}
.ele_product_info_head .ele_post_hdr_menu .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--mk-muted);
    cursor: pointer;
}
.ele_product_info_head .ele_post_hdr_menu .dropdown-toggle:hover {
    background: var(--mk-input);
    color: var(--mk-text);
}
.ele_product_price {
    margin-top: 6px;
    color: var(--mk-text);
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
}
.ele_product_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.ele_product_tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    height: 26px;
    padding: 0 10px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--mk-input);
    color: var(--mk-text) !important;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: none !important;
}
a.ele_product_tag:hover {
    background: var(--mk-input-hover);
}
.ele_product_stock {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
}
.ele_product_stock::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}
.ele_product_stock.is-in {
    color: var(--mk-green);
}
.ele_product_stock.is-out {
    color: var(--mk-amber);
}
.ele_product_stock.is-sold {
    color: var(--mk-red);
}
.ele_product_actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}
.ele_product_actions .ele_mk_btn {
    width: 100%;
}
.ele_product_cta {
    height: 48px;
    font-size: 15px;
}
.ele_product_fav {
    height: 44px;
    border-color: transparent;
    background: var(--mk-input);
}
.ele_product_fav:hover {
    background: var(--mk-input-hover);
}

/* seller */
.ele_product_seller {
    padding: 14px 16px;
}
.ele_product_seller_main {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--mk-text) !important;
    text-decoration: none !important;
}
.ele_product_seller_pic img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.ele_product_seller_text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ele_product_seller_name {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
}
.ele_product_seller_name > span:first-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_product_seller_name .pro-badge {
    display: none;
}
.ele_product_seller_meta {
    overflow: hidden;
    color: var(--mk-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ele_product_seller_go {
    flex: none;
    color: var(--mk-muted);
}

/* similar */
.ele_product_similar {
    padding: 16px;
}
.ele_product_similar_list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 -8px -8px;
}
.ele_product_similar_item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 8px;
    border-radius: 12px;
    color: var(--mk-text) !important;
    text-decoration: none !important;
}
.ele_product_similar_item:hover {
    background: var(--mk-input);
}
.ele_product_similar_pic {
    display: flex;
    flex: 0 0 64px;
    align-items: center;
    justify-content: center;
    height: 48px;
    overflow: hidden;
    border-radius: 9px;
    background: var(--mk-input);
    color: var(--mk-muted);
}
.ele_product_similar_pic img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
.ele_product_similar_pic svg {
    width: 22px;
    height: 22px;
}
.ele_product_similar_text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ele_product_similar_name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ele_product_similar_price {
    color: var(--mk-accent);
    font-size: 13px;
    font-weight: 800;
}


/* ------------------------------- */
/* Desktop: the listing is one block (the theme paints .post as a card in night mode anyway) with room
   inside, so the breadcrumbs, the gallery and the cards keep off its edges; the cards inside take a
   slightly different tone */
/* ------------------------------- */

@media (min-width: 992px) {
    .ele_product_page {
        --mk-inner: #f6f7f9;
    }
    body.night-mode .ele_product_page {
        --mk-inner: #1a1a1a;
    }
    body .ele_product_page .post.ele_product {
        padding: 22px 24px 24px !important;
        border: 1px solid var(--mk-border) !important;
        border-radius: 20px !important;
        background: var(--mk-surface) !important;
    }
    .ele_product_page .ele_product_card {
        background: var(--mk-inner);
    }
    .ele_product_crumbs {
        margin-bottom: 16px;
    }
    .ele_product_layout {
        gap: 24px;
    }
    /* the sticky side column stays inside the block */
    .ele_product_side {
        top: 80px;
    }
}


/* ------------------------------- */
/* Tablets: the product page in one column */
/* ------------------------------- */

@media (max-width: 991px) {
    /* gallery, price card, seller, description, comments, similar */
    .ele_product_layout {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .ele_product_main,
    .ele_product_side {
        display: contents;
    }
    .ele_product_gallery {
        order: 1;
    }
    .ele_product_info {
        order: 2;
    }
    .ele_product_seller {
        order: 3;
    }
    .ele_product_desc {
        order: 4;
    }
    .ele_product_comments {
        order: 5;
    }
    .ele_product_similar {
        order: 6;
    }
    .ele_product_layout > * > .ele_product_card,
    .ele_product_main > .ele_product_card,
    .ele_product_side > .ele_product_card + .ele_product_card {
        margin-top: 12px;
    }
}


/* ------------------------------- */
/* Phones */
/* ------------------------------- */

@media (max-width: 668px) {
    .ele_market_page.mt20,
    .ele_product_page.mt20 {
        margin-top: 12px !important;
    }

    /* market head: the title and icon buttons */
    .ele_mk_head {
        margin-bottom: 12px;
    }
    .ele_mk_title {
        font-size: 24px;
    }
    .ele_mk_head .ele_mk_btn {
        width: 40px;
        padding: 0;
    }
    .ele_mk_head .ele_mk_btn > span {
        display: none;
    }

    /* the search, then the sort as a segmented control across the screen */
    .ele_mk_bar {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }
    .ele_mk_search input {
        height: 46px;
        border-radius: 12px;
        font-size: 16px; /* no zoom on focus in iOS */
    }
    .ele_mk_sort {
        height: 42px;
        padding: 4px;
        border-radius: 12px;
    }
    .ele_mk_sort > button {
        flex: 1;
        padding: 0 8px;
        font-size: 13px;
    }

    /* chips: the line reaches the screen edges */
    .ele_mk_chips {
        margin: 0 calc(50% - 50vw) 18px;
    }
    .ele_mk_chips_row {
        padding: 0 12px;
    }
    .ele_mk_chips_row + .ele_mk_chips_row {
        margin-top: 8px;
    }
    .ele_mk_chip {
        flex: none;
        height: 34px;
        padding: 0 12px;
        font-size: 13px;
    }

    /* promoted: a strip of wide cards that scrolls sideways */
    .ele_mk_promo_list {
        display: flex;
        gap: 10px;
        margin: 0 calc(50% - 50vw) 22px;
        padding: 0 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 12px;
        scrollbar-width: none;
    }
    .ele_mk_promo_list::-webkit-scrollbar {
        display: none;
    }
    .ele_mcard_promo {
        flex: 0 0 88%;
        height: 136px;
        scroll-snap-align: start;
    }
    .ele_mk_promo_list > .ele_mcard_promo:only-child {
        flex-basis: 100%;
    }
    .ele_mcard_promo_img {
        flex-basis: 36%;
    }
    .ele_mcard_promo_body {
        padding: 12px 14px;
    }
    .ele_mcard_promo .ele_mcard_price {
        font-size: 19px;
    }
    .ele_mcard_promo .ele_mcard_name {
        margin-top: 2px;
        font-size: 14px;
    }
    .ele_mcard_promo .ele_mcard_meta {
        margin-top: 2px;
    }

    /* two cards a row */
    .ele_mk_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .ele_mcard {
        border-radius: 14px;
    }
    .ele_mcard_body {
        gap: 2px;
        padding: 9px 10px 11px;
    }
    .ele_mcard_price {
        font-size: 16px;
    }
    .ele_mcard_name {
        font-size: 13px;
    }
    .ele_mcard_meta {
        font-size: 11px;
    }
    .ele_mcard_fav {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
    .row > .ele_mcard_col {
        margin-bottom: 10px;
        padding-right: 5px;
        padding-left: 5px;
    }

    /* product page: the gallery across the screen, the cards to the edges like the other phone blocks */
    .ele_product_crumbs {
        margin-bottom: 10px;
        font-size: 12px;
    }
    .ele_product_gallery {
        margin: 0 calc(50% - 50vw);
    }
    .ele_product_stage {
        max-height: none;
        border-radius: 0;
    }
    .ele_product_thumbs,
    .ele_product_nav {
        display: none;
    }
    .ele_product_layout .ele_product_card {
        margin-right: calc(50% - 50vw);
        margin-left: calc(50% - 50vw);
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }
    .ele_product_layout > * > .ele_product_card,
    .ele_product_main > .ele_product_card,
    .ele_product_side > .ele_product_card + .ele_product_card,
    .ele_product_info {
        margin-top: 8px;
    }
    .ele_product_card {
        padding: 16px;
    }
    .ele_product_comments.post-footer {
        padding: 16px !important;
    }
    .ele_product_name {
        font-size: 19px;
    }
    .ele_product_price {
        font-size: 26px;
    }
    /* write to the seller and the heart side by side */
    .ele_product_actions {
        flex-direction: row;
    }
    .ele_product_actions .ele_product_cta {
        flex: 1;
        width: auto;
    }
    .ele_product_actions .ele_product_fav.js_market-fav {
        flex: 0 0 48px;
        width: 48px;
        height: 48px;
        padding: 0;
    }
    .ele_product_actions .ele_product_fav.js_market-fav span {
        display: none;
    }
    .ele_product_specs {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ele_mcard_img img,
    .ele_mcard_promo_img img,
    .ele_mcard,
    .ele_product_nav {
        transition: none;
    }
}
