:root {
    --ink: #172026;
    --muted: #65717a;
    --line: #dbe2e7;
    --ring: rgba(23, 32, 38, 0.08);
    --paper: #ffffff;
    --soft: #f3f6f8;
    --brand: #d71920;
    --brand-dark: #7b1f47;
    --accent: #007b83;
    --ok: #177245;
    --warning: #f5b942;
    --shadow: 0 18px 45px rgba(20, 31, 40, 0.12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

body.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.site > main {
    flex: 1 0 auto;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    padding: 0.78rem 0.85rem;
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: 0.4rem;
    font-weight: 700;
    color: #26323a;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.82rem;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 0.83rem;
    text-transform: uppercase;
}

.button,
button {
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.72rem 1rem;
    font-weight: 800;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button svg,
button svg,
.header-actions svg,
.admin-sidebar svg {
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.button,
button,
.header-actions a,
.admin-sidebar nav a {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

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

.button.primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 22px rgba(215, 25, 32, 0.18);
}

.button.ghost {
    background: #eef3f5;
    color: var(--ink);
}

.button.ghost.danger {
    background: #fff0f0;
    color: var(--brand);
}

.button.light {
    background: #fff;
    color: #1b2025;
}

.button.outline-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.button.full,
.button.wide {
    width: 100%;
}

.eyebrow {
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0 0 0.25rem;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(20, 31, 40, 0.04);
}

.header-main {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
    min-height: 68px;
    padding: 0.55rem 1rem;
    position: relative;
}

.brand {
    align-items: center;
    display: inline-flex;
    gap: 0.62rem;
    min-width: 0;
}

.brand-mark {
    align-items: center;
    background: transparent;
    border: 0;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.brand-mark img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 0.75rem;
    margin-top: -0.12rem;
}

.header-search {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: none;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.5rem);
    width: min(520px, calc(100vw - 2rem));
    z-index: 30;
}

.header-search.is-open {
    display: grid;
}

.header-search input {
    min-width: 0;
    min-height: 40px;
    padding: 0.62rem 0.75rem;
}

.header-search button {
    background: var(--ink);
    color: #fff;
    min-height: 40px;
    padding: 0.58rem 0.85rem;
}

.header-actions {
    align-items: center;
    display: flex;
    gap: 0.35rem;
    font-weight: 800;
    margin-left: auto;
}

.header-actions a,
.nav-icon-button {
    background: #fff;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #2d3941;
    min-height: 38px;
    padding: 0.48rem 0.62rem;
    white-space: nowrap;
}

.header-actions a:hover,
.nav-icon-button:hover,
.nav-icon-button[aria-expanded="true"] {
    background: #f7f9fa;
    border-color: var(--line);
    box-shadow: 0 0 0 4px var(--ring);
    transform: none;
}

.hero {
    background: linear-gradient(125deg, #37206d 0%, #a4264f 48%, #df2b19 100%);
    color: #fff;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    margin: 1rem auto 0.55rem;
    max-width: 1180px;
    min-height: 330px;
    overflow: hidden;
    padding: clamp(1.2rem, 4vw, 3.2rem);
    position: relative;
}

.hero.hero-image-only {
    background: transparent;
    display: block;
    margin: 1.25rem auto 0.85rem;
    min-height: 0;
    padding: 0 1rem;
}

.hero.hero-image-only::after {
    display: none;
}

.hero-viewport {
    aspect-ratio: 1180 / 390;
    background: #172026;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.hero-slide {
    display: block;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.7s ease;
    visibility: hidden;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.hero-slide img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.hero-arrow {
    align-items: center;
    background: rgba(223, 43, 25, 0.92);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    height: 44px;
    justify-content: center;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.25s ease, background 0.2s ease;
    width: 44px;
    z-index: 2;
}

.hero-arrow:hover {
    background: #df2b19;
    transform: translateY(-50%);
}

.hero-arrow:focus-visible {
    opacity: 1;
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.hero-viewport:hover .hero-arrow,
.hero-viewport:focus-within .hero-arrow {
    opacity: 1;
}

.hero-arrow i,
.hero-arrow svg {
    height: 22px;
    width: 22px;
}

.hero-arrow-prev {
    left: 14px;
}

.hero-arrow-next {
    right: 14px;
}

.hero::after {
    background: rgba(255, 255, 255, 0.1);
    content: "";
    height: 100%;
    position: absolute;
    right: 34%;
    top: 0;
    transform: skewX(-18deg);
    width: 16%;
}

.hero-copy,
.hero-media {
    position: relative;
    z-index: 1;
}

.hero-logo {
    background: #fff;
    border-radius: 3px;
    color: var(--ink);
    display: inline-flex;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.1rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4.1rem);
    line-height: 1.02;
    margin: 0;
    max-width: 780px;
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    font-weight: 700;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-media {
    align-items: center;
    display: flex;
    justify-content: center;
}

.hero-media img {
    aspect-ratio: 1;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
    height: min(300px, 70vw);
    object-fit: cover;
    width: min(300px, 70vw);
}

.hero-thumbs {
    display: flex;
    gap: 0.75rem;
    margin: 0 auto 1.25rem;
    max-width: 1180px;
    overflow-x: auto;
    padding: 0 1rem 0.5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.hero-thumbs::-webkit-scrollbar {
    display: none;
}

.hero-thumbs.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.hero-thumbs.is-dragging .hero-thumb {
    pointer-events: none;
}

.hero-thumb {
    appearance: none;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    display: block;
    flex: 0 0 calc((100% - (var(--hero-thumbs-per-view, 4) - 1) * 0.75rem) / var(--hero-thumbs-per-view, 4));
    margin: 0;
    overflow: hidden;
    padding: 0;
    scroll-snap-align: start;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-thumb img {
    aspect-ratio: 1180 / 390;
    display: block;
    height: auto;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    width: 100%;
}

.hero-thumb:hover {
    transform: none;
}

.hero-thumb:hover img,
.hero-thumb:focus-visible img {
    opacity: 1;
}

.hero-thumb:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.hero-thumb.is-active {
    border-color: var(--brand);
    box-shadow: 0 8px 18px rgba(215, 25, 32, 0.22);
}

.hero-thumb.is-active img {
    opacity: 1;
}

.catalog-shell {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: 280px minmax(0, 1fr);
    margin: 0 auto 3rem;
    max-width: 1180px;
    padding: 0 1rem;
}

.filters-panel,
.admin-card,
.login-card,
.setup-card,
.stat-card,
.empty-state {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.filters-panel {
    padding: 1rem;
    position: sticky;
    top: 96px;
}

.filter-panel-head,
.mobile-filter-trigger {
    display: none;
}

.filter-backdrop {
    display: none;
}

.filters-panel form,
.stack-form {
    display: grid;
    gap: 1rem;
}

.filter-block {
    display: grid;
    gap: 0.45rem;
}

.filter-block label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.product-section {
    min-width: 0;
}

.section-heading,
.admin-card-head,
.admin-topbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-heading h1,
.admin-topbar h1,
.login-card h1,
.setup-card h1 {
    margin: 0;
}

.section-heading span {
    color: var(--muted);
    font-weight: 800;
}

.section-tools {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.admin-result-summary {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-weight: 800;
    gap: 0.45rem 0.75rem;
    margin: -0.25rem 0 0.9rem;
}

.admin-result-summary strong {
    color: var(--ink);
}

.admin-result-summary span {
    color: #6b747b;
}

.admin-pagination {
    justify-content: flex-end;
    margin-top: 1rem;
}

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

.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    min-height: 100%;
    overflow: hidden;
}

.product-image {
    align-items: center;
    aspect-ratio: 1.25;
    background: linear-gradient(135deg, #e8eef2, #f8fafb);
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.product-image span {
    color: var(--brand);
    font-size: 2rem;
    font-weight: 900;
}

.product-body {
    padding: 1rem;
}

.product-body h2 {
    font-size: 1.02rem;
    line-height: 1.25;
    margin: 0 0 0.55rem;
}

.product-body p {
    color: var(--muted);
    margin: 0;
}

.product-meta {
    color: var(--accent) !important;
    font-size: 0.76rem;
    font-weight: 900;
    margin-bottom: 0.45rem !important;
    text-transform: uppercase;
}

.product-bottom {
    align-items: end;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem 1rem;
}

.product-bottom strong {
    color: var(--brand);
    font-size: 1.2rem;
}

.product-bottom span {
    color: var(--muted);
}

.card-actions {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 0.8fr 1fr;
    padding: 0 1rem 1rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination a,
.pagination span {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: inline-flex;
    font-weight: 900;
    height: 40px;
    justify-content: center;
    min-width: 40px;
    padding: 0 0.7rem;
}

.pagination a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.empty-state {
    padding: 2rem;
    text-align: center;
}

.empty-state.standalone {
    margin: 3rem auto;
    max-width: 720px;
}

.site-footer {
    align-items: center;
    background: #172026;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 1.5rem max(1rem, calc((100vw - 1180px) / 2));
}

.site-footer p {
    color: #b9c7ce;
    margin: 0.25rem 0 0;
}

.whatsapp-float {
    background: #17a463;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    padding: 0.8rem 1rem;
}

.breadcrumb {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.3rem auto;
    max-width: 1180px;
    padding: 0 1rem;
}

.product-detail {
    margin-bottom: 3rem;
}

.detail-grid,
.rich-content {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 1rem;
}

.detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
}

.detail-media,
.detail-info,
.rich-content {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.detail-media {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 420px;
    overflow: hidden;
}

.detail-media img {
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    width: 100%;
}

.detail-info {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-info h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
    margin: 0 0 0.8rem;
}

.lead {
    color: var(--muted);
    font-size: 1.08rem;
}

.spec-list {
    display: grid;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.spec-list div {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
}

.spec-list dt {
    color: var(--muted);
    font-weight: 800;
}

.spec-list dd {
    font-weight: 900;
    margin: 0;
}

.price-line {
    display: grid;
    gap: 0.2rem;
    margin: 1.4rem 0;
}

.price-line strong {
    color: var(--brand);
    font-size: 2rem;
}

.price-line span {
    color: var(--muted);
}

.rich-content {
    margin-top: 1rem;
    padding: clamp(1.2rem, 3vw, 2rem);
}

.rich-content h2 {
    margin-top: 0;
}

.rich-content ul,
.rich-content ol {
    padding-left: 1.25rem;
}

.setup-page {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 1rem;
}

.setup-card {
    box-shadow: var(--shadow);
    margin: auto;
    max-width: 470px;
    padding: 1.5rem;
    width: 100%;
}

/* ============================================================
   Giriş ekranı — sade beyaz tema
   ============================================================ */
.admin-login-page {
    align-items: center;
    background: var(--soft);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(20, 31, 40, 0.08);
    max-width: 400px;
    padding: 2.4rem 2rem;
    text-align: center;
    width: 100%;
}

.login-logo {
    display: inline-flex;
    height: 56px;
    margin-bottom: 1.25rem;
    width: 56px;
}

.login-logo img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.login-card h1 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0;
}

.login-sub {
    color: var(--muted);
    margin: 0.5rem 0 0;
}

.login-alert {
    background: #fdecec;
    border: 1px solid #f3c6c6;
    border-radius: 10px;
    color: #a32d2d;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 1.5rem;
    padding: 0.75rem 0.9rem;
}

.login-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.75rem;
    text-align: left;
}

.login-form .button {
    margin-top: 0.4rem;
}

.login-back {
    color: var(--muted);
    display: inline-block;
    font-weight: 700;
    margin-top: 1.5rem;
}

.login-back:hover {
    color: var(--ink);
}

.alert {
    border-radius: var(--radius);
    font-weight: 800;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
}

.alert.success {
    background: #e5f7ee;
    color: var(--ok);
}

.alert.danger {
    background: #fee9ec;
    color: #9a111c;
}

.admin-page {
    background:
        radial-gradient(circle at top right, rgba(215, 25, 32, 0.08), transparent 32rem),
        #f6f8fb;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background: rgba(255, 255, 255, 0.92);
    border-right: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100vh;
    overflow-y: auto;
    padding: 1rem;
    position: sticky;
    top: 0;
}

.admin-sidebar-head {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.admin-brand small {
    color: var(--muted);
}

.admin-sidebar nav {
    display: grid;
    gap: 0.25rem;
}

.admin-sidebar nav a {
    border-radius: var(--radius);
    color: #46545e;
    font-weight: 800;
    padding: 0.72rem 0.78rem;
    width: 100%;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: #fff1f2;
    color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(215, 25, 32, 0.12);
}

.admin-sidebar-foot {
    display: grid;
    gap: 0.4rem;
    margin-top: auto;
}

.admin-sidebar-foot form {
    margin: 0;
}

.admin-sidebar-foot .button {
    background: #f1f5f7;
    color: #35424b;
}

.admin-sidebar-close,
.admin-menu-button,
.admin-sidebar-backdrop {
    display: none;
}

.admin-main {
    min-width: 0;
    padding: 1.25rem;
}

.admin-topbar {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(20, 31, 40, 0.05);
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.admin-title-block h1 {
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.1;
}

.admin-topbar-user {
    position: relative;
}

.admin-user-trigger {
    align-items: center;
    background: #f7fafb;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #33414a;
    display: inline-flex;
    font-weight: 800;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0.42rem 0.8rem;
}

.admin-user-trigger:hover,
.admin-topbar-user.is-open .admin-user-trigger {
    background: #eef3f5;
    border-color: #c9d5db;
    transform: none;
}

.admin-topbar-user svg {
    height: 18px;
    width: 18px;
}

.admin-user-caret {
    transition: transform 0.18s ease;
}

.admin-topbar-user.is-open .admin-user-caret {
    transform: rotate(180deg);
}

.admin-user-dropdown {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(20, 31, 40, 0.16);
    display: grid;
    gap: 0.15rem;
    min-width: 210px;
    padding: 0.4rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    z-index: 40;
}

.admin-user-dropdown a,
.admin-user-dropdown button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    display: flex;
    font-weight: 700;
    gap: 0.55rem;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    text-align: left;
    width: 100%;
}

.admin-user-dropdown a:hover,
.admin-user-dropdown button:hover {
    background: #f3f6f8;
    transform: none;
}

.admin-user-dropdown form {
    margin: 0;
}

.admin-user-dropdown button {
    color: var(--brand);
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.stat-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(20, 31, 40, 0.06);
    padding: 1rem;
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    font-size: 2.15rem;
    margin-top: 0.4rem;
}

.admin-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(20, 31, 40, 0.06);
    padding: 1rem;
}

.admin-card.narrow {
    max-width: 720px;
}

.admin-grid.two {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.taxonomy-shell {
    align-items: start;
    display: block;
    gap: 1rem;
}

.taxonomy-form-card {
    position: sticky;
    top: 1rem;
}

.taxonomy-card-head {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.taxonomy-card-head h2 {
    margin: 0.18rem 0 0;
}

.taxonomy-list {
    display: grid;
    gap: 0.75rem;
}

.taxonomy-item {
    align-items: center;
    background: #fbfdfe;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.95rem;
}

.taxonomy-main {
    min-width: 0;
}

.taxonomy-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.taxonomy-title-row h3 {
    font-size: 1rem;
    line-height: 1.25;
    margin: 0;
}

.taxonomy-main p {
    color: var(--muted);
    margin: 0 0 0.7rem;
}

.taxonomy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.taxonomy-meta span,
.status-pill {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    gap: 0.35rem;
    line-height: 1;
    min-height: 30px;
    padding: 0.38rem 0.58rem;
}

.taxonomy-meta span {
    background: #fff;
    color: #53606a;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.taxonomy-meta svg {
    flex: 0 0 auto;
    height: 15px;
    width: 15px;
}

.status-pill.is-active {
    background: #eaf8ee;
    border-color: #c8ecd1;
    color: #176532;
}

.status-pill.is-passive {
    background: #f3f5f7;
    color: #68747d;
}

.taxonomy-actions {
    align-items: stretch;
    display: flex;
    gap: 0.5rem;
}

.taxonomy-actions form {
    display: contents;
}

.taxonomy-actions .button {
    min-height: 40px;
    white-space: nowrap;
}

.taxonomy-modal-backdrop.is-open {
    background: rgba(15, 23, 42, 0.46);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 70;
}

.taxonomy-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 75;
}

.taxonomy-modal-card {
    max-height: min(720px, calc(100dvh - 2rem));
    overflow: auto;
    width: min(520px, 100%);
}

.taxonomy-modal-close {
    flex: 0 0 auto;
}

.taxonomy-modal-actions {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 1fr 1fr;
}

body.taxonomy-modal-open {
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
    width: 100%;
}

.data-table thead th {
    background: #f4f7f9;
    border-bottom: 1px solid var(--line);
    color: #5a6770;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.72rem 0.85rem;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table thead th:first-child {
    border-top-left-radius: 10px;
}

.data-table thead th:last-child {
    border-top-right-radius: 10px;
}

.data-table th.col-actions {
    text-align: right;
}

.data-table tbody td {
    border-bottom: 1px solid var(--line);
    padding: 0.72rem 0.85rem;
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #f8fafb;
}

.cell-strong {
    color: var(--ink);
    display: block;
    font-weight: 800;
}

.cell-sub {
    color: var(--muted);
    display: block;
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.cell-price {
    font-weight: 800;
    white-space: nowrap;
}

.cell-tag {
    align-items: center;
    color: #4a5760;
    display: inline-flex;
    gap: 0.35rem;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-tag svg {
    color: var(--muted);
    flex: 0 0 auto;
    height: 15px;
    width: 15px;
}

.cell-empty {
    color: var(--muted);
    padding: 1.7rem 0.85rem !important;
    text-align: center;
}

.cell-actions {
    text-align: right;
    white-space: nowrap;
}

.banner-preview {
    aspect-ratio: 1180 / 390;
    background: #eef3f5;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 48px;
    object-fit: cover;
    width: 146px;
}

.row-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.row-actions form {
    margin: 0;
}

.row-action {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.32rem;
    min-height: 34px;
    padding: 0.35rem 0.62rem;
}

.row-action svg {
    height: 15px;
    width: 15px;
}

.row-action:hover {
    transform: none;
}

.row-action.edit:hover {
    background: #f1f5f7;
    border-color: #cdd8de;
}

.row-action.delete {
    background: #fff5f5;
    border-color: #f0d4d4;
    color: var(--brand);
}

.row-action.delete:hover {
    background: #ffe7e7;
    border-color: #e9bcbc;
}

.banner-current {
    background: #f6f8f9;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
}

.banner-current img {
    aspect-ratio: 1180 / 390;
    border-radius: 6px;
    object-fit: cover;
    width: min(100%, 590px);
}

.banner-current span {
    color: var(--muted);
    font-weight: 800;
}

.admin-search {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(180px, 1fr) auto;
    max-width: 480px;
    width: 100%;
}

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

.product-form {
    display: grid;
    gap: 1rem;
}

.product-current-image {
    align-items: flex-start;
    background: #f6f8f9;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
}

.product-current-image span {
    color: var(--muted);
    font-weight: 900;
}

.product-current-image img {
    aspect-ratio: 4 / 3;
    background: #eef3f5;
    border-radius: 6px;
    max-width: 220px;
    object-fit: cover;
    width: 100%;
}

.check-row,
.toggle-row {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    min-height: 44px;
}

.check-row input {
    height: 18px;
    width: 18px;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
    border-color: var(--line);
}

#rich-editor {
    background: #fff;
    min-height: 240px;
}

@media (max-width: 980px) {
    .header-main {
        min-height: 64px;
    }

    .header-actions {
        justify-content: flex-end;
    }

    .hero,
    .detail-grid,
    .catalog-shell,
    .admin-grid.two,
    .taxonomy-shell {
        grid-template-columns: 1fr;
    }

    .taxonomy-form-card {
        position: static;
    }

    .filters-panel {
        position: static;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-page {
        display: block;
    }

    .admin-main {
        padding: 0.85rem;
    }

    .admin-menu-button {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .admin-sidebar {
        bottom: 0;
        box-shadow: 18px 0 45px rgba(20, 31, 40, 0.2);
        height: 100dvh;
        left: 0;
        max-width: min(320px, 86vw);
        position: fixed;
        top: 0;
        transform: translateX(-104%);
        transition: transform 0.2s ease;
        width: min(320px, 86vw);
        z-index: 60;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-sidebar-close {
        display: inline-flex;
    }

    .admin-sidebar-backdrop.is-open {
        background: rgba(15, 23, 42, 0.42);
        display: block;
        inset: 0;
        position: fixed;
        z-index: 55;
    }

    body.admin-menu-open {
        overflow: hidden;
    }
}

@media (max-width: 620px) {
    .site-footer,
    .section-heading,
    .admin-card-head,
    .admin-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-topbar {
        align-items: center;
        flex-direction: row;
        gap: 0.7rem;
        padding: 0.72rem;
    }

    .admin-title-block {
        min-width: 0;
    }

    .admin-title-block h1 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-user-trigger span,
    .admin-user-caret {
        display: none;
    }

    .admin-user-trigger {
        padding: 0.42rem 0.5rem;
    }

    .card-actions,
    .form-grid,
    .admin-search,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .taxonomy-card-head,
    .taxonomy-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .taxonomy-list-card > .taxonomy-card-head {
        flex-direction: column;
    }

    .taxonomy-list-card > .taxonomy-card-head .button {
        width: 100%;
    }

    .taxonomy-modal {
        align-items: flex-end;
        padding: 0.75rem;
    }

    .taxonomy-modal-card {
        border-radius: 14px;
        max-height: calc(100dvh - 1.5rem);
        width: 100%;
    }

    .taxonomy-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .taxonomy-actions .button {
        min-height: 46px;
        width: 100%;
    }

    .header-main {
        gap: 0.55rem;
        min-height: 60px;
        padding: 0.48rem 0.75rem;
    }

    .brand {
        gap: 0.52rem;
    }

    .brand-mark {
        border-radius: 7px;
        flex-basis: 34px;
        height: 34px;
        width: 34px;
    }

    .brand strong {
        font-size: 0.98rem;
        line-height: 1.1;
    }

    .brand small {
        font-size: 0.68rem;
        line-height: 1.15;
    }

    .header-actions {
        gap: 0.2rem;
    }

    .header-actions a,
    .nav-icon-button {
        min-height: 36px;
        min-width: 36px;
        padding: 0.45rem;
    }

    .header-actions a span {
        display: none;
    }

    .header-search {
        left: 0.75rem;
        right: 0.75rem;
        top: calc(100% + 0.35rem);
        width: auto;
    }

    .header-search.is-open {
        grid-template-columns: minmax(0, 1fr) auto;
    }

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

    .hero-thumbs {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.4rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .hero-thumb {
        flex: 0 0 38%;
        scroll-snap-align: start;
    }

    body.filter-sheet-open {
        overflow: hidden;
    }

    .catalog-shell {
        display: block;
        margin-top: 0.8rem;
    }

    .mobile-filter-trigger {
        display: inline-flex;
        min-height: 38px;
        padding: 0.55rem 0.85rem;
    }

    .section-tools {
        align-items: flex-start;
        justify-content: space-between;
        width: 100%;
    }

    .filter-backdrop.is-open {
        background: rgba(15, 23, 42, 0.42);
        display: block;
        inset: 0;
        position: fixed;
        z-index: 45;
    }

    .filters-panel {
        border-radius: 16px 16px 0 0;
        bottom: 0;
        box-shadow: 0 -18px 45px rgba(20, 31, 40, 0.22);
        left: 0;
        max-height: min(82vh, calc(100dvh - 4.5rem));
        opacity: 0;
        overflow-y: auto;
        padding: 1rem;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: auto;
        transform: translateY(100%);
        transition: transform 0.18s ease, opacity 0.18s ease;
        z-index: 50;
    }

    .filters-panel.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .filter-panel-head {
        align-items: center;
        border-bottom: 1px solid var(--line);
        display: flex;
        justify-content: space-between;
        margin: -0.1rem 0 1rem;
        padding-bottom: 0.85rem;
    }

    .filter-panel-head h2 {
        font-size: 1.2rem;
        line-height: 1.1;
        margin: 0;
    }

    .hero {
        margin-top: 0;
        min-height: 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .detail-media,
    .detail-media img {
        min-height: 280px;
    }

    .data-table {
        min-width: 0;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tbody tr {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 12px;
        margin-bottom: 0.8rem;
        padding: 0.5rem 0.9rem;
    }

    .data-table tbody tr:hover {
        background: #fff;
    }

    .data-table tbody td {
        border: 0 !important;
        padding: 0.5rem 0;
    }

    .data-table tbody td + td {
        border-top: 1px solid #eef2f4 !important;
    }

    .data-table td[data-label]::before {
        color: var(--muted);
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0.03em;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
    }

    .data-table td.cell-actions {
        padding-top: 0.7rem;
    }

    .data-table td.cell-actions::before {
        display: none;
    }

    .data-table .cell-empty {
        text-align: center;
    }

    .row-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .row-action {
        flex: 1 1 auto;
        justify-content: center;
    }

    .banner-preview {
        height: auto;
        max-width: 240px;
        width: 100%;
    }
}

@media (max-width: 430px) {
    .taxonomy-actions,
    .taxonomy-modal-actions {
        grid-template-columns: 1fr;
    }
}

.confirm-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 80;
}

.confirm-backdrop {
    background: rgba(15, 23, 42, 0.5);
    inset: 0;
    position: absolute;
}

.confirm-box {
    animation: confirmPop 0.16s ease-out;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(20, 31, 40, 0.3);
    max-width: 380px;
    padding: 1.7rem 1.6rem 1.4rem;
    position: relative;
    text-align: center;
    width: 100%;
    z-index: 1;
}

.confirm-icon {
    align-items: center;
    background: #fdecec;
    border-radius: 50%;
    color: var(--brand);
    display: inline-flex;
    height: 52px;
    justify-content: center;
    margin-bottom: 0.9rem;
    width: 52px;
}

.confirm-icon svg {
    height: 25px;
    width: 25px;
}

.confirm-box h3 {
    font-size: 1.15rem;
    margin: 0 0 0.4rem;
}

.confirm-message {
    color: var(--muted);
    margin: 0 0 1.4rem;
}

.confirm-actions {
    display: flex;
    gap: 0.6rem;
}

.confirm-actions .button {
    flex: 1;
}

.confirm-actions .confirm-ok {
    background: var(--brand);
    color: #fff;
}

body.confirm-open {
    overflow: hidden;
}

@keyframes confirmPop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
