/* Familiar marketplace structure inspired by large multi-category marketplaces,
   while retaining Fixonic's own dark identity and repair-first visual language. */

.site-header {
    position: relative;
    top: auto;
}
.market-header-row {
    min-height: 78px;
    grid-template-columns: auto 82px minmax(320px, 1fr) auto;
    gap: 14px;
}
.market-category-row {
    justify-content: center;
    gap: clamp(15px, 2vw, 30px);
}
.market-home { padding-bottom: 72px; }

/* Homepage promotional banner */
.ebay-home-hero-wrap { padding-top: 22px; }
.ebay-home-hero {
    min-height: 342px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    overflow: hidden;
    border: 1px solid var(--fx-line);
    border-radius: 20px;
    background:
        radial-gradient(circle at 78% 30%, rgba(67,217,255,.14), transparent 22rem),
        linear-gradient(110deg, #152032 0%, #101722 56%, #091019 100%);
    box-shadow: 0 20px 55px rgba(0,0,0,.3);
}
.ebay-home-hero-copy {
    align-self: center;
    padding: clamp(38px, 5vw, 66px);
}
.hero-label {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--fx-lime);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ebay-home-hero-copy h1 {
    max-width: 650px;
    margin: 0 0 14px;
    color: var(--fx-text);
    font-size: clamp(2.65rem, 5vw, 5.1rem);
    line-height: .95;
    letter-spacing: -.06em;
}
.ebay-home-hero-copy p {
    max-width: 640px;
    margin: 0 0 24px;
    color: var(--fx-text-soft);
    font-size: 1rem;
    line-height: 1.62;
}
.ebay-home-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ebay-home-hero-art {
    position: relative;
    min-height: 342px;
    overflow: hidden;
    background:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px),
        radial-gradient(circle at 50% 48%, rgba(168,255,96,.1), transparent 36%);
    background-size: 26px 26px, 26px 26px, auto;
}
.ebay-home-hero-art::before {
    content: "";
    position: absolute;
    width: 310px;
    height: 310px;
    right: 12%;
    top: 16px;
    border: 1px solid rgba(67,217,255,.16);
    border-radius: 50%;
    box-shadow: inset 0 0 80px rgba(67,217,255,.05);
}
.hero-product {
    position: absolute;
    display: grid;
    place-content: center;
    text-align: center;
    border: 1px solid var(--fx-line-strong);
    color: var(--fx-text);
    background: linear-gradient(150deg, #1c2737, #0c121b);
    box-shadow: 0 22px 45px rgba(0,0,0,.34);
}
.hero-product span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.hero-product small { margin-top: 5px; color: var(--fx-muted); font-size: .55rem; letter-spacing: .1em; }
.hero-phone {
    width: 112px;
    height: 220px;
    left: 18%;
    top: 66px;
    border-radius: 24px;
    border-top-color: var(--fx-danger);
    transform: rotate(-8deg);
}
.hero-console {
    width: 175px;
    height: 215px;
    right: 15%;
    top: 43px;
    border-radius: 19px;
    border-top-color: var(--fx-cyan);
    transform: rotate(7deg);
}
.hero-part {
    width: 105px;
    height: 105px;
    left: 43%;
    bottom: 27px;
    border-radius: 50%;
    color: #071016;
    border-color: var(--fx-lime);
    background: linear-gradient(145deg, var(--fx-lime), var(--fx-cyan));
}
.hero-part small { color: rgba(7,16,22,.65); }
.hero-price-tag {
    position: absolute;
    right: 8%;
    bottom: 28px;
    min-width: 142px;
    padding: 12px 15px;
    border: 1px solid rgba(168,255,96,.35);
    border-radius: 11px;
    background: rgba(8,13,20,.9);
    box-shadow: 0 15px 32px rgba(0,0,0,.32);
}
.hero-price-tag small,
.hero-price-tag strong { display: block; }
.hero-price-tag small { color: var(--fx-muted); font-size: .62rem; }
.hero-price-tag strong { margin-top: 3px; color: var(--fx-lime); font-size: 1.05rem; }

/* eBay-like category row */
.ebay-category-section { padding-top: 42px; }
.ebay-section-heading h2 {
    margin: 0;
    color: var(--fx-text);
    font-size: 1.55rem;
    letter-spacing: -.03em;
}
.ebay-section-heading p { margin-top: 4px; }
.ebay-category-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 18px;
}
.ebay-category-row > a {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 10px;
    color: var(--fx-text-soft);
    text-align: center;
}
.category-icon {
    width: min(150px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid var(--fx-line);
    border-radius: 50%;
    color: var(--fx-text);
    background:
        radial-gradient(circle at 38% 30%, rgba(255,255,255,.08), transparent 25%),
        linear-gradient(145deg, #1b2635, #0c121b);
    box-shadow: inset 0 0 30px rgba(255,255,255,.015);
    font-family: "Space Grotesk", sans-serif;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .1em;
}
.ebay-category-row > a:hover .category-icon {
    border-color: rgba(67,217,255,.48);
    box-shadow: 0 14px 34px rgba(0,0,0,.3), 0 0 0 4px rgba(67,217,255,.04);
    transform: translateY(-3px);
}
.ebay-category-row > a:hover { color: var(--fx-cyan); }
.ebay-category-row strong { font-size: .82rem; }
.category-phone { border-bottom-color: var(--fx-danger); }
.category-console { border-bottom-color: var(--fx-cyan); }
.category-computing { border-bottom-color: var(--fx-blue); }
.category-donor { border-bottom-color: var(--fx-purple); }
.category-parts { border-bottom-color: var(--fx-lime); }
.category-tools { border-bottom-color: var(--fx-amber); }
.category-auctions {
    color: #071016;
    border-color: rgba(168,255,96,.5);
    background: linear-gradient(145deg, var(--fx-lime), var(--fx-cyan));
}

/* Horizontal shopping rails */
.ebay-market-rail-section { padding-top: 46px; }
.ebay-listing-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(198px, 1fr);
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--fx-line-strong) transparent;
    padding: 2px 2px 14px;
}
.ebay-listing-rail .listing-card {
    min-width: 0;
    scroll-snap-align: start;
}
.ebay-listing-rail .listing-card-media { aspect-ratio: 1; }
.ebay-listing-rail .listing-card-body { padding: 13px 2px 0; }
.ebay-listing-rail .listing-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.ebay-listing-rail .listing-card:hover { box-shadow: none; transform: none; }
.ebay-listing-rail .listing-card-media {
    overflow: hidden;
    border: 1px solid var(--fx-line);
    border-radius: 13px;
    background: #0c121b;
}
.ebay-listing-rail .listing-card:hover .listing-card-media {
    border-color: rgba(67,217,255,.42);
    box-shadow: 0 15px 36px rgba(0,0,0,.28);
}
.ebay-listing-rail .listing-card-footer { border-top: 0; padding-top: 0; }

/* Full-width seller banner */
.ebay-wide-promo {
    min-height: 236px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .75fr);
    align-items: center;
    gap: 42px;
    margin-top: 52px;
    padding: clamp(30px, 5vw, 54px);
    border: 1px solid rgba(168,255,96,.2);
    border-radius: 18px;
    background:
        radial-gradient(circle at 82% 20%, rgba(168,255,96,.12), transparent 25rem),
        linear-gradient(120deg, #172319, #0c1511 60%, #09100d);
}
.ebay-wide-promo > div:first-child > span {
    color: var(--fx-lime);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ebay-wide-promo h2 {
    margin: 7px 0 9px;
    color: var(--fx-text);
    font-size: clamp(1.8rem, 3vw, 3rem);
    letter-spacing: -.045em;
}
.ebay-wide-promo p { max-width: 720px; margin-bottom: 18px; color: var(--fx-text-soft); }
.ebay-wide-promo-stats {
    display: grid;
    gap: 10px;
}
.ebay-wide-promo-stats span {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--fx-line);
    border-radius: 10px;
    color: var(--fx-text-soft);
    background: rgba(255,255,255,.025);
    font-size: .8rem;
}
.ebay-wide-promo-stats strong { color: var(--fx-lime); font-size: .72rem; }

/* Three lower promotional cards */
.ebay-three-promos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 52px;
}
.ebay-three-promos article {
    min-height: 205px;
    padding: 26px;
    border: 1px solid var(--fx-line);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(18,26,38,.95), rgba(9,14,21,.98));
}
.ebay-three-promos article:nth-child(2) { background: linear-gradient(145deg, rgba(24,29,20,.94), rgba(11,16,10,.98)); }
.ebay-three-promos article:nth-child(3) { background: linear-gradient(145deg, rgba(20,22,38,.95), rgba(10,12,23,.98)); }
.ebay-three-promos span { color: var(--fx-cyan); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ebay-three-promos article:nth-child(2) span { color: var(--fx-lime); }
.ebay-three-promos h3 { margin: 10px 0 8px; color: var(--fx-text); font-size: 1.25rem; line-height: 1.18; }
.ebay-three-promos p { color: var(--fx-muted); font-size: .84rem; line-height: 1.58; }
.ebay-three-promos a { display: inline-block; margin-top: 10px; color: var(--fx-cyan); font-size: .82rem; font-weight: 700; }
.ebay-three-promos a:hover { color: var(--fx-lime); }

.ebay-guide-band {
    margin-top: 56px;
    padding: 48px 0 58px;
    border-top: 1px solid var(--fx-line);
    border-bottom: 1px solid var(--fx-line);
    background: #0a0e15;
}
.ebay-guide-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 12px;
}

/* Search results remain familiar and dense */
.browse-layout {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
}
.filters-panel { border-radius: 10px; }
.listing-grid-results { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.listing-grid-results .listing-card { border-radius: 12px; }
.results-header,
.results-toolbar { min-height: 54px; padding: 10px 14px !important; }

/* Familiar item-page split */
.product-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr);
    gap: 42px;
    align-items: start;
}
.product-media { min-width: 0; }
.product-summary { min-width: 0; }
.purchase-panel { border-radius: 12px; }
.main-image { min-height: 560px; border-radius: 12px; }
.product-information { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); }
.content-card,
.disclosure-panel { border-radius: 12px; }

@media (max-width: 1160px) {
    .ebay-category-row { grid-template-columns: repeat(7, minmax(120px, 1fr)); overflow-x: auto; padding-bottom: 12px; }
    .category-icon { width: 118px; }
    .listing-grid-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-layout { grid-template-columns: minmax(0, 1fr) minmax(340px, .75fr); }
}

@media (max-width: 900px) {
    .site-header { position: relative; }
    .market-header-row { grid-template-columns: 1fr auto; }
    .ebay-home-hero { grid-template-columns: 1fr; }
    .ebay-home-hero-art { min-height: 300px; }
    .ebay-wide-promo { grid-template-columns: 1fr; gap: 24px; }
    .browse-layout { grid-template-columns: 1fr; }
    .listing-grid-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-layout,
    .product-information { grid-template-columns: 1fr; }
    .main-image { min-height: 440px; }
}

@media (max-width: 640px) {
    .ebay-home-hero-wrap { padding-top: 12px; }
    .ebay-home-hero { min-height: 0; border-radius: 15px; }
    .ebay-home-hero-copy { padding: 34px 22px 28px; }
    .ebay-home-hero-copy h1 { font-size: 3rem; }
    .ebay-home-hero-actions { display: grid; }
    .ebay-home-hero-actions .button { width: 100%; }
    .ebay-home-hero-art { min-height: 260px; }
    .ebay-home-hero-art::before { width: 230px; height: 230px; right: 10%; top: 10px; }
    .hero-phone { width: 78px; height: 158px; left: 15%; top: 47px; }
    .hero-console { width: 126px; height: 154px; right: 13%; top: 32px; }
    .hero-part { width: 78px; height: 78px; left: 43%; bottom: 22px; }
    .hero-price-tag { right: 5%; bottom: 16px; min-width: 112px; padding: 9px 11px; }
    .ebay-category-section { padding-top: 34px; }
    .ebay-category-row {
        grid-template-columns: repeat(7, 104px);
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: inline proximity;
        padding-bottom: 12px;
    }
    .ebay-category-row > a { scroll-snap-align: start; }
    .category-icon { width: 92px; }
    .ebay-market-rail-section { padding-top: 38px; }
    .ebay-listing-rail { grid-auto-columns: minmax(165px, 72vw); gap: 12px; }
    .ebay-wide-promo { margin-top: 40px; padding: 27px 22px; border-radius: 14px; }
    .ebay-wide-promo h2 { font-size: 2rem; }
    .ebay-three-promos { grid-template-columns: 1fr; margin-top: 40px; }
    .ebay-three-promos article { min-height: 0; }
    .ebay-guide-rail { grid-auto-columns: 84vw; }
    .listing-grid-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .main-image { min-height: 330px; }
    .purchase-panel { border-radius: 10px; }
}
