/* Magic Tavern TCG warm fantasy marketplace styling */
:root {
    --ink: #211617;
    --deep-plum: #251333;
    --royal-plum: #5d2f7f;
    --twilight-blue: #23375d;
    --ember: #b95735;
    --warm-gold: #f0c86b;
    --soft-gold: #ffe6a6;
    --parchment: #fff3d6;
    --cream: #fffaf0;
    --rose: #ffb6a3;
    --emerald: #4fc08d;
    --magic: #8f63ff;
    --pokemon: #ffcc4d;
    --card-bg: rgba(255, 248, 229, 0.11);
    --card-bg-strong: rgba(255, 248, 229, 0.17);
    --border: rgba(255, 230, 166, 0.28);
    --shadow: 0 24px 70px rgba(25, 10, 35, 0.32);
    --radius-lg: 34px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --max-width: 1180px;
}

/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #111318;
    background: #ffffff;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

a {
    color: inherit;
}

button,
.button {
    border: 0;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(18px);
    background: rgba(36, 16, 51, 0.9);
    border-bottom: 1px solid rgba(244, 197, 66, 0.24);
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 20%) minmax(0, 60%) minmax(0, 20%);
    align-items: center;
    gap: 1rem;
}

.header-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.header-brand-logo {
    width: auto !important;
    height: auto !important;
    max-height: 220px !important;
    max-width: 420px !important;
    display: block;
    object-fit: contain;
    object-position: center;
    flex: 0 0 auto;
}

.header-shell {
    min-width: 0;
    padding: 0.8rem 1rem 0.85rem;
    display: grid;
    gap: 0.7rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 246, 248, 0.98));
    border: 1px solid rgba(244, 197, 66, 0.34);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(21, 12, 31, 0.18);
}

.header-shell-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
}

.header-shell-brand-text {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: nowrap;
    color: #241033;
}

.header-brand-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #f0c86b;
    text-shadow: 0 2px 4px rgba(43, 18, 63, 0.35);
    white-space: nowrap;
}

.header-brand-subtitle {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #5f4f6d;
    white-space: nowrap;
}

.header-search {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cfd4dc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 8px 20px rgba(36, 16, 51, 0.08);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.header-search select {
    flex: 0 0 auto;
    min-height: 2.95rem;
    border: 2px solid rgba(36, 16, 51, 0.08);
    border-radius: 999px;
    padding: 0.7rem 2.6rem 0.7rem 1.3rem;
    color: #241033;
    background: linear-gradient(135deg, #f6efe0, #efe5cc);
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06), 0 2px 6px rgba(36,16,51,0.08);
}

.header-search input {
    width: 100%;
    min-height: 2.75rem;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    color: #101114;
    background: transparent;
    font: inherit;
    outline: none;
}

.header-search button {
    min-height: 2.75rem;
    padding: 0.7rem 1.2rem;
    color: #fffaf0;
    background: linear-gradient(135deg, #241033, #4b2472);
    box-shadow: 0 10px 22px rgba(75, 36, 114, 0.22);
}

.header-primary-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.45rem;
    background: rgba(36, 16, 51, 0.05);
    border: 1px solid rgba(202, 162, 74, 0.26);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.header-primary-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: 0.6rem 1rem;
    color: #20242c;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.92rem;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.header-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: nowrap;
}

.header-action-link {
    min-height: 2.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    color: #20242c;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid #cfd4dc;
    background: #ffffff;
    font-weight: 800;
    font-size: 0.92rem;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.header-action-link:hover,
.header-primary-nav a:hover {
    transform: translateY(-1px);
}

.header-cart-link {
    color: #fffaf0;
    background: #111318;
    border-color: #111318;
}

.header-cart-count {
    min-width: 1.45rem;
    height: 1.45rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #111318;
    background: #f0c86b;
    font-size: 0.78rem;
    font-weight: 900;
}

.header-action-link:hover {
    color: #20242c;
    background: #f4f6f8;
    border-color: #bfc5d0;
}

.header-primary-nav a:hover {
    color: #fffaf0;
    background: linear-gradient(135deg, #241033, #4b2472);
    border-color: #4b2472;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

section {
    margin: 1.2rem 0;
}

.hero-section {
    min-height: 960px;
    display: flex;
    align-items: flex-end;
    padding: 0;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    background: #ffffff url("assets/homepage banners/main banner.png") center center / cover no-repeat;
    border: 0;
    box-shadow: none;
}

.hero-btn {
    position: absolute;
    bottom: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    border-radius: 999px;
    background: #ffffff;
    color: #111318;
    font-weight: 900;
    font-size: 1.25rem;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.hero-btn-left {
    left: 2.5rem;
}

.hero-btn-right {
    right: 2.5rem;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.eyebrow,
.market-label,
.product-kicker {
    color: var(--soft-gold);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 0.7rem;
}

.hero-section h1 {
    max-width: 760px;
    font-size: clamp(3rem, 8vw, 6.8rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
    color: var(--cream);
    text-shadow: 0 10px 34px rgba(0, 0, 0, 0.26);
}

.hero-lead {
    max-width: 650px;
    margin: 1.4rem 0 2rem;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: rgba(255, 250, 240, 0.9);
}

.hero-actions,
.newsletter-form {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.button:hover,
button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.button-primary,
.newsletter-form button,
.search-box button {
    color: var(--ink);
    background: linear-gradient(135deg, var(--warm-gold), #ffb36c);
    box-shadow: 0 14px 34px rgba(240, 200, 107, 0.3);
}

.button-secondary {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--border);
}

.button-magic {
    color: white;
    background: linear-gradient(135deg, #8f63ff, #d287ff);
    box-shadow: 0 14px 34px rgba(143, 99, 255, 0.28);
}

.button-pokemon {
    color: #301b10;
    background: linear-gradient(135deg, #ffcc4d, #ff7b5c);
    box-shadow: 0 14px 34px rgba(255, 179, 108, 0.28);
}

.hero-card-preview {
    position: relative;
    z-index: 1;
    min-height: 430px;
}

.preview-card {
    position: absolute;
    width: min(82%, 330px);
    min-height: 420px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 34px;
    color: var(--cream);
    border: 1px solid rgba(255, 230, 166, 0.38);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.preview-card h3 {
    font-size: 1.55rem;
}

.card-one {
    right: 5rem;
    top: 0;
    transform: rotate(-7deg);
    background:
        linear-gradient(160deg, rgba(255,255,255,0.08), transparent 34%),
        linear-gradient(145deg, #8f63ff, #2b1742 64%, #b95735);
}

.card-two {
    right: 0;
    top: 4rem;
    transform: rotate(8deg);
    background:
        linear-gradient(160deg, rgba(255,255,255,0.08), transparent 34%),
        linear-gradient(145deg, #ffcc4d, #ff775c 44%, #263b64);
}

.card-spark {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    font-size: 2.5rem;
    color: var(--soft-gold);
}

.search-panel {
    margin-top: -3rem;
    position: relative;
    z-index: 2;
    padding: 1.35rem;
    background: rgba(255, 250, 240, 0.92);
    color: var(--ink);
    border: 1px solid rgba(255, 230, 166, 0.75);
    border-radius: 999px;
    box-shadow: 0 20px 55px rgba(25, 10, 35, 0.22);
}

.search-panel label {
    display: block;
    margin-left: 1rem;
    margin-bottom: 0.35rem;
    color: #69412f;
    font-weight: 900;
    font-size: 0.9rem;
}

.search-box {
    display: flex;
    gap: 0.75rem;
}

.search-box input,
.newsletter-form input {
    width: 100%;
    min-height: 3.2rem;
    border: 1px solid rgba(90, 47, 41, 0.18);
    border-radius: 999px;
    padding: 0.85rem 1.1rem;
    font: inherit;
    color: var(--ink);
    background: #fff8e8;
    outline: none;
}

.search-box input:focus,
.newsletter-form input:focus {
    border-color: var(--warm-gold);
    box-shadow: 0 0 0 4px rgba(240, 200, 107, 0.22);
}

.market-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.market-panel {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.market-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.55;
    pointer-events: none;
}

.market-panel.magic {
    background: linear-gradient(145deg, rgba(69, 37, 112, 0.98), rgba(42, 25, 63, 0.96));
}

.market-panel.magic::before {
    background:
        radial-gradient(circle at 16% 20%, rgba(240, 200, 107, 0.26), transparent 12rem),
        radial-gradient(circle at 90% 10%, rgba(143, 99, 255, 0.38), transparent 16rem);
}

.market-panel.pokemon {
    background: linear-gradient(145deg, rgba(255, 126, 80, 0.95), rgba(78, 46, 58, 0.95));
}

.market-panel.pokemon::before {
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 230, 166, 0.42), transparent 13rem),
        radial-gradient(circle at 80% 12%, rgba(255, 204, 77, 0.28), transparent 16rem);
}

.market-panel-inner {
    position: relative;
    z-index: 1;
    padding: clamp(1.3rem, 4vw, 2.2rem);
}

.market-panel-inner > .button {
    margin-top: 0.35rem;
}

.market-panel h2,
.section-heading h2,
.sell-callout h2,
.trust-section h2,
.newsletter h2 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--cream);
}

.market-panel p,
.section-heading p,
.sell-callout p,
.newsletter p,
.trust-card p,
.product-card p,
.feature-card p {
    color: rgba(255, 250, 240, 0.82);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.feature-card,
.product-card,
.trust-card {
    padding: 1.15rem;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.feature-card:hover,
.product-card:hover,
.trust-card:hover {
    transform: translateY(-4px);
    background: var(--card-bg-strong);
    border-color: rgba(255, 230, 166, 0.5);
}

.feature-card span,
.trust-card span {
    display: inline-grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    margin-bottom: 0.45rem;
    border-radius: 50%;
    background: rgba(255, 250, 240, 0.16);
}

.feature-card small {
    display: block;
    margin-top: 0.7rem;
    color: #6b4a00;
    font-weight: 800;
    line-height: 1.35;
}

.product-section,
.trust-section,
.newsletter,
.sell-callout {
    padding: clamp(1.4rem, 4vw, 2.2rem);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255, 248, 229, 0.10);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 1.2rem;
}

.product-grid,
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.product-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.1), transparent 38%),
        rgba(255, 248, 229, 0.11);
}

.product-card.magic {
    border-color: rgba(143, 99, 255, 0.4);
}

.product-card.pokemon {
    border-color: rgba(255, 204, 77, 0.42);
}

.product-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.45rem;
    color: var(--cream);
}

.product-card strong {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--soft-gold);
    font-size: 1.25rem;
}

.sell-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background:
        radial-gradient(circle at 12% 30%, rgba(79, 192, 141, 0.24), transparent 16rem),
        linear-gradient(135deg, rgba(71, 51, 95, 0.95), rgba(47, 74, 86, 0.92));
}

.trust-grid {
    margin-top: 1rem;
}

.newsletter {
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(240, 200, 107, 0.26), transparent 18rem),
        rgba(255, 248, 229, 0.12);
}

.newsletter p {
    max-width: 680px;
    margin: 0.5rem auto 1.2rem;
}

.newsletter-form {
    max-width: 680px;
    margin: 0 auto;
}

footer {
    max-width: var(--max-width);
    margin: 0 auto 2rem;
    padding: 1.25rem;
    text-align: center;
    color: rgba(255, 250, 240, 0.78);
    background: rgba(37, 19, 51, 0.55);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

/* White theme */
body::before {
    display: none;
}

.site-header {
    background: rgba(36, 16, 51, 0.94);
    border-bottom: 1px solid rgba(244, 197, 66, 0.24);
}

.product-section,
.trust-section,
.newsletter,
.sell-callout,
.market-panel {
    color: #101114;
    background: #ffffff;
    border: 1px solid #d9dce3;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.hero-section h1,
.market-panel h2,
.section-heading h2,
.sell-callout h2,
.trust-section h2,
.newsletter h2,
.product-card h3 {
    color: #101114;
    text-shadow: none;
}

.hero-lead,
.market-panel p,
.section-heading p,
.sell-callout p,
.newsletter p,
.trust-card p,
.product-card p,
.feature-card p {
    color: #3f4652;
}

.eyebrow,
.market-label,
.product-kicker {
    color: #6b4a00;
}

.button-secondary {
    color: #101114;
    background: #ffffff;
    border: 1px solid #101114;
}

.button-magic {
    color: #ffffff;
    background: #442f86;
    box-shadow: none;
}

.button-pokemon {
    color: #111318;
    background: #f4c542;
    box-shadow: none;
}

.search-panel {
    background: #ffffff;
    color: #101114;
    border: 1px solid #cfd4dc;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.search-panel label {
    color: #20242c;
}

.search-box input,
.newsletter-form input {
    color: #101114;
    background: #f4f6f8;
    border: 1px solid #bfc5d0;
}

.market-panel.magic,
.market-panel.pokemon,
.sell-callout,
.newsletter {
    background: #ffffff;
}

.market-panel::before {
    display: none;
}

.feature-card,
.product-card,
.trust-card {
    background: #f7f8fa;
    border: 1px solid #d9dce3;
    box-shadow: none;
}

.feature-card:hover,
.product-card:hover,
.trust-card:hover {
    background: #ffffff;
    border-color: #101114;
}

.feature-card span,
.trust-card span {
    background: #101114;
    color: #ffffff;
}

.product-card {
    background:
        linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}

.product-card.magic {
    border-color: #bcb3df;
}

.product-card.pokemon {
    border-color: #e7c54c;
}

.product-card strong {
    color: #101114;
}

footer {
    color: rgba(255, 255, 255, 0.78);
    background: rgba(36, 16, 51, 0.9);
    border: 1px solid rgba(244, 197, 66, 0.24);
}

@media (max-width: 900px) {
    body.mobile-menu-open {
        overflow: hidden;
    }

    .site-header {
        position: static;
        padding: 0.5rem 0.75rem;
        backdrop-filter: none;
    }

    .nav-shell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0;
        border-radius: 0;
    }

    .brand {
        align-self: center;
        width: min(58vw, 13rem);
        aspect-ratio: 1.78 / 1;
    }

    .brand-logo {
        width: 100%;
        height: 100%;
    }

    .mobile-menu-toggle {
        width: 3rem;
        height: 3rem;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.28rem;
        flex: 0 0 auto;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(244, 197, 66, 0.24);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    }

    .nav-content {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(20rem, 86vw);
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.1rem 0.9rem 1.25rem;
        background: #ffffff;
        box-shadow: -14px 0 28px rgba(0, 0, 0, 0.22);
        visibility: hidden;
        transform: translateX(100%);
        transition: transform 180ms ease;
        overflow-y: auto;
        z-index: 1100;
    }

    body.mobile-menu-open .nav-content {
        visibility: visible;
        transform: translateX(0);
    }

    .mobile-nav-header,
    .mobile-menu-close,
    .mobile-nav-backdrop {
        display: block;
    }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(16, 17, 20, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
        z-index: 1050;
    }

    body.mobile-menu-open .mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .top-search,
    .account-actions,
    .category-nav {
        width: 100%;
    }

    .top-search,
    .account-actions,
    .category-nav,
    .nav-links,
    .nav-links li,
    .nav-dropdown {
        grid-column: auto;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.6rem;
    }

    .nav-links li {
        width: 100%;
        list-style: none;
    }

    .nav-dropdown,
    .nav-dropdown[open] {
        width: 100%;
    }

    .category-nav {
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .category-trigger,
    .nav-links .category-link,
    .nav-cta,
    .account-actions > a {
        width: 100%;
        max-width: none;
    }

    .category-trigger,
    .nav-links .category-link {
        min-width: 0;
    }

    .nav-dropdown-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-dropdown-menu {
        position: static;
        left: auto;
        right: auto;
        margin-top: 0.45rem;
        min-width: 0;
        width: 100%;
        display: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
        border-radius: 16px;
        background: #f7f8fa;
    }

    .nav-dropdown[open] .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu {
        left: auto;
        transform: none;
        display: grid;
    }

    .hero-section {
        grid-template-columns: 1fr;
        padding: 2rem;
        min-height: auto;
    }

    .hero-card-preview {
        min-height: 360px;
    }

    .preview-card {
        min-height: 330px;
    }

    .market-showcase,
    .product-grid,
    .trust-grid {
        grid-template-columns: 1fr;
    }

    .search-panel {
        border-radius: var(--radius-md);
    }

    .search-box,
    .sell-callout {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box button,
    .newsletter-form button,
    .sell-callout .button {
        width: 100%;
    }
}

@media (max-width: 620px) {
    main {
        padding: 1rem 0.75rem 3rem;
    }

    .hero-section,
    .product-section,
    .trust-section,
    .newsletter,
    .sell-callout {
        border-radius: 24px;
    }

    .hero-section h1 {
        font-size: 2.7rem;
        line-height: 0.95;
    }

    .preview-card {
        position: relative;
        inset: auto;
        width: 100%;
        transform: none;
        min-height: 260px;
        margin-top: 1rem;
    }

    .card-two {
        display: none;
    }

    .search-panel {
        margin-top: 1rem;
        border-radius: 24px;
        padding: 1rem;
    }

    .top-search,
    .search-box,
    .hero-actions,
    .account-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .account-actions > a,
    .top-search button,
    .hero-actions .button {
        width: 100%;
        max-width: none;
        text-align: center;
    }

    .top-search {
        border-radius: 24px;
        padding: 0.75rem;
    }

    .top-search input,
    .search-box input {
        min-height: 3rem;
    }

    .header-search select,
    .header-search input,
    .header-search button {
        width: 100%;
    }

    .nav-content {
        width: min(19rem, 88vw);
    }
}

/* Homepage layout refinement: widen key storefront sections without replacing the base theme. */
:root {
    --content-wide: 1480px;
    --content-readable: 1180px;
    --page-gutter: clamp(1rem, 3vw, 3rem);
}

.homepage-main,
main#home {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(1.25rem, 2vw, 2rem) 0 clamp(3rem, 5vw, 5rem);
}

.homepage-main > section,
main#home > section {
    width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-wide));
    margin-left: auto;
    margin-right: auto;
}

.homepage-main .hero-section,
main#home .hero-section {
    width: min(calc(100% - (var(--page-gutter) * 2)), 1640px);
}

.homepage-main .search-panel,
main#home .search-panel {
    width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-readable));
}

.homepage-main .market-showcase,
.homepage-main .product-section,
.homepage-main .sell-callout,
main#home .market-showcase,
main#home .product-section,
main#home .sell-callout {
    width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-wide));
}

.section-heading,
.hero-content,
.sell-callout > div {
    max-width: 760px;
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.site-header-inner {
    width: min(calc(100% - (var(--page-gutter) * 2)), 1600px);
    max-width: 1600px;
}

@media (max-width: 900px) {
    .homepage-main,
    main#home {
        padding-top: 1rem;
    }

    .homepage-main > section,
    main#home > section,
    .homepage-main .hero-section,
    main#home .hero-section,
    .homepage-main .search-panel,
    main#home .search-panel,
    .homepage-main .market-showcase,
    main#home .market-showcase,
    .homepage-main .product-section,
    main#home .product-section,
    .homepage-main .sell-callout,
    main#home .sell-callout {
        width: min(calc(100% - 1rem), 100%);
    }
}

/* Header refinement: fuller left logo area, wider center panel, larger stacked actions. */
.site-header-inner {
    grid-template-columns: minmax(340px, 1.6fr) minmax(0, 4fr) minmax(170px, 1fr);
    gap: 1.25rem;
}

.header-brand {
    width: 100%;
    justify-content: flex-start;
    align-self: stretch;
}

.header-brand-logo {
    width: 100% !important;
    height: auto !important;
    max-width: 420px !important;
    max-height: 220px !important;
    object-fit: contain;
    object-position: left center;
}

.header-shell {
    padding: 0.95rem 1.2rem 1rem;
}

.header-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.7rem;
}

.header-action-link {
    width: 100%;
    min-height: 3.35rem;
    padding: 0.9rem 1.2rem;
    font-size: 0.98rem;
}

.header-cart-link {
    justify-content: space-between;
}

.header-user {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 3.35rem;
    padding: 0.4rem 0.6rem;
    background: #ffffff;
    border: 1px solid #cfd4dc;
    border-radius: 999px;
    gap: 0;
}

.header-user-avatar {
    width: 40%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-user-avatar svg {
    width: 1.5rem;
    height: 1.5rem;
}

.header-user-info {
    width: 60%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #4b6a9b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    text-decoration: none;
}

.header-user-name:hover {
    text-decoration: underline;
}

.header-user-logout {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8f96a3;
    text-decoration: none;
    line-height: 1.3;
    transition: color 180ms ease;
}

.header-user-logout:hover {
    color: #101114;
}