:root {
    --bg: #0b1220;
    --bg-soft: #111a2d;
    --surface: #15213a;
    --surface-2: #1b2946;
    --text: #eff5ff;
    --muted: #9fb0cc;
    --line: rgba(255, 255, 255, 0.08);
    --brand: #f3b33f;
    --brand-2: #64d2ff;
    --accent: #93e8b5;
    --danger: #ff6b6b;
    --success: #4cd48a;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --radius: 18px;
    --radius-sm: 12px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(100, 210, 255, 0.15), transparent 25%),
        radial-gradient(circle at top right, rgba(243, 179, 63, 0.12), transparent 22%),
        linear-gradient(180deg, #06101d, #0b1220 42%, #08101b);
    color: var(--text);
}

body[data-theme="light"] {
    --bg: #f7f8fa;
    --bg-soft: #eef1f5;
    --surface: #ffffff;
    --surface-2: #f3f5f8;
    --text: #182233;
    --muted: #5c697c;
    --line: rgba(24, 34, 51, 0.09);
    --brand: #b17b19;
    --brand-2: #156fb7;
    --accent: #2f855a;
    --danger: #b91c1c;
    --success: #2f855a;
    --shadow: 0 18px 50px rgba(20, 30, 45, 0.08);
    background:
        radial-gradient(circle at top left, rgba(21, 112, 183, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(224, 172, 63, 0.12), transparent 20%),
        linear-gradient(180deg, #f7f8fa, #eef1f5 45%, #e7ebf0);
    color-scheme: light;
}

body.menu-open {
    overflow: hidden;
}

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

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

.site-header,
.admin-topbar,
.site-footer,
.card,
.tile,
.product-card,
.empty-state,
.flash,
.hero-panel,
.info-card,
.cart-item,
.cart-summary,
.sidebar,
.admin-sidebar,
.checkout-form,
.richtext,
.page,
.product-detail,
.order-summary {
    backdrop-filter: blur(10px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 2147483646;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    background: rgba(6, 16, 29, 0.82);
    border-bottom: 1px solid var(--line);
}

.brand,
.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img,
.admin-brand img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.brand span,
.admin-brand strong {
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand span {
    font-weight: 700;
}

.admin-brand strong {
    display: block;
}

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

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    justify-self: end;
    align-items: center;
    width: max-content;
    max-width: 100%;
}

.site-nav a,
.admin-nav a,
.category-nav a,
.category-group summary,
.btn,
.icon-button,
.tile,
.product-card,
.empty-state,
.info-card {
    border-radius: var(--radius-sm);
}

.site-nav a,
.admin-nav a {
    padding: 10px 14px;
    color: var(--muted);
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.admin-nav a:hover,
.admin-nav a.active,
.category-nav a:hover,
.category-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.icon-button {
    display: none;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 20px;
    padding: 24px 20px 36px;
    max-width: 1500px;
    margin: 0 auto;
}

.sidebar,
.admin-sidebar {
    border: 1px solid var(--line);
    background: rgba(11, 18, 32, 0.84);
    box-shadow: var(--shadow);
}

.sidebar {
    position: sticky;
    top: 82px;
    align-self: start;
    padding: 18px;
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.sidebar-head h2,
.section h2,
.page h1,
.product-detail-copy h1,
.hero-copy h1,
.admin-topbar h1 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.02em;
}

.sidebar-head p,
.section-head p,
.eyebrow,
.product-meta,
.muted {
    color: var(--muted);
}

.category-nav {
    display: grid;
    gap: 10px;
}

.category-nav > a,
.category-group {
    display: block;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.category-nav > a,
.category-group summary,
.category-all,
.category-children a {
    padding: 12px 14px;
}

.category-group {
    overflow: hidden;
}

.category-group summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
}

.category-group summary::-webkit-details-marker {
    display: none;
}

.category-all {
    display: block;
    color: var(--brand-2);
    border-top: 1px solid var(--line);
}

.category-children {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
}

.category-children a {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
}

.content,
.admin-main {
    min-width: 0;
}

.hero,
.section,
.page,
.product-detail,
.card,
.cart-form,
.checkout-form {
    border: 1px solid var(--line);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 20px;
    padding: 28px;
    margin-bottom: 22px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(21, 33, 58, 0.92), rgba(17, 26, 45, 0.88)),
        radial-gradient(circle at top right, rgba(243, 179, 63, 0.16), transparent 30%);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
}

.hero-copy h1,
.page h1,
.product-detail-copy h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
}

.hero-copy p {
    color: var(--muted);
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #ffcf70);
    color: #1b1302;
    border-color: transparent;
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(100, 210, 255, 0.18), rgba(147, 232, 181, 0.14));
}

.btn-sm {
    min-height: 38px;
    padding: 8px 14px;
}

.hero-panel,
.card,
.info-card,
.tile,
.product-card,
.empty-state,
.flash,
.cart-item,
.cart-summary,
.order-summary,
.checkout-form,
.page,
.product-detail {
    background: rgba(13, 21, 37, 0.88);
}

.hero-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    min-height: 260px;
}

.hero-metrics {
    display: grid;
    gap: 14px;
    width: 100%;
}

.hero-metrics div,
.info-card,
.cart-item,
.order-summary > div {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.hero-metrics strong,
.info-card strong,
.cart-summary strong,
.product-price {
    display: block;
    margin-bottom: 4px;
    color: var(--brand);
}

.hero-metrics span,
.info-card span,
.order-summary span,
.product-specs span {
    color: var(--muted);
}

.strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px 14px;
    margin-bottom: 22px;
    color: var(--muted);
}

.strip span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.section,
.page,
.product-detail,
.card,
.checkout-form {
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
}

.tile-grid,
.product-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.tile,
.product-card {
    overflow: hidden;
}

.tile {
    padding: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    min-height: 150px;
}

.tile:hover,
.product-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.product-card {
    display: grid;
    border: 1px solid var(--line);
}

.product-image {
    display: grid;
    place-items: center;
    min-height: 170px;
    background: linear-gradient(135deg, rgba(243, 179, 63, 0.14), rgba(100, 210, 255, 0.12));
}

.product-image span,
.placeholder {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 800;
    font-size: 1.8rem;
}

.product-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.product-body h3,
.cart-item h3 {
    margin: 0;
}

.product-footer,
.cart-summary,
.inline-form,
.form-grid {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.empty-state,
.flash {
    padding: 16px 18px;
    border: 1px solid var(--line);
}

.flash-success {
    border-color: rgba(76, 212, 138, 0.3);
    color: #dbffea;
}

.flash-error {
    border-color: rgba(255, 107, 107, 0.3);
    color: #ffd7d7;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
}

.product-detail-visual {
    display: grid;
    gap: 14px;
    align-content: start;
    border-radius: 20px;
    min-height: 320px;
    background: linear-gradient(135deg, rgba(243, 179, 63, 0.1), rgba(100, 210, 255, 0.08));
    border: 1px solid var(--line);
    padding: 16px;
}

.product-detail-visual img {
    width: 100%;
    min-height: 280px;
    object-fit: cover;
    border-radius: 14px;
}

.product-detail-visual .placeholder {
    width: 100%;
    min-height: 280px;
}

.product-gallery-section {
    display: grid;
    gap: 14px;
}

.product-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.product-gallery-item {
    margin: 0;
    min-height: 140px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

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

.product-detail-copy {
    display: grid;
    gap: 14px;
}

.product-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.price-note {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

.availability {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(100, 210, 255, 0.18);
    background: rgba(100, 210, 255, 0.06);
}

.availability-badge {
    display: inline-flex;
    align-self: start;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(100, 210, 255, 0.16);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.availability-note {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.cart-checkout-note {
    margin-top: 8px;
}

.richtext {
    padding: 2px 0;
    color: var(--text);
}

.product-specs {
    display: block;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    line-height: 1.7;
}

.product-specs strong {
    display: inline;
    margin: 0;
    color: var(--brand);
}

.cart-list,
.checkout-form,
.admin-list,
.form-grid {
    display: grid;
    gap: 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
}

.cart-summary {
    margin-top: 16px;
    justify-content: space-between;
}

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

.span-2 {
    grid-column: span 2;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.field-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.field-help,
.richtext-help {
    display: block;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--muted);
}

.richtext-help {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(100, 210, 255, 0.16);
    border-radius: 12px;
    background: rgba(100, 210, 255, 0.06);
}

.richtext-help strong {
    color: var(--text);
    font-size: 0.92rem;
}

.richtext-field {
    gap: 10px;
}

input,
textarea,
select {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

input[type="file"] {
    padding: 10px 13px;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

textarea[data-richtext-editor] {
    min-height: 320px;
}

.tox.tox-tinymce {
    border-radius: 14px !important;
    overflow: hidden;
    border-color: var(--line) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.tox .tox-toolbar__primary,
.tox .tox-edit-area__iframe,
.tox .tox-statusbar {
    background-color: #101a2d !important;
}

.tox .tox-toolbar__group {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.tox .tox-tbtn,
.tox .tox-tbtn svg,
.tox .tox-statusbar__path-item,
.tox .tox-statusbar__wordcount {
    color: var(--text) !important;
    fill: var(--text) !important;
}

.tox .tox-tbtn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    padding: 20px;
    margin: 0 20px 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(6, 16, 29, 0.82);
}

.site-footer span {
    display: block;
    color: var(--muted);
}

.site-footer-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
    text-align: right;
    color: var(--muted);
}

.footer-credit {
    color: var(--brand-2);
}

.catalog-page {
    display: grid;
    gap: 12px;
}

.catalog-search {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.catalog-search input[type="search"] {
    flex: 1 1 280px;
}

.product-image-preview {
    margin-top: -4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.product-image-preview-empty {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    border-style: dashed;
}

.product-image-preview img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 10px;
}

.image-picker {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.image-picker-preview .product-image-preview {
    margin-top: 0;
    height: 100%;
}

.image-picker-controls {
    display: grid;
    gap: 12px;
    align-content: start;
}

.image-picker-dropzone {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 18px;
    text-align: left;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.image-picker-dropzone strong {
    font-size: 16px;
    letter-spacing: 0.01em;
}

.image-picker-dropzone span,
.image-picker-dropzone small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.image-picker-dropzone:hover,
.image-picker-dropzone:focus-visible,
.image-picker.is-dragover .image-picker-dropzone {
    border-color: rgba(126, 209, 255, 0.7);
    background: linear-gradient(180deg, rgba(126, 209, 255, 0.12), rgba(255, 255, 255, 0.03));
    box-shadow: 0 0 0 4px rgba(126, 209, 255, 0.12);
    transform: translateY(-1px);
}

.image-picker-dropzone:focus-visible {
    outline: none;
}

.image-picker-file {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.image-picker-file input[type="file"] {
    padding: 0;
    min-height: auto;
    border: 0;
    background: transparent;
}

.image-picker-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.image-picker-clear {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(255, 107, 107, 0.22);
    border-radius: 14px;
    background: rgba(255, 107, 107, 0.06);
    color: var(--text);
}

.image-picker-clear input[type="checkbox"] {
    width: auto;
    min-height: auto;
    accent-color: #ff6b6b;
}

.gallery-manager {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.gallery-note {
    margin: -2px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.gallery-current {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.gallery-uploader {
    display: grid;
    gap: 12px;
}

.gallery-uploader .gallery-uploader-file {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.gallery-uploader-dropzone {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 18px;
    text-align: left;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-uploader-dropzone strong {
    font-size: 16px;
    letter-spacing: 0.01em;
}

.gallery-uploader-dropzone span,
.gallery-uploader-dropzone small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.gallery-uploader-dropzone:hover,
.gallery-uploader-dropzone:focus-visible,
.gallery-uploader.is-dragover .gallery-uploader-dropzone {
    border-color: rgba(126, 209, 255, 0.7);
    background: linear-gradient(180deg, rgba(126, 209, 255, 0.12), rgba(255, 255, 255, 0.03));
    box-shadow: 0 0 0 4px rgba(126, 209, 255, 0.12);
    transform: translateY(-1px);
}

.gallery-uploader-dropzone:focus-visible {
    outline: none;
}

.gallery-uploader-file input[type="file"] {
    padding: 0;
    min-height: auto;
    border: 0;
    background: transparent;
}

.gallery-uploader-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.gallery-preview-card,
.gallery-image-card {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.gallery-image-card[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.gallery-image-card.is-dragging {
    opacity: 0.65;
    transform: rotate(-1deg);
}

.gallery-image-card.is-drop-target {
    border-color: rgba(126, 209, 255, 0.8);
    box-shadow: 0 0 0 1px rgba(126, 209, 255, 0.24) inset, 0 0 0 4px rgba(126, 209, 255, 0.1);
}

.gallery-image-card.is-primary {
    border-color: rgba(126, 209, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(126, 209, 255, 0.2) inset;
}

.gallery-image-drag-handle {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.gallery-preview-card img,
.gallery-image-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}

.gallery-preview-card figcaption,
.gallery-image-card span {
    color: var(--muted);
    font-size: 0.9rem;
    word-break: break-word;
}

.gallery-preview-empty,
.gallery-empty {
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.gallery-image-remove {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
}

.gallery-image-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(126, 209, 255, 0.12);
    color: #9edcff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.gallery-image-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.gallery-inline-action {
    display: contents;
}

.gallery-inline-action .btn {
    width: 100%;
    justify-content: center;
}

.gallery-image-remove input[type="checkbox"] {
    width: auto;
    min-height: auto;
    accent-color: #ff6b6b;
}

.cart-warning {
    gap: 8px;
}

.cart-warning span {
    color: var(--muted);
}

.cart-remove-form {
    margin-top: 8px;
}

.overlay {
    display: none;
}

body.menu-open #gigel-chatbot-widget {
    display: none !important;
}

.admin-body {
    background:
        radial-gradient(circle at top left, rgba(100, 210, 255, 0.14), transparent 25%),
        linear-gradient(180deg, #06101d, #0a1220);
    color-scheme: dark;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    padding: 18px;
    border-right: 1px solid var(--line);
}

.admin-nav {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.admin-main {
    padding: 20px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(11, 18, 32, 0.82);
}

.admin-user {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.admin-list .row,
.admin-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(4, auto);
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

body.admin-body input,
body.admin-body textarea,
body.admin-body select {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-color: var(--line);
}

body.admin-body select option {
    background: #111a2d;
    color: var(--text);
}

body[data-theme="light"] .site-header,
body[data-theme="light"] .site-footer,
body[data-theme="light"] .sidebar,
body[data-theme="light"] .hero-panel,
body[data-theme="light"] .card,
body[data-theme="light"] .info-card,
body[data-theme="light"] .tile,
body[data-theme="light"] .product-card,
body[data-theme="light"] .empty-state,
body[data-theme="light"] .flash,
body[data-theme="light"] .cart-item,
body[data-theme="light"] .cart-summary,
body[data-theme="light"] .order-summary,
body[data-theme="light"] .checkout-form,
body[data-theme="light"] .page,
body[data-theme="light"] .product-detail,
body[data-theme="light"] .product-gallery-item,
body[data-theme="light"] .product-specs,
body[data-theme="light"] .product-image-preview,
body[data-theme="light"] .image-picker,
body[data-theme="light"] .gallery-manager,
body[data-theme="light"] .gallery-preview-card,
body[data-theme="light"] .gallery-image-card,
body[data-theme="light"] .gallery-preview-empty,
body[data-theme="light"] .gallery-empty,
body[data-theme="light"] .category-nav > a,
body[data-theme="light"] .category-group,
body[data-theme="light"] .category-children a {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(19, 30, 48, 0.09);
    box-shadow: 0 18px 50px rgba(20, 30, 45, 0.08);
}

body[data-theme="light"] .site-header,
body[data-theme="light"] .site-footer {
    background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .site-nav {
    background: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .icon-button {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(24, 34, 51, 0.1);
    color: var(--text);
}

body[data-theme="light"] .hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 244, 248, 0.94)),
        radial-gradient(circle at top right, rgba(224, 172, 63, 0.18), transparent 28%);
}

body[data-theme="light"] .hero-panel,
body[data-theme="light"] .card,
body[data-theme="light"] .info-card,
body[data-theme="light"] .tile,
body[data-theme="light"] .product-card,
body[data-theme="light"] .empty-state,
body[data-theme="light"] .flash,
body[data-theme="light"] .cart-item,
body[data-theme="light"] .cart-summary,
body[data-theme="light"] .order-summary,
body[data-theme="light"] .checkout-form,
body[data-theme="light"] .page,
body[data-theme="light"] .product-detail,
body[data-theme="light"] .product-gallery-item,
body[data-theme="light"] .product-specs,
body[data-theme="light"] .product-image-preview,
body[data-theme="light"] .image-picker,
body[data-theme="light"] .gallery-manager,
body[data-theme="light"] .gallery-preview-card,
body[data-theme="light"] .gallery-image-card,
body[data-theme="light"] .gallery-preview-empty,
body[data-theme="light"] .gallery-empty {
    background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .hero-metrics div,
body[data-theme="light"] .info-card,
body[data-theme="light"] .cart-item,
body[data-theme="light"] .order-summary > div,
body[data-theme="light"] .strip span,
body[data-theme="light"] .product-specs,
body[data-theme="light"] .image-picker-file,
body[data-theme="light"] .gallery-uploader .gallery-uploader-file,
body[data-theme="light"] .gallery-preview-card,
body[data-theme="light"] .gallery-image-card {
    background: rgba(17, 24, 39, 0.03);
}

body[data-theme="light"] .site-nav a:hover,
body[data-theme="light"] .site-nav a.active,
body[data-theme="light"] .admin-nav a:hover,
body[data-theme="light"] .admin-nav a.active,
body[data-theme="light"] .category-nav a:hover,
body[data-theme="light"] .category-nav a.active {
    background: rgba(17, 24, 39, 0.06);
}

body[data-theme="light"] .hero-copy p,
body[data-theme="light"] .strip,
body[data-theme="light"] .product-meta,
body[data-theme="light"] .muted,
body[data-theme="light"] .price-note,
body[data-theme="light"] .site-footer span,
body[data-theme="light"] .site-footer-meta,
body[data-theme="light"] .product-specs span,
body[data-theme="light"] .gallery-note,
body[data-theme="light"] .gallery-image-card span,
body[data-theme="light"] .gallery-preview-card figcaption,
body[data-theme="light"] .gallery-preview-empty,
body[data-theme="light"] .gallery-empty,
body[data-theme="light"] .admin-user,
body[data-theme="light"] .category-children a {
    color: var(--muted);
}

body[data-theme="light"] .product-image,
body[data-theme="light"] .product-detail-visual {
    background: linear-gradient(135deg, rgba(243, 179, 63, 0.1), rgba(21, 112, 183, 0.08));
}

body[data-theme="light"] .product-image span,
body[data-theme="light"] .placeholder {
    border-color: rgba(19, 30, 48, 0.1);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
}

body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
}

body[data-theme="light"] .btn {
    background: rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .btn-secondary {
    background: linear-gradient(135deg, rgba(21, 112, 183, 0.12), rgba(47, 133, 90, 0.12));
}

body[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #d9a441, #f4c15d);
    color: #1c1608;
}

body[data-theme="light"] .flash-success {
    border-color: rgba(47, 133, 90, 0.28);
    background: rgba(47, 133, 90, 0.08);
    color: #1f5f39;
}

body[data-theme="light"] .flash-error {
    border-color: rgba(185, 28, 28, 0.24);
    background: rgba(185, 28, 28, 0.08);
    color: #8a1f1f;
}

body[data-theme="light"] .richtext-help {
    border-color: rgba(21, 112, 183, 0.16);
    background: rgba(21, 112, 183, 0.06);
}

body[data-theme="light"] .image-picker-dropzone,
body[data-theme="light"] .gallery-uploader-dropzone {
    border-color: rgba(19, 30, 48, 0.15);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 246, 249, 0.92));
}

body[data-theme="light"] .image-picker-clear {
    border-color: rgba(185, 28, 28, 0.18);
    background: rgba(185, 28, 28, 0.05);
}

body[data-theme="light"] .gallery-image-badge {
    background: rgba(21, 112, 183, 0.12);
    color: #145ea8;
}

body[data-theme="light"] .site-nav,
body[data-theme="light"] .sidebar,
body[data-theme="light"] .overlay.show {
    backdrop-filter: blur(10px);
}

body[data-theme="light"] .overlay.show {
    background: rgba(24, 34, 51, 0.18);
}

@media (max-width: 1100px) {
    .site-header {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
    }

    .site-header .site-nav {
        justify-self: auto;
    }

    .site-header .brand {
        min-width: 0;
        justify-self: center;
        text-align: center;
    }

    .site-header .sidebar-toggle {
        justify-self: start;
    }

    .site-header .nav-toggle {
        justify-self: end;
    }

    .shell,
    .hero,
    .product-detail,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 340px);
        transform: translateX(-102%);
        transition: transform 0.25s ease;
        z-index: 2147483645;
    }

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

    .site-nav {
        position: fixed;
        top: 70px;
        right: 16px;
        left: 16px;
        max-height: calc(100vh - 88px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(6, 16, 29, 0.96);
        box-shadow: var(--shadow);
        z-index: 2147483647;
    }

    .site-nav.open {
        display: flex;
    }

    .icon-button {
        display: inline-flex;
    }

    .overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.42);
        z-index: 2147483644;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
    }

    .image-picker {
        grid-template-columns: 1fr;
    }

    .gallery-current {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .site-nav {
        position: fixed;
        top: 70px;
        right: 16px;
        left: 16px;
        max-height: calc(100vh - 88px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(6, 16, 29, 0.96);
        box-shadow: var(--shadow);
        z-index: 2147483647;
    }

    .admin-topbar,
    .site-footer {
        grid-template-columns: 1fr auto;
        display: grid;
    }

    .site-footer-meta {
        justify-items: start;
        text-align: left;
    }

    .site-nav {
        top: 70px;
    }

    .section-head,
    .cart-item,
    .cart-summary,
    .form-grid,
    .admin-list .row,
    .admin-table-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .span-2 {
        grid-column: auto;
    }

    .catalog-search {
        flex-direction: column;
        align-items: stretch;
    }
}
