:root {
    --ink: #172033;
    --muted: #637083;
    --line: #e3e8f0;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --soft: #f5f7fb;
    --gold: #f59e0b;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    font-family: Tahoma, Arial, sans-serif;
    background: #fff;
}
a { color: inherit; text-decoration: none; }
.site-header, .site-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 18px clamp(18px, 4vw, 54px);
}
.site-header {
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(255,255,255,.96);
    z-index: 10;
}
.brand { color: var(--brand); font-size: 24px; font-weight: 800; }
nav { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
main { min-height: 72vh; }
.hero {
    align-items: end;
    background: linear-gradient(135deg, #eef5ff, #f8fafc);
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    padding: 48px clamp(18px, 4vw, 54px);
}
.eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
h1 { font-size: clamp(30px, 4vw, 52px); line-height: 1.12; margin: 8px 0 14px; }
h2 { font-size: 22px; margin-top: 28px; }
.hero p { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 760px; }
.search {
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    gap: 10px;
    padding: 10px;
}
.search input {
    border: 0;
    flex: 1;
    font-size: 16px;
    min-width: 0;
    outline: 0;
    padding: 12px;
}
button, .button {
    background: var(--brand);
    border: 0;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    padding: 12px 18px;
}
button:hover, .button:hover { background: var(--brand-dark); }
.secondary {
    border: 1px solid var(--line);
    color: var(--brand);
    display: inline-block;
    font-weight: 700;
    margin-top: 10px;
    padding: 11px 16px;
}
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 22px clamp(18px, 4vw, 54px) 0;
}
.filters a, .term-list span {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    padding: 8px 12px;
}
.grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    padding: 28px clamp(18px, 4vw, 54px) 54px;
}
.card {
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { box-shadow: 0 16px 36px rgba(15,23,42,.12); transform: translateY(-3px); }
.card img {
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    display: block;
    object-fit: contain;
    width: 100%;
}
.card-body { padding: 15px; }
.card h2 { font-size: 17px; line-height: 1.45; margin: 0 0 8px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.55; min-height: 44px; }
.meta { align-items: center; display: flex; justify-content: space-between; gap: 12px; }
.meta span { color: var(--muted); font-size: 13px; }
.meta strong, .price { color: var(--gold); font-weight: 800; }
.price { font-size: 32px; margin: 18px 0; }
.product {
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    padding: 38px clamp(18px, 4vw, 54px) 60px;
}
.cover {
    background: #f8fafc;
    border: 1px solid var(--line);
    display: block;
    max-height: 78vh;
    object-fit: contain;
    width: 100%;
}
.preview-button, .thumb-button {
    background: transparent;
    border: 0;
    color: var(--muted);
    display: block;
    padding: 0;
    position: relative;
    width: 100%;
}
.preview-button:hover, .thumb-button:hover { background: transparent; }
.preview-button span {
    background: rgba(15, 23, 42, .78);
    bottom: 12px;
    color: #fff;
    font-size: 13px;
    left: 12px;
    padding: 7px 10px;
    position: absolute;
}
.thumbs {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 12px;
}
.thumbs img {
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border: 1px solid var(--line);
    object-fit: contain;
    width: 100%;
}
.summary, .product-info p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}
.term-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.notice, .empty {
    background: var(--soft);
    border: 1px solid var(--line);
    line-height: 1.7;
    margin-top: 20px;
    padding: 16px;
}
.notice.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}
.buy-panel {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.product-copy {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}
.copy-block {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}
.copy-block h2 {
    font-size: 20px;
    margin: 0 0 10px;
}
.copy-block p, .copy-block li {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}
.copy-block ul {
    margin: 0;
    padding-left: 22px;
}
.copy-block li + li { margin-top: 6px; }
.lightbox {
    align-items: center;
    background: rgba(15, 23, 42, .9);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 28px;
    position: fixed;
    z-index: 100;
}
.lightbox[aria-hidden="false"] { display: flex; }
.lightbox img {
    background: #fff;
    max-height: 92vh;
    max-width: 96vw;
    object-fit: contain;
}
.lightbox-close {
    background: #fff;
    border-radius: 999px;
    color: var(--ink);
    font-size: 26px;
    height: 44px;
    padding: 0;
    position: fixed;
    right: 22px;
    top: 18px;
    width: 44px;
}
.lightbox-close:hover { background: #e5e7eb; }
.order, .policy, .messages, .empty {
    margin: 36px auto;
    max-width: 920px;
    padding: 0 20px;
}
.policy li { line-height: 1.8; }
.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}
.shop-hero, .seller-wrap {
    padding: 38px clamp(18px, 4vw, 54px);
}
.shop-hero {
    align-items: center;
    background: linear-gradient(135deg, #eef5ff, #fff);
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 320px;
}
.shop-card {
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    gap: 12px;
    padding: 22px;
}
.shop-card span, .seller-head p, .product-mini span {
    color: var(--muted);
}
.seller-wrap.narrow { max-width: 900px; }
.seller-head {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
}
.seller-head h1 { margin-bottom: 8px; }
.seller-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dashboard-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 0;
}
.dashboard-stats div {
    border: 1px solid var(--line);
    padding: 18px;
}
.dashboard-stats strong {
    display: block;
    font-size: 24px;
}
.dashboard-stats span { color: var(--muted); }
.table-wrap {
    border: 1px solid var(--line);
    overflow-x: auto;
}
.seller-table {
    border-collapse: collapse;
    min-width: 850px;
    width: 100%;
}
.seller-table th, .seller-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}
.seller-table th {
    background: var(--soft);
    color: var(--muted);
    font-size: 13px;
}
.product-mini {
    align-items: center;
    display: flex;
    gap: 12px;
}
.product-mini img {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    object-fit: cover;
    width: 62px;
}
.product-mini strong, .product-mini span { display: block; }
.right { text-align: right !important; }
.compact {
    margin: 0;
    padding: 8px 12px;
}
.status-pill {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-block;
    padding: 6px 10px;
}
.seller-form {
    border: 1px solid var(--line);
    display: grid;
    gap: 16px;
    padding: 22px;
}
.seller-form label {
    color: var(--ink);
    display: grid;
    font-weight: 600;
    gap: 8px;
}
.seller-form input, .seller-form textarea, .seller-form select {
    border: 1px solid var(--line);
    color: var(--ink);
    font: inherit;
    padding: 12px;
    width: 100%;
}
.seller-form textarea { line-height: 1.7; }
.product-editor {
    align-items: start;
    grid-template-columns: 320px minmax(0, 1fr);
}
.editor-preview img {
    border: 1px solid var(--line);
    display: block;
    width: 100%;
}
.editor-fields {
    display: grid;
    gap: 16px;
}
.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.check-row {
    align-items: center;
    display: flex !important;
    font-weight: 400 !important;
}
.check-row input { width: auto; }
.upload-rules {
    border: 1px solid var(--line);
    padding: 18px;
}
.upload-rules h2 { margin-top: 0; }
.upload-rules li {
    color: var(--muted);
    line-height: 1.8;
}
.choice-panel {
    border: 1px solid var(--line);
    margin: 0;
    padding: 16px;
}
.choice-panel legend {
    color: var(--ink);
    font-weight: 700;
    padding: 0 8px;
}
.choice-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.choice-grid label {
    align-items: center;
    border: 1px solid var(--line);
    display: flex;
    font-weight: 400;
    gap: 8px;
    padding: 9px 10px;
}
.choice-grid input { width: auto; }
.product-create-wrap {
    max-width: 1320px;
    margin: 0 auto;
}
.product-create-form {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 330px;
}
.create-main {
    display: grid;
    gap: 18px;
}
.form-step, .side-card {
    border: 1px solid var(--line);
    padding: 20px;
}
.form-step {
    position: relative;
}
.form-step h2, .side-card h2 {
    font-size: 20px;
    margin: 0 0 16px;
}
.step-badge {
    align-items: center;
    background: var(--brand);
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    margin-bottom: 10px;
    width: 28px;
}
.slug-note {
    background: #f8fafc;
    border: 1px solid var(--line);
    color: var(--muted);
    line-height: 1.7;
    margin-top: 12px;
    padding: 12px;
}
.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.seller-form small, .product-create-form small {
    color: var(--muted);
    font-weight: 400;
}
.product-create-form label {
    color: var(--ink);
    display: grid;
    font-weight: 500;
    gap: 8px;
}
.product-create-form input,
.product-create-form textarea,
.product-create-form select {
    border: 1px solid var(--line);
    color: var(--ink);
    font: inherit;
    padding: 12px;
    width: 100%;
}
.product-create-form textarea {
    line-height: 1.7;
}
.create-side {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 86px;
}
.side-card p, .side-card li {
    color: var(--muted);
    line-height: 1.7;
}
.side-card ul {
    margin-bottom: 0;
    padding-left: 20px;
}
.choice-chip {
    display: block !important;
    font-weight: 500 !important;
}
.choice-chip input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.choice-chip span {
    border: 1px solid var(--line);
    align-items: center;
    display: flex;
    gap: 9px;
    padding: 10px 12px;
}
.choice-chip input:checked + span {
    background: #eff6ff;
    border-color: var(--brand);
    color: var(--brand-dark);
}
.color-dot {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    display: inline-block;
    height: 18px;
    flex: 0 0 18px;
    width: 18px;
}
.color-choice-grid .choice-chip span {
    min-height: 42px;
}
.preview-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    grid-column: 1 / -1;
    line-height: 1.7;
    padding: 12px 14px;
}
.preview-banner a {
    color: var(--brand);
    font-weight: 700;
    margin-left: 10px;
}
.muted-button {
    background: #64748b;
}
.muted-button:hover {
    background: #475569;
}
.category-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.side-check {
    align-items: flex-start;
    border: 1px solid var(--line);
    padding: 14px;
}
.full-button {
    width: 100%;
}
@media (max-width: 820px) {
    .hero, .product, .shop-hero, .product-editor { grid-template-columns: 1fr; }
    .site-header, .site-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
    .seller-head { align-items: flex-start; flex-direction: column; }
    .dashboard-stats, .form-grid { grid-template-columns: 1fr; }
    .product-create-form { grid-template-columns: 1fr; }
    .create-side { position: static; }
    .form-grid.two { grid-template-columns: 1fr; }
}
