:root {
    --bg: #fff8ea;
    --bg-2: #f5e0b8;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: rgba(255, 250, 242, 0.96);
    --line: rgba(112, 55, 12, 0.14);
    --text: #3d2412;
    --muted: #74523d;
    --accent: #c86b1a;
    --accent-2: #7f2f00;
    --shadow: rgba(92, 53, 20, 0.16);
    --card-surface: #fffdf9;
    --card-ink: #22150c;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(200, 107, 26, 0.16), transparent 26%),
        linear-gradient(135deg, var(--bg), var(--bg-2));
}

.collx-card-logo {
    height: 1.2em;
    aspect-ratio: 413/115;
    background-image: url("../images/collx.svg");
    background-size: cover;
    display: inline-block;
    margin-left: 0.1em;
    margin-right: 0.1em;
    vertical-align: sub;
}

.page-shell {
    width: min(1400px, calc(100vw - 24px));
    margin: 0 auto;
    padding: 18px 0 36px;
}

.hero {
    position: relative;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 228, 0.94));
    box-shadow: 0 20px 60px var(--shadow);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -48% auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(200, 107, 26, 0.14), transparent 72%);
}

.hero-back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding-top: 24px;
}

.hero-banner {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    width: 100%;
    align-items: center;
}

.hero-banner-image {
    text-align: center;
}

.hero-banner-image img,
.hero-copy-block {
    width: clamp(300px, 90vw, 980px);
}

.hero-copy-block {
    margin-left: auto;
    margin-right: auto;
    
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.6;
}

.hero-copy-block h1 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2rem, 3.8vw, 3rem);
    color: var(--accent-2);
}

.hero-copy-block p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.eyebrow {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(200, 107, 26, 0.1);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-meta {
    margin-top: 14px;
    color: var(--accent-2);
    font-weight: 600;
}

.action {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action:hover {
    transform: translateY(-1px);
}

.action-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px rgba(127, 47, 0, 0.2);
}

.action-secondary {
    color: var(--accent-2);
    background: rgba(127, 47, 0, 0.06);
    border-color: rgba(127, 47, 0, 0.12);
}

.dashboard {
    margin-top: 18px;
}

.panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel-strong);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(180px, 0.7fr) auto;
    gap: 12px;
    align-items: end;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.field input,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(127, 47, 0, 0.14);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.78);
    font: inherit;
    outline: none;
}

.field input::placeholder {
    color: rgba(61, 36, 18, 0.58);
}

.field input:focus,
.field select:focus {
    border-color: rgba(200, 107, 26, 0.55);
    box-shadow: 0 0 0 4px rgba(200, 107, 26, 0.14);
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.status {
    margin: 16px 0 0;
    color: var(--muted);
}

.status.error {
    color: #a11d1d;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.06);
}

.card-media {
    background: linear-gradient(135deg, rgba(127, 47, 0, 0.06), rgba(200, 107, 26, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    height: 350px;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 16px;
    max-height: 350px;
    cursor: pointer;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.card-title {
    margin: 0;
    font-size: 1rem;
    color: var(--accent-2);
}

.card-meta,
.card-price,
.card-note {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.45;
}

.card-price {
    font-weight: 700;
    color: var(--accent);
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.card-action {
    border: 1px solid rgba(127, 47, 0, 0.12);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--accent-2);
    background: rgba(127, 47, 0, 0.05);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.empty-state {
    margin-top: 18px;
    padding: 20px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.56);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(28, 17, 8, 0.65);
    z-index: 20;
}

.modal[aria-hidden="false"] {
    display: flex;
}

.modal-dialog {
    width: min(980px, 100%);
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 252, 246, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.modal-title {
    margin: 0;
    color: var(--accent-2);
}

.modal-caption {
    margin: 6px 0 0;
    color: var(--muted);
}

.modal-close {
    border: 0;
    background: transparent;
    color: var(--accent-2);
    font-size: 2rem;
    cursor: pointer;
}

.modal-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 16px;
    margin-top: 16px;
}

.modal-image-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(127, 47, 0, 0.08), rgba(200, 107, 26, 0.12));
}

.modal-image-shell img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-controls button {
    border: 1px solid rgba(127, 47, 0, 0.14);
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--accent-2);
    background: rgba(127, 47, 0, 0.06);
    font: inherit;
    cursor: pointer;
}

@media (max-width: 860px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

    .toolbar-actions {
        justify-content: flex-start;
    }

    .modal-stage {
        grid-template-columns: 1fr;
    }
}

.deeplink-modal .modal-dialog {
    width: min(900px, 100%);
}

.deeplink-modal-stage {
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
}

.deeplink-qr-shell {
    min-height: 280px;
    padding: 18px;
}

.deeplink-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--text);
}

.deeplink-instructions {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.deeplink-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 11px 16px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    text-decoration: none;
    font-weight: 700;
}

.deeplink-reasons {
    padding: 14px 16px;
    border: 1px solid rgba(127, 47, 0, 0.14);
    border-radius: 18px;
    background: rgba(127, 47, 0, 0.05);
}

.deeplink-reasons h3 {
    margin: 0 0 8px;
    color: var(--accent-2);
}

.deeplink-reasons p {
    margin: 0 0 6px;
    color: var(--muted);
    line-height: 1.5;
}

@media (max-width: 860px) {
    .deeplink-modal-stage {
        grid-template-columns: 1fr;
    }
}
