/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: Arial, "Amazon Ember", sans-serif;
    background: #EAEDED;
    color: #0F1111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #007185; text-decoration: none; }
a:hover { color: #C7511F; text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
    background: #131921;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    display: flex;
    align-items: center;
    max-width: 1500px;
    margin: 0 auto;
    padding: .4rem 1rem;
    gap: .5rem;
}

.navbar-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    padding: .4rem .6rem;
    border: 1px solid transparent;
    border-radius: 2px;
    white-space: nowrap;
}
.navbar-logo:hover { border-color: #fff; }

.logo-craft { color: #fff; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.logo-azon  { color: #FF9900; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.logo-server { color: #ccc; font-size: .7rem; line-height: 1.2; }

/* Search bar */
.navbar-search {
    flex: 1;
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
    max-width: 900px;
}

.search-cat-select {
    background: #f3f3f3;
    border: none;
    padding: 0 .5rem;
    font-size: .8rem;
    cursor: pointer;
    border-right: 1px solid #cdcdcd;
    min-width: 80px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 .8rem;
    font-size: .95rem;
    outline: none;
    color: #0F1111;
}

.search-btn {
    background: #FF9900;
    border: none;
    padding: 0 .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #131921;
    transition: background .15s;
}
.search-btn:hover { background: #e68a00; }

/* Navbar right links */
.navbar-right {
    display: flex;
    align-items: center;
    gap: .2rem;
}

.navbar-link {
    color: #fff;
    text-decoration: none;
    padding: .4rem .6rem;
    border: 1px solid transparent;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
}
.navbar-link:hover { border-color: #fff; color: #fff; text-decoration: none; }

.navbar-link-top  { font-size: .75rem; color: #ccc; }
.navbar-link-main { font-size: .9rem; font-weight: 700; }

.navbar-cart {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .2rem;
    padding: .4rem .6rem;
    border: 1px solid transparent;
    border-radius: 2px;
    position: relative;
}
.navbar-cart:hover { border-color: #fff; color: #fff; text-decoration: none; }

.cart-icon { position: relative; display: flex; align-items: center; }

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #FF9900;
    color: #131921;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cart-label { font-weight: 700; font-size: .9rem; }

/* Sub nav */
.subnav {
    background: #232f3e;
    display: flex;
    gap: 0;
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }

.subnav-link {
    color: #fff;
    text-decoration: none;
    padding: .5rem .75rem;
    font-size: .85rem;
    white-space: nowrap;
    border: 1px solid transparent;
    display: inline-block;
}
.subnav-link:hover { border-color: #fff; color: #fff; text-decoration: none; }

/* ── Main ─────────────────────────────────────────────────────────────────── */
.site-main {
    flex: 1;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

/* ── Hero Banner ──────────────────────────────────────────────────────────── */
.hero-banner {
    background: linear-gradient(135deg, #131921 0%, #232f3e 50%, #1a3a4a 100%);
    border-radius: 6px;
    padding: 3rem 2rem;
    margin-bottom: 1.5rem;
    color: #fff;
}
.hero-content h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.hero-content p   { color: #ccc; margin-bottom: 1.2rem; }

.hero-btn {
    display: inline-block;
    background: #FFD814;
    color: #0F1111;
    padding: .7rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none;
    margin-right: .5rem;
    transition: background .15s;
}
.hero-btn:hover { background: #F7CA00; text-decoration: none; color: #0F1111; }
.hero-btn-secondary { background: #FF9900; color: #131921; }
.hero-btn-secondary:hover { background: #e68a00; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section-block {
    background: #fff;
    border-radius: 4px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-header h2 { font-size: 1.25rem; }
.section-see-all    { font-size: .85rem; color: #007185; }

/* ── Product grid ─────────────────────────────────────────────────────────── */
.product-grid {
    display: grid;
    gap: 1rem;
}
.product-grid-6 { grid-template-columns: repeat(6, 1fr); }
.product-grid-4 { grid-template-columns: repeat(4, 1fr); }

.product-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: .8rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    transition: box-shadow .15s;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.15); text-decoration: none; color: inherit; }

.product-img-wrap {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7f7f7;
    border-radius: 4px;
}
.product-img-wrap img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    image-rendering: pixelated;
}

.deal-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #CC0C39;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .1rem .4rem;
    border-radius: 3px;
}

.product-info { display: flex; flex-direction: column; gap: .2rem; }
.product-name { font-size: .9rem; color: #0F1111; line-height: 1.3; }
.product-price { font-size: 1.05rem; font-weight: 700; color: #0F1111; }
.product-rating { font-size: .8rem; color: #666; }
.stars { color: #FF9900; }
.rating-count { color: #007185; }
.product-sold-by  { font-size: .78rem; color: #666; }
.product-sell-price { font-size: .78rem; color: #888; }

.btn-add-cart {
    margin-top: auto;
    background: #FFD814;
    color: #0F1111;
    border: none;
    padding: .45rem .8rem;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background .15s;
}
.btn-add-cart:hover { background: #F7CA00; }

/* ── Category grid ────────────────────────────────────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: .8rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: .8rem .4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0F1111;
    background: #fff;
    font-size: .78rem;
    text-align: center;
    transition: box-shadow .15s;
}
.category-card:hover { box-shadow: 0 3px 8px rgba(0,0,0,.12); text-decoration: none; color: #C7511F; }
.category-card img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }

/* ── Shop layout ──────────────────────────────────────────────────────────── */
.shop-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.shop-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    position: sticky;
    top: 80px;
}

.sidebar-section { margin-bottom: 1.2rem; }
.sidebar-section h3 { font-size: .95rem; margin-bottom: .5rem; border-bottom: 1px solid #ddd; padding-bottom: .3rem; }

.sidebar-cat-list { list-style: none; }
.sidebar-cat-list li { margin: .2rem 0; }
.sidebar-cat-list a { color: #0F1111; font-size: .88rem; padding: .15rem 0; display: block; }
.sidebar-cat-list a:hover, .sidebar-cat-list a.active { color: #C7511F; font-weight: 700; text-decoration: none; }

.price-range-inputs { display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem; }
.price-input { width: 70px; padding: .3rem .4rem; border: 1px solid #aaa; border-radius: 4px; font-size: .85rem; }

.btn-filter {
    background: #FFD814;
    border: none;
    padding: .35rem .8rem;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.btn-filter:hover { background: #F7CA00; }

.sort-select {
    width: 100%;
    padding: .35rem .5rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: .85rem;
    background: #fff;
}

.shop-main { flex: 1; min-width: 0; }

.shop-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .8rem;
    font-size: .9rem;
    color: #555;
}

.no-results { padding: 3rem; text-align: center; }

.results-count { font-size: .9rem; color: #555; }
.results-count strong { color: #0F1111; }

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */
.breadcrumb {
    font-size: .85rem;
    color: #555;
    margin-bottom: 1rem;
    padding: .5rem 0;
}
.breadcrumb a { color: #007185; }
.breadcrumb a:hover { color: #C7511F; }

/* ── Item page ────────────────────────────────────────────────────────────── */
.item-layout {
    display: grid;
    grid-template-columns: 380px 1fr 280px;
    gap: 1.5rem;
    background: #fff;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.item-image-main {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    aspect-ratio: 1;
}
.item-image-main img {
    width: 240px;
    height: 240px;
    object-fit: contain;
    image-rendering: pixelated;
}

.item-title { font-size: 1.4rem; margin-bottom: .5rem; line-height: 1.3; }

.item-rating-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
    font-size: .9rem;
}
.stars-large { color: #FF9900; font-size: 1.1rem; }
.rating-num-large { color: #007185; }
.review-count { color: #007185; }

.item-category-badge {
    display: inline-block;
    background: #e8f4f8;
    color: #007185;
    font-size: .8rem;
    padding: .2rem .6rem;
    border-radius: 3px;
    margin-bottom: .5rem;
}

.item-divider { border: none; border-top: 1px solid #eee; margin: .8rem 0; }

.item-price-block { margin-bottom: .3rem; }
.item-price-label { font-size: .9rem; color: #555; }
.item-price-main  { font-size: 2rem; font-weight: 700; color: #0F1111; }

.item-sell-back { font-size: .9rem; color: #555; margin-bottom: .5rem; }
.sell-ratio-note { color: #888; font-size: .8rem; }

.item-shipping { font-size: .9rem; color: #067D62; margin-bottom: .5rem; }
.shipping-free { font-weight: 700; }

.item-description { font-size: .92rem; line-height: 1.5; color: #333; }

.item-minecraft-id { font-size: .85rem; color: #666; }
.item-minecraft-id code { background: #f3f3f3; padding: .1rem .3rem; border-radius: 3px; font-family: monospace; }

/* Buy box */
.item-buybox {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.buybox-price { font-size: 1.6rem; font-weight: 700; }
.buybox-shipping { font-size: .85rem; color: #067D62; }
.in-stock { color: #067D62; font-size: .9rem; font-weight: 600; }
.buybox-sold-by { font-size: .85rem; color: #555; }

.buybox-qty { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.qty-select { padding: .25rem .4rem; border: 1px solid #aaa; border-radius: 4px; }

.btn-buy-now, .btn-checkout-now, .btn-sell-item, .btn-place-order, .btn-checkout-full {
    display: block;
    text-align: center;
    padding: .6rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s;
}
.btn-buy-now, .btn-add-cart { background: #FFD814; color: #0F1111; }
.btn-buy-now:hover           { background: #F7CA00; text-decoration: none; color: #0F1111; }
.btn-checkout-now, .btn-place-order, .btn-checkout-full { background: #FF9900; color: #0F1111; }
.btn-checkout-now:hover, .btn-place-order:hover, .btn-checkout-full:hover { background: #e68a00; text-decoration: none; color: #0F1111; }
.btn-sell-item { background: #fff; color: #0F1111; border: 1px solid #aaa; }
.btn-sell-item:hover { background: #f7f7f7; text-decoration: none; }

.btn-primary   { display: inline-block; padding: .6rem 1.2rem; background: #FFD814; color: #0F1111; border: none; border-radius: 20px; font-weight: 600; cursor: pointer; font-size: .9rem; text-decoration: none; transition: background .15s; }
.btn-primary:hover { background: #F7CA00; text-decoration: none; color: #0F1111; }
.btn-secondary { display: inline-block; padding: .6rem 1.2rem; background: #fff; color: #0F1111; border: 1px solid #aaa; border-radius: 20px; font-weight: 600; cursor: pointer; font-size: .9rem; text-decoration: none; }
.btn-secondary:hover { background: #f7f7f7; text-decoration: none; color: #0F1111; }

/* FBT Section */
.fbt-section { margin-top: 1rem; }
.fbt-grid {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.fbt-main, .fbt-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    text-align: center;
    width: 120px;
}
.fbt-main img, .fbt-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    image-rendering: pixelated;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: .3rem;
    background: #f7f7f7;
}
.fbt-price { font-weight: 700; }
.fbt-plus  { font-size: 1.5rem; color: #555; }
.fbt-item a { text-decoration: none; color: inherit; }
.fbt-item a:hover { color: #C7511F; }

/* ── Cart ─────────────────────────────────────────────────────────────────── */
.cart-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.cart-main { flex: 1; min-width: 0; }
.cart-title { font-size: 1.5rem; margin-bottom: 1rem; border-bottom: 1px solid #ddd; padding-bottom: .5rem; }
.cart-empty { padding: 2rem; text-align: center; background: #fff; border-radius: 4px; }

.cart-items { background: #fff; border-radius: 4px; padding: 1rem; margin-bottom: .5rem; }

.cart-row {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}
.cart-row:last-child { border-bottom: none; }

.cart-item-img img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    image-rendering: pixelated;
    background: #f7f7f7;
    border-radius: 4px;
    padding: .3rem;
}
.cart-item-details { flex: 1; }
.cart-item-name { font-size: 1rem; color: #0F1111; display: block; margin-bottom: .3rem; }
.cart-item-name:hover { color: #C7511F; }
.cart-item-meta { font-size: .8rem; color: #555; margin-bottom: .5rem; }
.cart-in-stock { color: #067D62; }

.cart-item-actions { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.cart-sep { color: #ccc; }

.btn-link-danger { background: none; border: none; color: #C7511F; cursor: pointer; font-size: .85rem; text-decoration: underline; }
.btn-link-danger:hover { color: #a33; }
.btn-link-muted { background: none; border: none; color: #888; cursor: pointer; font-size: .85rem; text-decoration: underline; }
.btn-link-small { font-size: .8rem; color: #007185; margin-right: .5rem; }

.cart-item-price { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.cart-subtotal-bar { text-align: right; font-size: 1.1rem; background: #fff; padding: .8rem 1rem; border-radius: 4px; }

/* Order Summary */
.cart-sidebar { width: 280px; flex-shrink: 0; }
.order-summary-box {
    background: #fff;
    border-radius: 4px;
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.order-summary-subtotal { font-size: 1rem; margin-bottom: .4rem; }
.order-summary-shipping { font-size: .88rem; color: #067D62; margin-bottom: .4rem; }
.order-summary-total { font-size: 1.2rem; font-weight: 700; margin-bottom: .8rem; border-top: 1px solid #eee; padding-top: .6rem; }
.checkout-note { font-size: .82rem; color: #666; margin-top: .6rem; line-height: 1.5; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-row { margin-bottom: .9rem; }
.form-row label { display: block; font-size: .9rem; margin-bottom: .3rem; font-weight: 600; }
.form-input { width: 100%; padding: .45rem .6rem; border: 1px solid #aaa; border-radius: 4px; font-size: .9rem; }
.form-input:focus { border-color: #FF9900; outline: none; box-shadow: 0 0 0 2px rgba(255,153,0,.3); }
.required { color: #CC0C39; }

/* Alerts */
.alert { padding: .9rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: .9rem; }
.alert-error   { background: #fdf0f0; border: 1px solid #e77; color: #900; }
.alert-success { background: #f0fdf0; border: 1px solid #7b7; color: #060; }

/* ── Checkout ─────────────────────────────────────────────────────────────── */
.checkout-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.checkout-main { flex: 1; background: #fff; border-radius: 4px; padding: 1.5rem; }
.checkout-main h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.checkout-main h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; border-bottom: 1px solid #eee; padding-bottom: .3rem; }
.checkout-sidebar { width: 280px; flex-shrink: 0; }

.balance-display { background: #f7f7f7; border-radius: 4px; padding: .6rem .8rem; font-size: .9rem; margin-bottom: .8rem; }
.balance-insufficient { color: #CC0C39; }
.balance-ok { color: #067D62; }

.checkout-items-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 1rem; }
.checkout-items-table th { text-align: left; border-bottom: 2px solid #ddd; padding: .4rem .3rem; }
.checkout-items-table td { border-bottom: 1px solid #eee; padding: .4rem .3rem; }
.checkout-items-table tfoot td { border-top: 2px solid #ddd; border-bottom: none; }

/* ── Sell page ────────────────────────────────────────────────────────────── */
.sell-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.sell-main { flex: 1; background: #fff; border-radius: 4px; padding: 1.5rem; }
.sell-main h1 { font-size: 1.4rem; margin-bottom: .5rem; }
.sell-intro  { font-size: .92rem; color: #555; margin-bottom: .8rem; line-height: 1.5; }
.sell-sidebar { width: 280px; flex-shrink: 0; }

.sell-notice {
    background: #fffbf0;
    border: 1px solid #FFD814;
    border-radius: 4px;
    padding: .7rem 1rem;
    font-size: .88rem;
    margin-bottom: 1rem;
    color: #555;
}

.sell-price-preview {
    background: #f0fdf0;
    border: 1px solid #7b7;
    border-radius: 4px;
    padding: .6rem .8rem;
    font-size: .9rem;
    margin-bottom: .8rem;
    color: #060;
}

.sell-steps { padding-left: 1.2rem; font-size: .88rem; color: #444; line-height: 2; }

/* Autocomplete */
.autocomplete-dropdown {
    position: absolute;
    z-index: 200;
    background: #fff;
    border: 1px solid #aaa;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.form-row { position: relative; }

.autocomplete-item {
    padding: .5rem .8rem;
    font-size: .88rem;
    cursor: pointer;
    color: #0F1111;
}
.autocomplete-item:hover { background: #f3f3f3; }

/* ── Account ──────────────────────────────────────────────────────────────── */
.account-login-box { max-width: 450px; background: #fff; border-radius: 4px; padding: 2rem; margin: 0 auto; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.account-login-box h1 { font-size: 1.4rem; margin-bottom: 1rem; }

.account-layout { background: #fff; border-radius: 4px; padding: 1.5rem; }

.account-profile {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
}

.account-avatar { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 4px; }

.account-info h1 { font-size: 1.4rem; margin-bottom: .2rem; }
.account-uuid { font-size: .78rem; color: #888; font-family: monospace; margin-bottom: .4rem; }
.account-balance-label { font-size: .85rem; color: #555; }
.account-balance { font-size: 2rem; font-weight: 700; color: #131921; }
.account-joined { font-size: .8rem; color: #888; margin-top: .3rem; }

.account-transactions h2 { font-size: 1.15rem; margin-bottom: .8rem; }

/* ── Transaction table ────────────────────────────────────────────────────── */
.txn-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.txn-table th { text-align: left; background: #f7f7f7; padding: .5rem .6rem; border-bottom: 2px solid #ddd; white-space: nowrap; }
.txn-table td { padding: .45rem .6rem; border-bottom: 1px solid #eee; vertical-align: middle; }
.txn-table tr:hover td { background: #fafafa; }

.txn-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: .15rem .4rem;
    border-radius: 3px;
    white-space: nowrap;
}
.txn-badge-buy          { background: #e8f4f8; color: #007185; }
.txn-badge-sell         { background: #f0fdf0; color: #067D62; }
.txn-badge-admin_credit { background: #f5f0ff; color: #6b2fbb; }
.txn-badge-admin_debit  { background: #fff0f0; color: #900; }

.txn-debit  { color: #CC0C39; font-weight: 700; }
.txn-credit { color: #067D62; font-weight: 700; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    justify-content: center;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .88rem;
    color: #007185;
    text-decoration: none;
    background: #fff;
    transition: background .1s;
}
.page-btn:hover { background: #f3f3f3; text-decoration: none; }
.page-btn.active { background: #FF9900; color: #131921; border-color: #FF9900; font-weight: 700; pointer-events: none; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
    background: #131921;
    color: #ccc;
    margin-top: 2rem;
}

.footer-top {
    background: #232f3e;
    text-align: center;
    padding: .9rem;
}
.footer-back-to-top { color: #fff; font-size: .9rem; }
.footer-back-to-top:hover { color: #FF9900; text-decoration: none; }

.footer-mid {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    padding: 2rem 1rem;
    flex-wrap: wrap;
}

.footer-col { flex: 1; min-width: 150px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.footer-col ul  { list-style: none; }
.footer-col li  { margin-bottom: .4rem; }
.footer-col a   { color: #ccc; font-size: .85rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    background: #0F1111;
    text-align: center;
    padding: 1rem;
}
.footer-logo { font-size: 1.3rem; margin-bottom: .3rem; }
.footer-copy { font-size: .78rem; color: #888; }

/* ── Admin login ──────────────────────────────────────────────────────────── */
.admin-body { background: #EAEDED; }
.admin-login-wrap { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.admin-login-box { background: #fff; border-radius: 4px; padding: 2rem; width: 350px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.admin-login-box h1 { font-size: 1.3rem; margin-bottom: 1rem; text-align: center; color: #131921; }

/* ── Login page ───────────────────────────────────────────────────────────── */
.login-how-it-works { background: #f0f2f2; border: 1px solid #d5d9d9; border-radius: 4px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.login-how-it-works h3 { font-size: .95rem; margin-bottom: .5rem; color: #131921; }
.login-how-it-works ol { padding-left: 1.25rem; }
.login-how-it-works li { margin-bottom: .3rem; }
.login-how-it-works code { background: #fff; border: 1px solid #ccc; padding: 1px 5px; border-radius: 3px; font-family: monospace; }
.login-note { margin-top: .75rem; font-size: .85rem; color: #565959; }
.login-token-input { font-family: monospace; font-size: 1.6rem; letter-spacing: .25em; text-align: center; text-transform: uppercase; max-width: 220px; }
.btn-login { width: 100%; margin-top: .5rem; }

/* ── Inventory picker on sell page ───────────────────────────────────────── */
.inventory-picker { margin: 1.25rem 0; }
.inventory-picker h3 { font-size: 1rem; margin-bottom: .4rem; display: flex; align-items: center; gap: .6rem; }
.inv-stale-badge { font-size: .75rem; background: #fef3cd; border: 1px solid #ffc107; color: #856404; padding: 2px 8px; border-radius: 10px; font-weight: normal; }
.inv-fresh-badge { font-size: .75rem; background: #d4edda; border: 1px solid #28a745; color: #155724; padding: 2px 8px; border-radius: 10px; font-weight: normal; }
.inv-hint { font-size: .82rem; color: #565959; margin-bottom: .6rem; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.inv-slot { background: #fff; border: 2px solid #d5d9d9; border-radius: 4px; padding: .5rem; text-align: center; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.inv-slot:hover { border-color: #007185; box-shadow: 0 0 0 2px rgba(0,113,133,.15); }
.inv-slot.selected { border-color: #e47911; box-shadow: 0 0 0 2px rgba(228,121,17,.25); }
.inv-slot img { width: 48px; height: 48px; margin: 0 auto .3rem; object-fit: contain; }
.inv-slot-name { font-size: .72rem; color: #0F1111; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-slot-qty { font-size: .78rem; color: #565959; }
.inv-slot-price { font-size: .78rem; color: #007600; font-weight: bold; }
.inv-empty-notice { background: #f8f9fa; border: 1px dashed #ccc; border-radius: 4px; padding: 1rem; color: #565959; margin-bottom: 1rem; font-size: .88rem; }
.inv-empty-notice code { background: #fff; border: 1px solid #ccc; padding: 1px 5px; border-radius: 3px; font-family: monospace; }
.account-logout { display: inline-block; margin-top: .5rem; padding: .4rem .9rem; }

/* ── Checkout additions ───────────────────────────────────────────────────── */
.checkout-section { margin-bottom: 1.5rem; }

.checkout-identity-box {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: .65rem .9rem;
    font-size: .9rem;
}

.checkout-player-avatar img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    border-radius: 2px;
    display: block;
}

.checkout-total-row td {
    background: #f7f7f7;
    font-size: 1.05rem;
}

/* Bulk shulker badge */
.bulk-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 3px;
    padding: .1rem .4rem;
    font-size: .78rem;
    color: #856404;
    white-space: nowrap;
}

/* Order summary sidebar line (key/value pair) */
.order-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    margin-bottom: .3rem;
    color: #0F1111;
}

/* Muted / secondary text */
.muted { color: #888; font-size: .85em; }

/* Quantity number input in cart */
.qty-input {
    padding: .25rem .4rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: .85rem;
    text-align: center;
}
.qty-input:focus { border-color: #FF9900; outline: none; box-shadow: 0 0 0 2px rgba(255,153,0,.3); }

/* txn badge for tax_credit */
.txn-badge-tax_credit { background: #fff8e1; color: #b8860b; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .product-grid-6 { grid-template-columns: repeat(3, 1fr); }
    .product-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .category-grid  { grid-template-columns: repeat(6, 1fr); }
    .item-layout    { grid-template-columns: 300px 1fr 240px; }
}

@media (max-width: 768px) {
    .navbar-inner { flex-wrap: wrap; gap: .3rem; }
    .navbar-search { order: 3; flex-basis: 100%; max-width: 100%; }
    .subnav { display: none; }

    .shop-layout { flex-direction: column; }
    .shop-sidebar { width: 100%; position: static; }

    .item-layout { grid-template-columns: 1fr; }
    .item-buybox { order: -1; }

    .product-grid-6 { grid-template-columns: repeat(2, 1fr); }
    .product-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .category-grid  { grid-template-columns: repeat(3, 1fr); }

    .cart-layout { flex-direction: column; }
    .cart-sidebar { width: 100%; }
    .checkout-layout { flex-direction: column; }
    .checkout-sidebar { width: 100%; }
    .sell-layout { flex-direction: column; }
    .sell-sidebar { width: 100%; }
}

@media (max-width: 480px) {
    .product-grid-6, .product-grid-4 { grid-template-columns: 1fr 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .account-profile { flex-direction: column; }
}

/* ── Reviews ─────────────────────────────────────────────────────────────── */
.reviews-section { margin-top: 2rem; }
.review-count-head { font-size: 1rem; font-weight: 400; color: #555; margin-left: .5rem; }
.review-form-wrap { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 1.2rem 1.5rem; margin-bottom: 1.5rem; max-width: 640px; }
.review-form-wrap h3 { margin: 0 0 1rem; font-size: 1rem; }
.review-stars-input { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.star-picker { display: flex; flex-direction: row-reverse; gap: .1rem; }
.star-picker input[type=radio] { display: none; }
.star-label { font-size: 1.8rem; cursor: pointer; color: #ccc; transition: color .1s; }
.star-picker:hover .star-label { color: #FF9900; }
.star-picker .star-label:hover ~ .star-label { color: #ccc; }
.star-label.active,
.star-picker input[type=radio]:checked ~ .star-label { color: #FF9900; }
/* CSS-only star highlight: forward direction */
.star-picker:not(:has(input:checked)) .star-label:hover,
.star-picker:not(:has(input:checked)) .star-label:hover ~ .star-label { color: inherit; }
.review-textarea { resize: vertical; width: 100%; }
.review-login-prompt { color: #555; margin-bottom: 1.2rem; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; max-width: 640px; }
.review-card { background: #fff; border: 1px solid #e7e7e7; border-radius: 6px; padding: 1rem 1.2rem; }
.review-header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.review-avatar { width: 32px; height: 32px; border-radius: 3px; image-rendering: pixelated; }
.review-author { font-weight: 600; }
.review-stars { color: #FF9900; font-size: 1.05rem; }
.review-date { font-size: .82rem; }
.review-body { font-size: .92rem; line-height: 1.5; white-space: pre-line; }

/* ── Deals discount badges ────────────────────────────────────────────────── */
.deal-was-price { font-size: .8rem; color: #888; text-decoration: line-through; margin-right: .3rem; }
.deal-save-note { font-size: .78rem; color: #c45500; font-weight: 600; }

/* ── Static pages (about, rules, mod-setup) ──────────────────────────────── */
.static-page { max-width: 860px; margin: 2rem auto; padding: 0 1rem; }
.static-page h1 { font-size: 1.7rem; margin-bottom: 1rem; color: #131921; }
.static-page h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; color: #131921; }
.static-page p, .static-page li { font-size: .95rem; line-height: 1.65; color: #333; }
.static-page ol, .static-page ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.static-page pre { background: #f6f6f6; border: 1px solid #ddd; border-radius: 5px; padding: .75rem 1rem; overflow-x: auto; }
.static-page code { background: #f0f0f0; padding: .1rem .3rem; border-radius: 3px; font-size: .88rem; }
.static-page pre code { background: none; padding: 0; }
.rules-intro { font-size: 1rem; color: #555; margin-bottom: 1.5rem; }

/* ── Deals of the Day section ────────────────────────────────────────────── */
.deals-section {
    background: linear-gradient(135deg, #0f1923 0%, #1a2a3a 60%, #0d2233 100%);
    padding: 2rem 1.5rem 2.5rem;
    margin: 0 0 2rem;
    border-radius: 0;
}
.deals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.deals-title-block { display: flex; flex-direction: column; gap: .2rem; }
.deals-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #FF9900;
    margin: 0;
    text-shadow: 0 0 20px rgba(255,153,0,.4);
    letter-spacing: -.5px;
}
.deals-subtitle { font-size: .85rem; color: #8ab4cc; }

/* countdown */
.deals-countdown-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.deals-countdown-label { font-size: .75rem; color: #8ab4cc; text-transform: uppercase; letter-spacing: 1px; }
.deals-countdown {
    display: flex;
    align-items: center;
    gap: .3rem;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,153,0,.3);
    border-radius: 8px;
    padding: .4rem .8rem;
}
.cd-unit { display: flex; align-items: baseline; gap: .15rem; }
.cd-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF9900;
    font-variant-numeric: tabular-nums;
    min-width: 2.2ch;
    text-align: center;
}
.cd-label { font-size: .65rem; color: #8ab4cc; text-transform: uppercase; }
.cd-sep { font-size: 1.3rem; color: #FF9900; opacity: .6; margin: 0 .05rem; }

/* deal cards */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}
.deal-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    position: relative;
}
.deal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,153,0,.6);
    box-shadow: 0 6px 24px rgba(255,153,0,.2);
}
.deal-card-badge {
    position: absolute;
    top: .55rem;
    left: .55rem;
    background: #e31837;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    padding: .2rem .5rem;
    border-radius: 4px;
    z-index: 1;
    letter-spacing: .5px;
}
.deal-card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1rem .8rem;
    background: rgba(255,255,255,.03);
}
.deal-card-img img {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.deal-card-body {
    padding: .6rem .85rem .5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.deal-card-name {
    font-size: .88rem;
    font-weight: 600;
    color: #e8eef2;
    line-height: 1.3;
}
.deal-card-prices { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.deal-card-price { font-size: 1.15rem; font-weight: 800; color: #FF9900; }
.deal-card-was { font-size: .78rem; color: #7a9aad; text-decoration: line-through; }
.deal-card-save { font-size: .76rem; color: #5cbf5c; font-weight: 600; }
.deal-card-rating { font-size: .78rem; color: #FF9900; display: flex; align-items: center; gap: .25rem; }
.deal-card-rating-num { color: #8ab4cc; font-size: .75rem; }
.deal-card-cta {
    text-align: center;
    padding: .55rem;
    background: #FF9900;
    color: #131921;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .3px;
    transition: background .1s;
}
.deal-card:hover .deal-card-cta { background: #e68a00; }

.deals-empty { color: #8ab4cc; text-align: center; padding: 2rem 0; font-size: .95rem; }

/* Inline deal badge used on item.php price block / buy box */
.item-deal-badge {
    position: static;
    display: inline-block;
    vertical-align: middle;
    margin-left: .35rem;
}

@media (max-width: 900px) {
    .deals-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .deals-grid { grid-template-columns: repeat(2, 1fr); }
    .deals-title { font-size: 1.25rem; }
    .cd-num { font-size: 1.1rem; }
}
