/* ===== Web3 Commerce — Dark Luxury Boutique ===== */
:root {
    --ink: #0c0b09;
    --ink-soft: #14120e;
    --ink-card: #1a1713;
    --ink-raised: #211d17;
    --line: #2e2921;
    --line-gold: rgba(201, 169, 98, 0.35);
    --text: #efe9dd;
    --text-soft: #a89e8c;
    --gold: #c9a962;
    --gold-bright: #e8cf94;
    --gold-deep: #9a7b3c;
    --danger: #d97b6f;
    --ok: #9dbb8f;
    --warn: #d4b168;
    --radius: 4px;
    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
}

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

body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(201, 169, 98, 0.07), transparent 60%),
        radial-gradient(900px 500px at 0% 100%, rgba(201, 169, 98, 0.04), transparent 55%),
        var(--ink);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-bright); text-decoration: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ===== Header ===== */
.network-bar {
    background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.1), transparent);
    border-bottom: 1px solid rgba(201, 169, 98, 0.12);
    color: var(--gold);
    text-align: center;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 7px 10px;
}
.site-header {
    background: rgba(12, 11, 9, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px; flex-wrap: wrap; gap: 14px;
    max-width: 1180px; margin: 0 auto;
}
.logo {
    font-family: var(--serif);
    font-size: 1.45rem; font-weight: 700;
    color: var(--text); letter-spacing: 0.04em;
}
.logo:hover { color: var(--gold-bright); }
.nav { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.nav a {
    color: var(--text-soft); font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase;
    padding-bottom: 2px; border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--gold-bright); border-bottom-color: var(--line-gold); }
.badge {
    background: var(--gold); color: var(--ink);
    border-radius: 999px; padding: 1px 8px;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0;
    vertical-align: middle; margin-left: 4px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block; border: 1px solid transparent; border-radius: var(--radius);
    padding: 12px 26px; font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    cursor: pointer; font-family: var(--sans);
    transition: all 0.25s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
    color: #191505; border-color: var(--gold-deep);
    box-shadow: 0 6px 24px -8px rgba(201, 169, 98, 0.45);
}
.btn-primary:hover {
    box-shadow: 0 10px 32px -8px rgba(201, 169, 98, 0.65);
    filter: brightness(1.07);
}
.btn-primary:disabled {
    background: var(--ink-raised); color: #6b6353; border-color: var(--line);
    box-shadow: none; cursor: not-allowed; filter: none;
}
.btn-connect {
    background: transparent; color: var(--gold);
    border: 1px solid var(--line-gold);
}
.btn-connect:hover { background: rgba(201, 169, 98, 0.08); border-color: var(--gold); color: var(--gold-bright); }
.btn-connect.connected { border-color: var(--gold); color: var(--gold-bright); background: rgba(201, 169, 98, 0.1); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(217, 123, 111, 0.4); }
.btn-danger:hover { background: rgba(217, 123, 111, 0.08); border-color: var(--danger); }
.btn-disabled {
    background: var(--ink-raised); color: #6b6353; border: 1px solid var(--line);
    cursor: not-allowed;
}
.btn-small { padding: 7px 14px; font-size: 0.66rem; }
.btn-lg { padding: 16px 34px; font-size: 0.82rem; width: 100%; margin-top: 14px; }

/* ===== Hero ===== */
main { flex: 1; padding: 40px 28px 90px; }
.hero { text-align: center; padding: 72px 0 30px; }
.hero-eyebrow {
    display: inline-block;
    color: var(--gold); font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.34em; text-transform: uppercase;
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    font-weight: 600; line-height: 1.12;
    color: var(--text);
}
.hero h1 em {
    font-style: italic; font-weight: 500;
    background: linear-gradient(110deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hero p {
    color: var(--text-soft); max-width: 520px;
    margin: 22px auto 0; font-size: 1.02rem; font-weight: 300;
}
.hero-rule {
    width: 72px; height: 1px; margin: 38px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ===== Filter chips ===== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 34px 0 48px; }
.chip {
    padding: 8px 22px; border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-soft); font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    transition: all 0.25s;
}
.chip:hover { border-color: var(--line-gold); color: var(--gold-bright); }
.chip.active { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* ===== Product grid ===== */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 28px;
}
.product-card {
    background: linear-gradient(180deg, var(--ink-card), var(--ink-soft));
    border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column;
    position: relative;
}
.product-card::after {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-gold);
    box-shadow: var(--shadow);
}
.product-card:hover::after { opacity: 1; }
.product-image { display: block; aspect-ratio: 4/3; background: var(--ink-raised); overflow: hidden; }
.product-image img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.6s ease;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.image-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; color: rgba(201, 169, 98, 0.22);
}
.image-placeholder.large { aspect-ratio: 4/3; font-size: 6rem; }
.product-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-category {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.28em;
    color: var(--gold); font-weight: 700;
}
.product-name {
    color: var(--text); font-family: var(--serif);
    font-weight: 600; font-size: 1.22rem; line-height: 1.3;
}
.product-name:hover { color: var(--gold-bright); }
.product-prices { display: flex; align-items: baseline; gap: 12px; margin-top: auto; padding-top: 8px; }
.product-prices.large { font-size: 1.3rem; margin: 16px 0 6px; }
.price-main { color: var(--gold-bright); font-weight: 700; letter-spacing: 0.03em; }

/* ===== Product detail ===== */
.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; padding-top: 28px; align-items: start; }
@media (max-width: 800px) { .product-detail { grid-template-columns: 1fr; gap: 32px; } }
.product-detail-image {
    background: var(--ink-card); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.product-detail-image img { width: 100%; display: block; }
.product-detail-info h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 10px 0 6px; line-height: 1.15; }
.stock-info {
    color: var(--text-soft); margin-bottom: 16px;
    font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.stock-info strong { color: var(--gold-bright); }
.product-description { color: var(--text-soft); margin-bottom: 30px; font-weight: 300; font-size: 1.02rem; }
.qty-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.qty-row label { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-soft); }
.qty-row input, .qty-input {
    width: 84px; padding: 12px; background: var(--ink-raised);
    border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
    font-family: var(--sans); font-size: 0.95rem; text-align: center;
    transition: border-color 0.2s;
}
.qty-row input:focus, .qty-input:focus { outline: none; border-color: var(--gold); }

/* ===== Tables & cart ===== */
.table {
    width: 100%; border-collapse: collapse;
    background: var(--ink-card); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
}
.table th, .table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.table th {
    background: var(--ink-soft); color: var(--gold);
    font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.24em; font-weight: 700;
}
.table td { font-size: 0.95rem; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(201, 169, 98, 0.03); }

.checkout-panel {
    margin-top: 40px;
    background: linear-gradient(180deg, var(--ink-card), var(--ink-soft));
    border: 1px solid var(--line-gold);
    border-radius: var(--radius); padding: 36px; max-width: 560px;
    box-shadow: var(--shadow);
}
.checkout-panel h2 { margin-bottom: 24px; font-size: 1.7rem; }
.form-row { margin-bottom: 20px; }
.form-row > label {
    display: block; margin-bottom: 10px; color: var(--text-soft);
    font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700;
}
.currency-choice { display: flex; gap: 14px; }
.radio-card {
    flex: 1; display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px; cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
}
.radio-card:hover { border-color: var(--line-gold); }
.radio-card:has(input:checked) { border-color: var(--gold); background: rgba(201, 169, 98, 0.07); }
.radio-card.selected { border-color: var(--gold); background: rgba(201, 169, 98, 0.07); cursor: default; }
.radio-card input { accent-color: var(--gold); }
.radio-card strong { font-family: var(--serif); font-size: 1.1rem; letter-spacing: 0.03em; }
.radio-card small { color: var(--text-soft); font-size: 0.72rem; letter-spacing: 0.06em; }
.checkout-total { font-size: 1.05rem; margin: 22px 0 8px; color: var(--text-soft); }
.checkout-total strong { font-family: var(--serif); font-size: 1.5rem; color: var(--gold-bright); margin-left: 6px; }
.checkout-status { margin-top: 18px; font-size: 0.92rem; line-height: 1.6; }
.checkout-status.info { color: var(--warn); }
.checkout-status.ok { color: var(--ok); }
.checkout-status.err { color: var(--danger); }

/* ===== Orders ===== */
.order-card {
    background: linear-gradient(180deg, var(--ink-card), var(--ink-soft));
    border: 1px solid var(--line);
    border-radius: var(--radius); padding: 26px 30px; margin-bottom: 20px;
    transition: border-color 0.25s;
}
.order-card:hover { border-color: var(--line-gold); }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.order-head strong { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.05em; }
.order-meta { color: var(--text-soft); font-size: 0.85rem; margin: 8px 0; font-weight: 300; }
.order-items { list-style: none; color: var(--text-soft); font-size: 0.92rem; margin: 10px 0; }
.order-items li { padding: 2px 0; }
.order-items li::before { content: '\2014\00a0'; color: var(--gold); }
.order-tx { font-size: 0.85rem; }
.order-fail { color: var(--danger); font-size: 0.85rem; margin-top: 8px; }

.status-badge {
    display: inline-block; padding: 5px 16px; border-radius: 999px;
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase;
    border: 1px solid transparent;
}
.st-pending, .st-awaiting { background: rgba(212, 177, 104, 0.1); color: var(--warn); border-color: rgba(212, 177, 104, 0.3); }
.st-paid, .st-completed { background: rgba(157, 187, 143, 0.1); color: var(--ok); border-color: rgba(157, 187, 143, 0.3); }
.st-shipped { background: rgba(201, 169, 98, 0.12); color: var(--gold-bright); border-color: var(--line-gold); }
.st-cancelled { background: rgba(168, 158, 140, 0.08); color: var(--text-soft); border-color: var(--line); }
.st-failed { background: rgba(217, 123, 111, 0.1); color: var(--danger); border-color: rgba(217, 123, 111, 0.3); }

/* ===== Misc ===== */
.empty-note { color: var(--text-soft); padding: 44px 0; text-align: center; font-weight: 300; font-size: 1.02rem; }
.muted { color: var(--text-soft); font-size: 0.9rem; font-weight: 300; }
.alert {
    border-radius: var(--radius); padding: 14px 20px; margin-bottom: 22px;
    font-size: 0.9rem; border: 1px solid;
}
.alert-warn { background: rgba(212, 177, 104, 0.07); color: var(--warn); border-color: rgba(212, 177, 104, 0.25); }
.alert-ok { background: rgba(157, 187, 143, 0.07); color: var(--ok); border-color: rgba(157, 187, 143, 0.25); }
.alert-err { background: rgba(217, 123, 111, 0.07); color: var(--danger); border-color: rgba(217, 123, 111, 0.25); }

.site-footer {
    background: var(--ink-soft); border-top: 1px solid var(--line);
    color: var(--text-soft); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
    text-align: center; padding: 30px 0;
}

/* ===== Admin ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px; background: var(--ink-soft); border-right: 1px solid var(--line);
    padding: 30px 0; flex-shrink: 0;
}
.admin-sidebar .logo { display: block; padding: 0 26px 26px; font-size: 1.25rem; }
.admin-sidebar nav a {
    display: block; padding: 13px 26px; color: var(--text-soft);
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}
.admin-sidebar nav a:hover { color: var(--gold-bright); background: rgba(201, 169, 98, 0.04); }
.admin-sidebar nav a.active {
    color: var(--gold-bright); background: rgba(201, 169, 98, 0.07);
    border-left-color: var(--gold);
}
.admin-main { flex: 1; padding: 40px 46px; min-width: 0; }
.admin-main h1 { margin-bottom: 26px; font-size: 2.1rem; }
.admin-main h2 { font-size: 1.35rem; }
@media (max-width: 860px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 36px; }
.stat-card {
    background: linear-gradient(180deg, var(--ink-card), var(--ink-soft));
    border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--gold-deep));
    opacity: 0.6;
}
.stat-card .stat-label {
    color: var(--text-soft); font-size: 0.62rem;
    text-transform: uppercase; letter-spacing: 0.26em; font-weight: 700;
}
.stat-card .stat-value { font-family: var(--serif); font-size: 1.75rem; font-weight: 700; margin-top: 8px; color: var(--gold-bright); }
.stat-card .stat-value .muted { font-size: 1rem; }

.form-card {
    background: linear-gradient(180deg, var(--ink-card), var(--ink-soft));
    border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; max-width: 680px;
}
.form-card .form-row input[type="text"],
.form-card .form-row input[type="number"],
.form-card .form-row input[type="password"],
.form-card .form-row select,
.form-card .form-row textarea {
    width: 100%; padding: 12px 14px; background: var(--ink-raised);
    border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
    font-family: var(--sans); font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-card .form-row textarea { min-height: 120px; resize: vertical; }
.form-card .form-row input:focus, .form-card .form-row select:focus, .form-card .form-row textarea:focus {
    outline: none; border-color: var(--gold);
}
.form-card .form-row input[type="file"] { color: var(--text-soft); font-size: 0.85rem; }
.form-actions { display: flex; gap: 12px; margin-top: 22px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; border-color: var(--line-gold); box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.9rem; }
.table-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius); display: block; }
.inline-form { display: inline; }
.mono { font-family: Consolas, 'Courier New', monospace; font-size: 0.82em; letter-spacing: 0; }
