:root {
  --bg: #050505;
  --panel: #111214;
  --panel-2: #18191c;
  --text: #f7f7f8;
  --muted: #9ea0a7;
  --line: #292b31;
  --cyan: #18e3ec;
  --pink: #ff2e63;
  --danger: #ff5b67;
  --success: #4ce38a;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.public-page { min-height: 100vh; background: radial-gradient(circle at 20% 0%, rgba(24,227,236,.11), transparent 32%), radial-gradient(circle at 85% 4%, rgba(255,46,99,.12), transparent 30%), #050505; }
.catalog-shell { width: min(100%, 760px); margin: 0 auto; padding: 26px 18px 60px; }
.brand-header { text-align: center; padding: 10px 0 24px; }
.brand-logo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 12px 35px rgba(0,0,0,.4); }
.brand-header h1 { font-size: 30px; margin: 14px 0 4px; letter-spacing: -.04em; }
.brand-header p { color: #bfc1c7; margin: 0; font-size: 15px; }
.search-section { position: sticky; top: 0; z-index: 10; padding: 10px 0 14px; background: linear-gradient(to bottom, rgba(5,5,5,.98) 78%, transparent); }
.search-box { display: flex; align-items: center; gap: 10px; border: 1px solid #2d2f35; background: #111216; border-radius: 16px; height: 52px; padding: 0 15px; box-shadow: 0 8px 30px rgba(0,0,0,.22); }
.search-box span { color: var(--cyan); font-size: 24px; transform: rotate(-20deg); }
.search-box input { flex: 1; background: transparent; border: 0; outline: 0; color: white; min-width: 0; font-size: 15px; }
.search-box input::placeholder { color: #777b84; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 1px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid #2d2f35; color: #c9cbd0; background: #111216; padding: 9px 14px; border-radius: 999px; }
.chip.active { color: #040404; border-color: transparent; background: linear-gradient(90deg, var(--cyan), #fff 48%, var(--pink)); font-weight: 800; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 6px; }
.product-card { overflow: hidden; background: linear-gradient(180deg, #15161a, #101114); border: 1px solid #25272d; border-radius: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.22); }
.product-card[hidden] { display: none; }
.product-image-wrap { display: block; position: relative; aspect-ratio: 1 / 1; background: #ededed; overflow: hidden; }
.product-image { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.product-card:hover .product-image { transform: scale(1.025); }
.image-placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-size: 48px; background: #1a1b1f; }
.featured-badge { position: absolute; left: 9px; top: 9px; font-size: 10px; font-weight: 900; letter-spacing: .08em; color: #050505; padding: 6px 8px; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--pink)); }
.product-body { padding: 13px; }
.product-category { color: var(--cyan); text-transform: uppercase; letter-spacing: .09em; font-weight: 800; font-size: 10px; margin-bottom: 6px; }
.product-body h2 { margin: 0; font-size: 15px; line-height: 1.28; letter-spacing: -.02em; min-height: 38px; }
.product-price { margin: 9px 0 0; font-size: 19px; font-weight: 900; }
.product-button { margin-top: 12px; display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 12px; background: white; color: #090909; font-size: 12px; font-weight: 900; letter-spacing: .03em; }
.site-footer { text-align: center; color: #676a72; font-size: 12px; padding-top: 32px; }
.empty-state { padding: 40px 16px; text-align: center; color: #92959d; }

.admin-bg { min-height: 100vh; background: #090a0c; }
.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 80px; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--cyan); font-size: 11px; letter-spacing: .14em; font-weight: 900; }
.admin-header h1, .form-card h1, .login-card h1 { margin: 7px 0 4px; letter-spacing: -.04em; }
.admin-header p, .form-card > p, .login-card > p { margin: 0; color: var(--muted); }
.admin-header-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; justify-content: flex-end; }
.primary-button, .secondary-button, .ghost-button, .small-button { border: 0; border-radius: 12px; font-weight: 900; letter-spacing: .025em; display: inline-flex; align-items: center; justify-content: center; }
.primary-button { min-height: 44px; padding: 0 17px; color: #050505; background: linear-gradient(90deg, var(--cyan), #f4f4f4 48%, var(--pink)); }
.secondary-button { min-height: 44px; padding: 0 15px; border: 1px solid var(--line); background: #15161a; color: #f2f2f3; }
.ghost-button { min-height: 42px; padding: 0 12px; background: transparent; color: #a5a8af; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #121317; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 29px; }
.admin-panel { border: 1px solid var(--line); background: #111216; border-radius: 20px; overflow: hidden; }
.panel-title-row { padding: 20px; border-bottom: 1px solid var(--line); }
.panel-title-row h2 { margin: 0 0 3px; font-size: 18px; }
.panel-title-row p { margin: 0; color: var(--muted); font-size: 13px; }
.product-list { padding: 8px; }
.admin-product { display: grid; grid-template-columns: 30px 66px minmax(180px, 1fr) auto auto; gap: 13px; align-items: center; margin: 7px 0; padding: 10px; border: 1px solid transparent; border-radius: 15px; background: #17181c; }
.admin-product:hover { border-color: #2a2d33; }
.admin-product.dragging { opacity: .4; }
.drag-handle { cursor: grab; color: #6f727a; text-align: center; font-size: 21px; user-select: none; }
.admin-thumb { width: 66px; height: 66px; border-radius: 11px; object-fit: cover; background: #23252a; }
.admin-thumb.placeholder { display: grid; place-items: center; }
.admin-product-title { font-weight: 800; }
.admin-product-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: 12px; }
.admin-product-meta span:not(:last-child)::after { content: '•'; margin-left: 6px; color: #484b52; }
.status-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 900; background: #22242a; color: #b3b6bd; }
.tag.success { color: var(--success); background: rgba(76,227,138,.09); }
.tag.highlight { color: var(--pink); background: rgba(255,46,99,.09); }
.row-actions { display: flex; gap: 6px; }
.row-actions form { margin: 0; }
.small-button { min-height: 35px; padding: 0 11px; background: #23252b; color: #e8e9ea; font-size: 12px; }
.small-button.danger { color: #ff7b84; }
.empty-admin { padding: 36px; text-align: center; color: var(--muted); }
.save-status { color: var(--success); font-size: 12px; min-height: 28px; padding: 3px 18px 10px; text-align: right; }

.login-card { width: min(430px, calc(100% - 32px)); margin: 9vh auto 0; background: #121317; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.login-logo { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; }
.stack-form { display: grid; gap: 14px; margin-top: 22px; }
.stack-form label, .form-grid label { display: grid; gap: 7px; color: #d7d8dc; font-size: 13px; font-weight: 700; }
.stack-form input, .form-grid input { width: 100%; min-height: 48px; border: 1px solid #33363d; border-radius: 12px; background: #0d0e11; color: white; outline: 0; padding: 0 13px; }
.stack-form input:focus, .form-grid input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(24,227,236,.07); }
.alert { margin-top: 16px; border: 1px solid rgba(255,91,103,.32); background: rgba(255,91,103,.08); color: #ff8b93; border-radius: 12px; padding: 12px; font-size: 13px; }

.form-shell { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 70px; }
.back-link { display: inline-block; color: #a9abb1; font-size: 13px; margin-bottom: 16px; }
.form-card { background: #121317; border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.product-form { margin-top: 22px; }
.upload-box { min-height: 210px; display: grid; place-items: center; text-align: center; border: 1px dashed #3b3e46; border-radius: 16px; overflow: hidden; background: #0c0d0f; cursor: pointer; position: relative; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box img { width: 100%; height: 260px; object-fit: contain; background: #0a0b0d; }
.upload-box span { display: grid; gap: 4px; color: #d6d7da; }
.upload-box small { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.optional { font-weight: 500; color: #777a82; }
.toggle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.toggle-item { display: flex; align-items: flex-start; gap: 11px; background: #18191d; border: 1px solid #292b31; border-radius: 14px; padding: 14px; }
.toggle-item input { margin-top: 4px; accent-color: var(--cyan); width: 17px; height: 17px; }
.toggle-item span { display: grid; gap: 3px; }
.toggle-item small { color: var(--muted); font-size: 12px; }
.primary-button.large { width: 100%; min-height: 52px; }

@media (max-width: 760px) {
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-header-actions { justify-content: flex-start; width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .admin-product { grid-template-columns: 22px 56px 1fr; }
  .admin-thumb { width: 56px; height: 56px; }
  .status-tags, .row-actions { grid-column: 3; justify-content: flex-start; }
  .row-actions { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .catalog-shell { padding-left: 12px; padding-right: 12px; }
  .brand-logo { width: 96px; height: 96px; }
  .brand-header h1 { font-size: 27px; }
  .product-grid { gap: 10px; }
  .product-body { padding: 11px; }
  .product-body h2 { font-size: 14px; }
  .product-price { font-size: 17px; }
  .product-button { font-size: 11px; }
  .form-grid, .toggle-row { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .form-card { padding: 18px; }
}
