/* Tech Empire Web Editor — Liquid Glass */

.we-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.we-tab-bar {
    display: flex;
    gap: 0.35rem;
    padding: 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    margin-bottom: 1.5rem;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
}

.we-tab {
    border: none;
    background: transparent;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.we-tab.active {
    background: white;
    color: var(--primary-black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.we-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.we-search-wrap input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    font-size: 0.88rem;
    font-family: inherit;
    background: rgba(0, 0, 0, 0.03);
}

.we-search-wrap input:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.05);
}

.we-search-wrap i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.we-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.we-product-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.we-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.we-product-card-img {
    aspect-ratio: 1;
    background: #f5f5f7;
    position: relative;
    overflow: hidden;
}

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

.we-product-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.we-product-card:hover .we-product-card-overlay {
    opacity: 1;
}

.we-product-card-body {
    padding: 0.85rem 1rem 1rem;
}

.we-product-card-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.we-product-card-name {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.we-product-card-price {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.we-product-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.we-product-card-condition {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

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

@media (max-width: 640px) {
    .we-condition-group {
        grid-template-columns: 1fr;
    }
}

.we-condition-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.we-condition-option:hover {
    border-color: rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.65);
}

.we-condition-option:has(input:checked) {
    border-color: var(--primary-black);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.we-condition-option input[type="radio"] {
    margin-top: 0.15rem;
    accent-color: var(--primary-black);
    flex-shrink: 0;
}

.we-condition-label {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--primary-black);
}

.we-specs-grid {
    margin-bottom: 0.5rem;
}

.we-btn-link {
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3665f3;
    cursor: pointer;
}

.we-btn-link:hover {
    text-decoration: underline;
}

.we-shipping-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.we-shipping-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-black);
}

.we-listing-type {
    display: inline-flex;
    gap: 0.35rem;
    padding: 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    margin-bottom: 1rem;
}

.we-listing-type-btn {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
}

.we-listing-type-btn.active {
    background: white;
    color: var(--primary-black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.we-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    grid-column: 1 / -1;
}

.we-admin-banner {
    margin-top: 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.14);
    border: 1px solid rgba(255, 193, 7, 0.35);
    color: #8a6d00;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}

.we-panel-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.we-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    margin-bottom: 0.65rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
}

.we-row strong {
    min-width: 100px;
    font-size: 0.88rem;
}

.we-row label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.we-row input,
.we-row select {
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.9);
}

.we-row-actions {
    margin-left: auto;
    display: flex;
    gap: 0.4rem;
}

.we-btn-sm {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
}

.we-btn-sm.primary {
    background: var(--primary-black);
    color: white;
}

.we-btn-sm.danger {
    background: #fff0f0;
    color: #c62828;
}

.we-add-row {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.we-field {
    flex: 1;
    min-width: 140px;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.8);
}

.we-field:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.18);
}

/* Product Studio (full-screen glass) */
.we-studio {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: linear-gradient(165deg, rgba(245, 245, 247, 0.97) 0%, rgba(235, 235, 239, 0.98) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.we-studio.active {
    display: flex;
}

.we-studio-header {
    flex-shrink: 0;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
}

.we-studio-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 0.35rem;
}

.we-studio-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 6rem;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.we-studio-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 2rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
}

.we-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.we-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    letter-spacing: -0.02em;
}

.we-card h3 i {
    width: 18px;
    color: var(--text-muted);
}

.we-form-group {
    margin-bottom: 1rem;
}

.we-form-group:last-child {
    margin-bottom: 0;
}

.we-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.we-input,
.we-textarea,
.we-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.we-input:focus,
.we-textarea:focus,
.we-select:focus {
    outline: none;
    border-color: var(--primary-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.we-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.55;
}

.we-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.we-photo-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
}

.we-main-photo {
    aspect-ratio: 1;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f5f5f7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.we-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.we-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.5rem;
    align-content: start;
}

.we-thumb {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #f5f5f7;
}

.we-photo-remove-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 2;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s, background 0.15s;
}

.we-photo-remove-btn:hover {
    background: #c62828;
    transform: scale(1.06);
}

.we-photo-remove-btn svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.5;
}

.we-main-photo .we-photo-remove-btn {
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
}

.we-main-photo .we-photo-remove-btn svg {
    width: 15px;
    height: 15px;
}

.we-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.we-thumb.active {
    border-color: var(--primary-black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.we-dropzone {
    border: 2px dashed rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
}

.we-dropzone.dragover {
    border-color: var(--primary-black);
    background: rgba(0, 0, 0, 0.03);
}

.we-dropzone p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.we-seo-preview {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    background: white;
    font-family: Arial, sans-serif;
}

.we-seo-url {
    font-size: 13px;
    color: #202124;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.we-seo-title {
    color: #1a0dab;
    font-size: 18px;
    margin-bottom: 4px;
}

.we-seo-desc {
    color: #4d5156;
    font-size: 13px;
    line-height: 1.5;
}

.we-btn-outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--primary-black);
    padding: 0.7rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
}

.we-btn-primary {
    background: var(--primary-black);
    color: white;
    border: none;
    padding: 0.7rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 160px;
    justify-content: center;
}

.we-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.we-btn-ai {
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.we-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.we-category-picker {
    display: flex;
    gap: 0.55rem;
    align-items: stretch;
}

.we-category-picker .we-select {
    flex: 1;
    min-width: 0;
}

.we-category-add-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
    white-space: nowrap;
}

.we-category-add-btn svg {
    width: 14px;
    height: 14px;
}

.we-new-category-wrap {
    margin-top: 0.65rem;
    padding: 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
}

.we-new-category-actions {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.we-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #eee;
    border-top-color: #000;
    border-radius: 50%;
    animation: we-spin 0.8s linear infinite;
}

.btn-back-link {
    background: none;
    border: none;
    color: var(--primary-black);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0;
}

.btn-back-link:hover {
    opacity: 1;
}

@keyframes we-spin {
    to { transform: rotate(360deg); }
}

@keyframes we-spin {
    to { transform: rotate(360deg); }
}

/* ─── Categories tab — visual editor ─── */
.we-cat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.we-cat-toolbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.we-cat-toolbar-note {
    margin-bottom: 0;
    max-width: 520px;
}

.we-cat-inventory-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    white-space: nowrap;
}

.we-cat-preview-wrap {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 1rem 1.15rem 1.15rem;
    margin-bottom: 1.35rem;
}

.we-cat-preview-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.we-cat-preview-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem 1.35rem;
}

.we-cat-preview-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    padding: 0.5rem 0;
}

.we-cat-preview-chip {
    width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    cursor: default;
    opacity: 0.92;
}

.we-cat-preview-chip.active .we-cat-preview-label {
    color: var(--primary-black);
    font-weight: 600;
}

.we-cat-preview-visual {
    width: 100%;
    aspect-ratio: 1;
    max-height: 88px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.we-cat-preview-visual img {
    max-width: 88%;
    max-height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.07));
}

.we-cat-preview-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 72%;
    height: 72%;
    align-self: center;
    margin: auto;
}

.we-cat-preview-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    filter: none;
}

.we-cat-preview-label {
    font-size: 0.76rem;
    color: rgba(0, 0, 0, 0.52);
    line-height: 1.2;
    text-align: center;
}

.we-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.we-cat-card {
    position: relative;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.we-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

.we-cat-card.is-hidden {
    opacity: 0.72;
}

.we-cat-card.is-derived {
    border-style: dashed;
}

.we-cat-card-visual {
    aspect-ratio: 1.15;
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    padding: 1rem 0.75rem 0.5rem;
}

.we-cat-card-visual img {
    max-width: 78%;
    max-height: 82%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.08));
}

.we-cat-card-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(0, 0, 0, 0.28);
}

.we-cat-card-fallback svg {
    width: 36px;
    height: 36px;
}

.we-cat-card-fallback.large svg {
    width: 52px;
    height: 52px;
}

.we-cat-card-badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: white;
}

.we-cat-card-body {
    padding: 0.85rem 1rem 0.35rem;
}

.we-cat-card-name {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}

.we-cat-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
}

.we-cat-card-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: calc(100% - 1.5rem);
    margin: 0.5rem 0.75rem 0.85rem;
    padding: 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.we-cat-card-edit:hover {
    background: var(--primary-black);
    border-color: var(--primary-black);
    color: white;
}

.we-cat-card-edit svg {
    width: 14px;
    height: 14px;
}

.we-cat-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.we-cat-empty svg {
    width: 40px;
    height: 40px;
    opacity: 0.35;
    margin-bottom: 0.75rem;
}

.we-cat-empty p {
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.5;
    font-size: 0.88rem;
}

/* Category editor panel */
.we-cat-editor {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: none;
    pointer-events: none;
}

.we-cat-editor.active {
    display: block;
    pointer-events: auto;
}

.we-cat-editor-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.we-cat-editor-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(480px, 100%);
    height: 100%;
    background: linear-gradient(180deg, rgba(252, 252, 253, 0.98) 0%, rgba(245, 245, 247, 0.98) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    animation: we-cat-slide-in 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes we-cat-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.we-cat-editor-header {
    flex-shrink: 0;
    padding: 1.15rem 1.35rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.we-cat-editor-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 0.5rem;
}

.we-cat-editor-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.we-cat-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.35rem 1.5rem;
}

.we-cat-editor-card {
    margin-bottom: 0.85rem;
}

.we-cat-editor-card .we-panel-note {
    margin-bottom: 0.85rem;
}

.we-cat-cover-zone {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    align-items: start;
}

.we-cat-cover-preview {
    aspect-ratio: 1;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f5f5f7;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    padding: 0.75rem;
}

.we-cat-cover-preview img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    object-position: bottom center;
}

.we-cat-cover-fallback-note {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
}

.we-cat-cover-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.we-cat-dropzone {
    margin-top: 0;
    padding: 1rem;
}

.we-cat-clear-btn {
    width: 100%;
    text-align: center;
    font-size: 0.78rem;
    padding: 0.55rem;
}

.we-icon-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.45rem;
}

.we-icon-option {
    aspect-ratio: 1;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.we-icon-option:hover {
    border-color: rgba(0, 0, 0, 0.18);
    background: white;
}

.we-icon-option.active {
    background: var(--primary-black);
    border-color: var(--primary-black);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.we-icon-option svg {
    width: 20px;
    height: 20px;
}

.we-cat-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 52px;
    margin-top: 1.65rem;
}

.we-cat-toggle {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-black);
}

.we-cat-live-preview {
    text-align: center;
}

.we-cat-live-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: 112px;
}

.we-cat-editor-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 1rem 1.35rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
}

/* ─── Homepage sections tab ─── */
.we-hp-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.we-hp-toolbar-actions .we-btn-outline,
.we-hp-toolbar-actions .we-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: auto;
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
}

.we-hp-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 960px) {
    .we-hp-settings-grid {
        grid-template-columns: 1fr;
    }
}

.we-hp-settings-card h3 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.we-hp-mode-banner {
    margin-bottom: 1.1rem;
}

.we-hp-mode-auto,
.we-hp-mode-custom {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
}

.we-hp-mode-auto {
    border-color: rgba(0, 112, 193, 0.15);
    background: rgba(0, 112, 193, 0.05);
}

.we-hp-mode-auto svg,
.we-hp-mode-custom svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    opacity: 0.7;
}

.we-hp-mode-auto strong,
.we-hp-mode-custom strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
}

.we-hp-mode-auto p,
.we-hp-mode-custom p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.we-hp-preview-wrap {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 1rem 1.15rem 1.15rem;
    margin-bottom: 1.35rem;
}

.we-hp-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.we-hp-preview-empty-page {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1.5rem 0.5rem;
    margin: 0;
}

.we-hp-preview-panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 0.75rem 0.85rem 0.85rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.we-hp-preview-panel.is-hidden {
    opacity: 0.55;
}

.we-hp-preview-panel.is-auto {
    border-style: dashed;
}

.we-hp-preview-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
}

.we-hp-preview-header svg {
    width: 14px;
    height: 14px;
}

.we-hp-preview-header em {
    margin-left: auto;
    font-style: normal;
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0;
    text-transform: none;
}

.we-hp-preview-products {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

.we-hp-preview-prod {
    flex: 0 0 56px;
    width: 56px;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.we-hp-preview-prod img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.we-hp-preview-empty {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.35rem 0;
}

.we-hp-sections-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.we-hp-section-card {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 0.85rem 1rem;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.we-hp-section-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.we-hp-section-card.is-hidden {
    opacity: 0.68;
}

.we-hp-section-card.is-auto {
    border-style: dashed;
}

.we-hp-section-card.is-dragging {
    opacity: 0.45;
}

.we-hp-section-card.is-drop-target {
    border-color: var(--primary-black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.we-hp-drag-handle {
    flex-shrink: 0;
    align-self: center;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    width: 28px;
    height: 44px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 0;
}

.we-hp-drag-handle:active {
    cursor: grabbing;
}

.we-hp-drag-handle svg {
    width: 16px;
    height: 16px;
}

.we-hp-section-main {
    flex: 1;
    min-width: 0;
}

.we-hp-section-head {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.we-hp-section-head h4 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.we-hp-section-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.we-hp-section-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0 0 0.55rem;
}

.we-hp-section-thumbs {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.we-hp-section-thumbs img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.we-hp-section-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.we-hp-icon-btn {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    border-radius: 8px;
    width: 32px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.we-hp-icon-btn svg {
    width: 16px;
    height: 16px;
}

.we-hp-section-actions .we-cat-card-edit {
    margin: 0;
    width: auto;
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
}

.we-hp-auto-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: center;
    padding: 0.35rem 0.5rem;
}

.we-sec-editor-panel {
    width: min(520px, 100%);
}

.we-sec-editor-footer {
    align-items: center;
}

.we-sec-field-note {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
}

.we-sec-product-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.55rem;
}

.we-sec-prod-chip {
    position: relative;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: white;
    padding: 0.35rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.we-sec-prod-chip:hover {
    border-color: rgba(0, 0, 0, 0.18);
}

.we-sec-prod-chip.active {
    border-color: var(--primary-black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.we-sec-prod-chip img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin-bottom: 0.3rem;
}

.we-sec-prod-name {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(0, 0, 0, 0.65);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.we-sec-prod-pin {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-black);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.we-hp-preview-mini {
    max-width: 320px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .we-photo-layout {
        grid-template-columns: 1fr;
    }

    .we-grid-2,
    .we-grid-3 {
        grid-template-columns: 1fr;
    }

    .we-studio-body {
        padding: 1rem 1rem 5rem;
    }

    .we-studio-header,
    .we-studio-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .we-cat-cover-zone {
        grid-template-columns: 1fr;
    }

    .we-icon-picker {
        grid-template-columns: repeat(4, 1fr);
    }

    .we-cat-editor-panel {
        width: 100%;
    }

    .we-hp-section-card {
        flex-wrap: wrap;
    }

    .we-hp-section-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
    }
}
