/* ============================================
   MAPEAMENTO DE VARIAVEIS PARA TEMA
   Conecta as variaveis locais com dashboard-styles.php
   ============================================ */
:root,
[data-theme="dark"],
[data-theme="light"],
[data-theme="auto"] {
    --color-primary: var(--primary);
    --color-primary-rgb: var(--primary-rgb);
    --color-bg: var(--bg-dark);
    --color-card: var(--bg-card);
    --color-card-hover: var(--bg-card-hover);
    --color-border: var(--border);
    --color-text: var(--text-primary);
    --color-text-secondary: var(--text-secondary);
    --color-text-muted: var(--text-muted);
    --color-success: var(--success);
    --color-warning: var(--warning);
    --color-error: var(--error);
}

/* ========================================
   ESTILOS DO EDITOR DE TEMPLATE
   ======================================== */

.editor-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .editor-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}


/* Fix para horizontal scroll entre 1024px-1200px */
@media (max-width: 1200px) and (min-width: 1025px) {
    .menu-item-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .menu-item-inputs {
        flex-direction: column;
        width: 100%;
        order: 3;
        flex-basis: 100%;
    }

    .menu-item-inputs input,
    .menu-item-inputs select,
    .menu-item-inputs .menu-fixed-link {
        width: 100%;
    }

    .menu-item-drag {
        order: 1;
    }

    .menu-item-icon-picker {
        order: 2;
    }

    .menu-item-actions {
        order: 2;
        margin-left: auto;
    }
}

@media (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
}

.editor-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Preview Panel - Sidebar */
.preview-panel {
    position: sticky;
    top: 1.5rem;
}

@media (max-width: 1024px) {
    .preview-panel {
        position: relative;
        top: 0;
        order: -1;
    }
}

.preview-frame {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.preview-header {
    background: var(--bg-darker);
    padding: 0.6rem 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.preview-dots {
    display: flex;
    gap: 5px;
}

.preview-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.preview-dot.red {
    background: #EF4444;
}

.preview-dot.yellow {
    background: #F59E0B;
}

.preview-dot.green {
    background: #22C55E;
}

.preview-url {
    flex: 1;
    background: var(--bg-card);
    border-radius: 6px;
    padding: 0.35rem 0.625rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

.preview-content {
    height: 520px;
    padding: 0;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .preview-content {
        height: 420px;
    }
}

@media (max-width: 576px) {
    .preview-content {
        height: 360px;
    }
}

.preview-mockup {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.preview-actions {
    padding: 0.75rem;
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.preview-actions .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* ========================================
   MOCKUP SERVIÇOS (Barbearia/Salão)
   ======================================== */
.mockup-nav {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 2px solid;
}

.mockup-hero {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.mockup-hero h2 {
    font-size: 1.1rem;
    margin-bottom: 0.375rem;
}

.mockup-hero p {
    font-size: 0.75rem;
    opacity: 0.8;
}

.mockup-section {
    padding: 1.25rem;
}

.mockup-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.mockup-card {
    border-radius: 8px;
    padding: 0.875rem;
    text-align: center;
}

.mockup-card iconify-icon {
    font-size: 1.25rem;
    margin-bottom: 0.375rem;
}

.mockup-card span {
    font-size: 0.65rem;
    display: block;
}

/* ========================================
   MOCKUP RETAIL (Loja/Varejo)
   ======================================== */
.retail-mockup {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.retail-header {
    padding: 0.75rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid;
}

.retail-header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.retail-header-brand .logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.retail-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.retail-header-actions iconify-icon {
    font-size: 1.1rem;
    opacity: 0.7;
}

.retail-hero-banner {
    position: relative;
    padding: 2rem 1rem;
    text-align: center;
    min-height: 100px;
}

.retail-hero-banner h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.retail-hero-banner p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
}

.retail-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.retail-categories {
    display: flex;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    overflow-x: auto;
    border-bottom: 1px solid;
}

.retail-category-chip {
    flex-shrink: 0;
    padding: 0.4rem 0.875rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid;
    white-space: nowrap;
}

.retail-category-chip.active {
    border-color: transparent;
    color: #fff;
}

.retail-products-section {
    padding: 1rem;
    flex: 1;
}

.retail-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.retail-section-title {
    font-size: 0.85rem;
    font-weight: 700;
}

.retail-section-link {
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.retail-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.retail-product-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid;
}

.retail-product-image {
    aspect-ratio: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.retail-product-placeholder {
    width: 50%;
    height: 60%;
    border-radius: 6px;
    opacity: 0.5;
}

.retail-product-badge {
    position: absolute;
    top: 0.375rem;
    left: 0.375rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.retail-product-wishlist {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.retail-product-info {
    padding: 0.625rem;
}

.retail-product-category {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.25rem;
}

.retail-product-name {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.retail-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.retail-product-price {
    font-size: 0.8rem;
    font-weight: 700;
}

.retail-add-cart-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
}

.retail-footer {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid;
    font-size: 0.65rem;
    opacity: 0.7;
}

/* Editor Panel */
.editor-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ========================================
   MENU DE ABAS DO EDITOR
   ======================================== */
.editor-tabs-container {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.editor-tabs-menu {
    width: 220px;
    background: var(--bg-darker);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}

.editor-tab-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
}

.editor-tab-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.editor-tab-item.active {
    background: var(--bg-card);
    border-left-color: var(--primary);
    color: var(--text-primary);
}

.editor-tab-item iconify-icon {
    font-size: 1.25rem;
}

.editor-tab-item.active iconify-icon {
    color: var(--primary);
}

.editor-tab-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

.editor-tab-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--primary);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
}

.editor-tab-badge.soon {
    background: var(--text-muted);
    color: var(--bg-card);
}

.editor-tabs-content {
    flex: 1;
    min-width: 0;
}

.editor-tab-panel {
    overflow-x: hidden;
    display: none;
    padding: 1.5rem;
}

.editor-tab-panel.active {
    display: block;
}

.editor-tab-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.editor-tab-panel-header iconify-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.editor-tab-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.editor-tab-panel-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Responsivo para o menu de abas */
@media (max-width: 900px) {
    .editor-tabs-container {
        flex-direction: column;
    }

    .editor-tabs-menu {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .editor-tab-item {
        flex-direction: column;
        gap: 0.375rem;
        padding: 0.875rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        min-width: max-content;
    }

    .editor-tab-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary);
    }

    .editor-tab-item span {
        font-size: 0.75rem;
    }

    .editor-tab-item iconify-icon {
        font-size: 1.1rem;
    }

    .editor-tab-badge {
        position: absolute;
        top: 0.25rem;
        right: 0.25rem;
        margin-left: 0;
        padding: 1px 5px;
        font-size: 0.55rem;
    }

    .editor-tab-item {
        position: relative;
    }

    .editor-tab-panel {
        overflow-x: hidden;
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .editor-tab-item {
        padding: 0.75rem 0.875rem;
    }

    .editor-tab-item span {
        font-size: 0.7rem;
    }

    .editor-tab-panel {
        overflow-x: hidden;
        padding: 1rem;
    }

    .editor-tab-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Seção em breve */
.coming-soon-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.coming-soon-section iconify-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.coming-soon-section h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.coming-soon-section p {
    font-size: 0.9rem;
    max-width: 300px;
}

/* Header Editor Section - Collapsible */
.header-editor-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.header-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.header-section-title:hover {
    background: var(--bg-darker);
}

.header-section-title iconify-icon:first-child {
    font-size: 1.1rem;
    color: var(--primary);
}

.header-section-title .collapse-icon {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.header-editor-section.collapsed .header-section-title .collapse-icon {
    transform: rotate(-90deg);
}

.header-editor-section.collapsed .header-section-title {
    border-bottom-color: transparent;
}

.header-section-content {
    padding: 1.25rem;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
    opacity: 1;
}

.header-editor-section.collapsed .header-section-content {
    max-height: 0;
    padding: 0 1.25rem;
    opacity: 0;
}


/* Menu Editor Section */
.menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.menu-item-row:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.menu-item-row.menu-item-fixed {
    background: rgba(var(--primary-rgb), 0.03);
    border-color: rgba(var(--primary-rgb), 0.2);
    border-style: dashed;
}

.menu-item-row.menu-item-fixed:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.05);
}

.menu-item-drag {
    cursor: grab;
    color: var(--text-muted);
    padding: 0.25rem;
}

.menu-item-drag:active {
    cursor: grabbing;
}

.menu-item-icon-picker {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
    color: var(--primary);
}

.menu-item-icon-picker:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.menu-item-inputs {
    min-width: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.menu-item-inputs input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.menu-item-inputs input:focus {
    outline: none;
    border-color: var(--primary);
}

.menu-item-inputs input::placeholder {
    color: var(--text-muted);
}

.menu-item-inputs select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.menu-item-inputs select:focus {
    outline: none;
    border-color: var(--primary);
}

.menu-item-inputs select option {
    background: var(--bg-card);
    color: var(--text-primary);
}


.custom-link-wrapper {
    width: 100%;
}

.custom-link-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.custom-link-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.custom-link-input::placeholder {
    color: var(--text-secondary);
}

.menu-item-actions {
    display: flex;
    gap: 0.25rem;
}

.menu-item-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.menu-item-btn:hover {
    background: var(--bg-darker);
    color: var(--text-primary);
}

.menu-item-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.add-menu-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--bg-darker);
    border: 2px dashed var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-menu-item-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

/* Icon Picker Modal */
.icon-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.icon-picker-modal.active {
    display: flex;
}

.icon-picker-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.icon-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.icon-picker-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.icon-picker-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-darker);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-picker-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-darker);
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 300px;
    padding: 0.5rem;
}

.icon-picker-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-darker);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.icon-picker-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

/* Logo Type Options */
.logo-type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.logo-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    background: var(--bg-darker);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.logo-type-option input {
    display: none;
}

.logo-type-option iconify-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.logo-type-option span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.logo-type-option:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.logo-type-option.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.logo-type-option.active iconify-icon {
    color: var(--primary);
}

.logo-type-option.active span {
    color: var(--primary);
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Logo Upload Area */
.logo-upload-area {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.logo-preview-box {
    width: 100px;
    height: 100px;
    background: var(--bg-darker);
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.logo-preview-box:hover {
    border-color: var(--primary);
}

.logo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
}

.logo-placeholder iconify-icon {
    font-size: 1.75rem;
}

.logo-placeholder span {
    font-size: 0.7rem;
    text-align: center;
}

.logo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.logo-preview-box:hover .logo-remove-btn {
    opacity: 1;
}

.logo-upload-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.logo-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Buttons */
.btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;

}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-primary:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.btn-secondary {
    background: var(--bg-darker);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn iconify-icon {
    font-size: 1rem;
}

@media (max-width: 640px) {
    .logo-type-options {
        grid-template-columns: 1fr;
    }

    .logo-upload-area {
        flex-direction: column;
    }

    .logo-preview-box {
        width: 100%;
        height: 120px;
    }
}

.editor-section {
    background: var(--bg-card) !important;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.editor-section-header {
    padding: 1rem 1.25rem;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.editor-section-header iconify-icon {
    font-size: 1.25rem;
    color: var(--primary);
}

.editor-section-content {
    padding: 1.25rem;
}

/* Color Picker */
.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .color-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PALETAS DE CORES
   ======================================== */
.palettes-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.palettes-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.palettes-section-title iconify-icon {
    color: var(--primary);
}

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


@media (max-width: 1200px) and (min-width: 1025px) {
    .palettes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .palettes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .palettes-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem;
    }
}

.palette-card {
    background: var(--bg-darker);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.palette-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.palette-card.active {
    border-color: var(--primary);
    background: var(--primary-alpha);
}

.palette-card.active::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.palette-card.active::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 1;
}

.palette-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}

.palette-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.palette-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.palette-colors {
    display: flex;
    gap: 3px;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
}

.palette-color-strip {
    flex: 1;
    min-width: 0;
}

.palette-color-strip:first-child {
    border-radius: 4px 0 0 4px;
}

.palette-color-strip:last-child {
    border-radius: 0 4px 4px 0;
}

/* Cores individuais (avançado) */
.advanced-colors-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border: 1px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.advanced-colors-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.advanced-colors-toggle iconify-icon {
    transition: transform 0.2s ease;
}

.advanced-colors-toggle.expanded iconify-icon {
    transform: rotate(180deg);
}

.advanced-colors-content {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.advanced-colors-content.show {
    display: block;
}

.color-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
}

.color-preview {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
}

.color-input-wrapper input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.color-hex {
    flex: 1;
    background: transparent;
    border: none;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-transform: uppercase;
}

.color-hex:focus {
    outline: none;
}

/* Section Toggles */
.sections-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-darker);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.section-toggle:hover {
    background: var(--bg-hover);
}

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

.section-toggle-info iconify-icon {
    font-size: 1.25rem;
    color: var(--primary);
}

.section-toggle-name {
    font-weight: 500;
}

/* Toggle Switch Original (Mantido para compatibilidade) */
.toggle-switch {
    position: relative !important;
    display: inline-block !important;
    width: 48px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
    min-width: 48px !important;
}

.toggle-switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    margin: 0 !important;
}

.toggle-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #ccc !important;
    border: 1px solid #ddd !important;
    transition: 0.3s !important;
    border-radius: 26px !important;
}

.toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 20px !important;
    width: 20px !important;
    left: 3px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: white !important;
    transition: 0.3s !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary, #CCA43B) !important;
    border-color: var(--primary, #CCA43B) !important;
}

.toggle-switch input:checked+.toggle-slider:before {
    left: calc(100% - 23px) !important;
    transform: translateY(-50%) !important;
    background-color: #fff !important;
}

/* Custom Toggle Switch (Isolado para resolver conflitos) */
.custom-toggle-switch {
    position: relative !important;
    display: inline-block !important;
    width: 48px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
    min-width: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.custom-toggle-switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.custom-toggle-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #ccc !important;
    /* Cor inativo explícita */
    border: 1px solid #ddd !important;
    transition: 0.3s !important;
    border-radius: 26px !important;
    box-sizing: border-box !important;
}

.custom-toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 20px !important;
    width: 20px !important;
    left: 2px !important;
    /* Ajuste fino */
    top: 50% !important;
    transform: translateY(-50%) !important;
    background-color: white !important;
    transition: 0.3s !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.custom-toggle-switch input:checked+.custom-toggle-slider {
    background-color: #CCA43B !important;
    /* Dourado fixo primeiro */
    background-color: var(--primary, #CCA43B) !important;
    border-color: transparent !important;
}

.custom-toggle-switch input:checked+.custom-toggle-slider:before {
    left: auto !important;
    right: 2px !important;
    /* Usar right para garantir alinhamento no final */
    transform: translateY(-50%) !important;
    background-color: #fff !important;
}

/* Action Buttons */
.editor-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.editor-actions .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

@media (max-width: 480px) {
    .editor-actions {
        flex-direction: column;
    }

    .editor-actions .btn {
        width: 100%;
    }
}

/* Template Info */
.template-info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-alpha) 0%, var(--bg-card) 100%);
    border: 1px solid var(--primary);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.template-info-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.template-info-details h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.template-info-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Section Icons Map */
.section-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-alpha);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablets e telas médias */
@media (max-width: 1100px) {
    .editor-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .preview-panel {
        position: relative;
        top: 0;
        order: -1;
    }

    .preview-content {
        height: 450px;
    }
}

/* Tablets pequenos */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .template-info-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .template-info-details h3 {
        font-size: 1.1rem;
    }

    .preview-content {
        height: 400px;
    }

    .preview-url {
        font-size: 0.65rem;
        padding: 0.35rem 0.5rem;
    }

    .editor-section-header {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .editor-section-content {
        padding: 1rem;
    }

    .color-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.875rem;
    }

    .color-label {
        font-size: 0.8rem;
    }

    .color-input-wrapper {
        padding: 0.375rem;
        gap: 0.5rem;
    }

    .color-preview {
        width: 32px;
        height: 32px;
    }

    .color-hex {
        font-size: 0.8rem;
    }

    .section-toggle {
        padding: 0.625rem 0.875rem;
    }

    .section-icon {
        width: 28px;
        height: 28px;
    }

    .section-toggle-name {
        font-size: 0.9rem;
    }

    .toggle-switch {
        width: 44px !important;
        height: 24px !important;
        min-width: 44px !important;
    }

    .toggle-slider:before {
        height: 18px !important;
        width: 18px !important;
    }

    .toggle-switch input:checked+.toggle-slider:before {
        left: calc(100% - 21px) !important;
    }

    /* Mockup adjustments */
    .mockup-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .mockup-card {
        padding: 0.75rem 0.5rem;
    }

    .mockup-card iconify-icon {
        font-size: 1.25rem;
    }

    .retail-products-grid {
        gap: 0.5rem;
    }

    .retail-product-info {
        padding: 0.5rem;
    }
}

/* Mobile phones */
@media (max-width: 576px) {
    .editor-container {
        gap: 1.25rem;
    }

    .preview-panel {
        margin: 0 -0.5rem;
    }

    .preview-frame {
        border-radius: 12px;
    }

    .preview-header {
        padding: 0.5rem 0.75rem;
    }

    .preview-dots {
        gap: 4px;
    }

    .preview-dot {
        width: 8px;
        height: 8px;
    }

    .preview-content {
        height: 380px;
    }

    .template-info-card {
        margin-bottom: 1.25rem;
        gap: 0.75rem;
    }

    .template-info-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .template-info-details p {
        font-size: 0.8rem;
    }

    .color-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .color-item {
        gap: 0.375rem;
    }

    .editor-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .editor-actions .btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }

    .section-toggle-info {
        gap: 0.5rem;
    }

    .section-toggle-name {
        font-size: 0.85rem;
    }

    /* Retail mockup mobile */
    .retail-header {
        padding: 0.625rem 0.75rem;
    }

    .retail-header-brand {
        font-size: 0.8rem;
    }

    .retail-header-brand .logo-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .retail-header-actions {
        gap: 0.5rem;
    }

    .retail-header-actions iconify-icon {
        font-size: 1rem;
    }

    .retail-hero-banner {
        padding: 1.5rem 0.75rem;
        min-height: 80px;
    }

    .retail-hero-banner h2 {
        font-size: 0.95rem;
    }

    .retail-hero-banner p {
        font-size: 0.7rem;
    }

    .retail-hero-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.65rem;
    }

    .retail-categories {
        padding: 0.625rem 0.75rem;
        gap: 0.375rem;
    }

    .retail-category-chip {
        padding: 0.3rem 0.625rem;
        font-size: 0.6rem;
    }

    .retail-products-section {
        padding: 0.75rem;
    }

    .retail-section-title {
        font-size: 0.75rem;
    }

    .retail-section-link {
        font-size: 0.6rem;
    }

    .retail-product-badge {
        font-size: 0.5rem;
        padding: 0.15rem 0.4rem;
    }

    .retail-product-wishlist {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    .retail-product-category {
        font-size: 0.5rem;
    }

    .retail-product-name {
        font-size: 0.65rem;
    }

    .retail-product-price {
        font-size: 0.7rem;
    }

    .retail-add-cart-btn {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    .retail-footer {
        padding: 0.5rem 0.75rem;
        font-size: 0.55rem;
    }

    /* Service mockup mobile */
    .mockup-nav {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .mockup-hero {
        padding: 1.25rem;
        min-height: 90px;
    }

    .mockup-hero h2 {
        font-size: 1rem;
    }

    .mockup-hero p {
        font-size: 0.75rem;
    }

    .mockup-section {
        padding: 1rem;
    }

    .mockup-section-title {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .mockup-card {
        padding: 0.625rem 0.375rem;
    }

    .mockup-card iconify-icon {
        font-size: 1.1rem;
        margin-bottom: 0.375rem;
    }

    .mockup-card span {
        font-size: 0.6rem;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .page-header h1 {
        font-size: 1.25rem;
    }

    .preview-content {
        height: 340px;
    }

    .editor-section-header {
        padding: 0.75rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .editor-section-header iconify-icon {
        font-size: 1.1rem;
    }

    .editor-section-content {
        padding: 0.875rem;
    }

    .color-preview {
        width: 28px;
        height: 28px;
    }

    .color-hex {
        font-size: 0.75rem;
    }

    .section-toggle {
        padding: 0.5rem 0.75rem;
    }

    .section-icon {
        width: 26px;
        height: 26px;
    }

    .section-icon iconify-icon {
        font-size: 0.9rem;
    }

    .section-toggle-name {
        font-size: 0.8rem;
    }

    .toggle-switch {
        width: 40px !important;
        height: 22px !important;
        min-width: 40px !important;
    }

    .toggle-slider:before {
        height: 16px !important;
        width: 16px !important;
    }

    .toggle-switch input:checked+.toggle-slider:before {
        left: calc(100% - 19px) !important;
    }
}

/* Landscape on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .preview-content {
        height: 280px;
    }

    .editor-container {
        gap: 1rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .color-preview {
        min-width: 40px;
        min-height: 40px;
    }

    .section-toggle {
        min-height: 52px;
    }

    .toggle-switch {
        min-width: 48px;
        min-height: 28px;
    }

    .btn {
        min-height: 48px;
    }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {

    .preview-mockup,
    .section-toggle,
    .color-preview,
    .toggle-slider,
    .toggle-slider:before,
    .btn {
        transition: none;
    }
}

/* Print styles */
@media print {

    .preview-panel,
    .editor-actions,
    .page-header .btn {
        display: none !important;
    }

    .editor-container {
        grid-template-columns: 1fr;
    }

    .editor-section {
        break-inside: avoid;
    }
}

/* ======================================
   RESPONSIVE - TEMPLATE EDITOR
   ====================================== */

/* Tablet - 768px */
@media (max-width: 768px) {

    /* Header Editor Section */
    .header-section-content {
        padding: 1rem;
    }

    /* Menu Item Rows */
    .menu-item-row {
        min-width: 0;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .menu-item-inputs {
        min-width: 0;
        overflow: hidden;
        flex-direction: column;
        width: 100%;
        order: 3;
        gap: 0.5rem;
    }

    .menu-item-inputs input {
        flex: none;

        width: 100%;
    }

    .menu-item-inputs select {
        flex: none;
        width: 100%;
    }

    .menu-item-drag {
        order: 1;
    }

    .menu-item-icon-picker {
        order: 2;
    }

    .menu-item-actions {
        order: 2;
        margin-left: auto;
    }

    /* Logo Type Options */
    .logo-type-options {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Icon Picker Modal */
    .icon-picker-content {
        width: 95%;
        max-height: 85vh;
        padding: 1rem;
    }

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

    /* Color Scheme Grid */
    .color-scheme-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    /* Editor Tabs */
    .editor-tabs-menu {
        gap: 0.25rem;
    }

    .editor-tab-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Mobile - 576px */
@media (max-width: 576px) {

    /* Main Content Padding */
    .main-content {
        padding: 1rem;
        padding-top: 4.5rem;
    }

    /* Header Editor Section */
    .header-section-title {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
        gap: 0.4rem;
    }

    .header-section-title iconify-icon:first-child {
        font-size: 1rem;
    }

    .header-section-content {
        padding: 0.85rem;
    }

    /* Menu Item Rows */
    .menu-item-row {
        min-width: 0;
        padding: 0.65rem;
    }

    .menu-item-icon-picker {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .menu-item-btn {
        width: 28px;
        height: 28px;
    }

    .add-menu-item-btn {
        padding: 0.65rem;
        font-size: 0.8rem;
    }

    /* Logo Type Options */
    .logo-type-options {
        grid-template-columns: 1fr;
    }

    .logo-type-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .logo-type-option iconify-icon {
        font-size: 1.25rem !important;
    }

    /* Icon Picker Modal */
    .icon-picker-modal.active {
        align-items: flex-end;
    }

    .icon-picker-content {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 75vh;
        padding: 1rem;
    }

    .icon-picker-grid {
        grid-template-columns: repeat(4, 1fr);
        max-height: 250px;
    }

    .icon-picker-item {
        font-size: 1.25rem;
    }

    .icon-picker-header h4 {
        font-size: 1rem;
    }

    /* Color Scheme Grid */
    .color-scheme-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Form Groups */
    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.65rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Editor Tabs - Scroll Horizontal */
    .editor-tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .editor-tabs-menu {
        flex-wrap: nowrap;
        min-width: max-content;
        padding-bottom: 0.5rem;
    }

    .editor-tab-item {
        white-space: nowrap;
        padding: 0.5rem 0.65rem;
        font-size: 0.75rem;
    }

    /* Preview Frame */
    .preview-container {
        height: 250px;
    }

    /* Submit Button */
    .editor-section button[type="submit"],
    .save-btn {
        width: 100%;
        padding: 0.85rem;
        font-size: 0.9rem;
    }
}

/* Small Mobile - 400px */
@media (max-width: 400px) {
    .main-content {
        padding: 0.75rem;
        padding-top: 4.5rem;
    }

    .header-section-title {
        padding: 0.75rem 0.85rem;
        font-size: 0.85rem;
    }

    .header-section-content {
        padding: 0.75rem;
    }

    .menu-item-row {
        min-width: 0;
        padding: 0.5rem;
    }

    .menu-item-icon-picker {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .menu-item-btn {
        width: 26px;
        height: 26px;
    }

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

    .icon-picker-item {
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .color-scheme-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-header h1 {
        font-size: 1.15rem;
    }

    .page-header p {
        font-size: 0.85rem;
    }
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    .menu-item-btn {
        min-width: 40px;
        min-height: 40px;
    }

    .menu-item-icon-picker {
        min-width: 44px;
        min-height: 44px;
    }

    .icon-picker-item {
        min-height: 48px;
    }

    .header-section-title {
        min-height: 48px;
    }

    .logo-type-option {
        min-height: 48px;
    }
}

/* ========================================
   ESTILOS DO EDITOR DE DESTAQUE (HERO)
   ======================================== */



.editor-section .section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-section .section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #CCA43B, #D4AF37);
    border-radius: 2px;
}

/* Form Controls */
.form-group {
    margin-bottom: 0;
}



.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-darker);
    box-shadow: 0 0 0 3px rgba(204, 164, 59, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Toggle Switch */
.toggle-item {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.toggle-label input:checked+.toggle-switch {
    background: linear-gradient(135deg, #CCA43B, #D4AF37);
}

.toggle-label input:checked+.toggle-switch::after {
    left: 22px;
}

/* Logo Type Selector (usado para Hero Type também) */
.logo-type-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.logo-type-option {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logo-type-option:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.logo-type-option.active {
    border-color: #CCA43B;
    background: linear-gradient(135deg, rgba(204, 164, 59, 0.1), rgba(212, 175, 55, 0.05));
    box-shadow: 0 0 0 3px rgba(204, 164, 59, 0.15);
}

.logo-type-option input {
    display: none;
}

.logo-type-option iconify-icon {
    font-size: 1.5rem;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.logo-type-option.active iconify-icon {
    color: #CCA43B;
}

.logo-type-option span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
}

.logo-type-option.active span {
    color: #92700C;
}

/* Upload Container */
.logo-upload-container {
    text-align: center;
}

.logo-preview-box {
    width: 100%;
    height: 150px;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.logo-preview-box:hover {
    border-color: #CCA43B;
    background: #fffbf0;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
}

.logo-placeholder iconify-icon {
    font-size: 2.5rem;
    color: #d1d5db;
}

.logo-placeholder span {
    font-size: 0.85rem;
}

.logo-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.logo-remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.upload-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.75rem;
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #CCA43B, #D4AF37);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(204, 164, 59, 0.4);
    transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #CCA43B, #D4AF37);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

#overlayValue {
    font-size: 0.85rem;
    font-weight: 600;
    color: #CCA43B;
    min-width: 45px;
    text-align: right;
}

/* Tab Hero específicos */
#tab-hero .editor-section:first-child {
    margin-top: 0;
}

#tab-hero .form-group+.form-group {
    margin-top: 1rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .logo-type-selector {
        flex-direction: column;
    }

    .logo-type-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }

    .editor-section {
        padding: 1rem;
    }
}


/* ============ SELETOR DE PRODUTOS VISUAL ============ */
.section-products-selector .product-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-card);
    color: var(--color-text);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--color-border);
}

.section-products-selector .product-tag:hover {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.section-products-selector .product-tag img {
    width: 32px;
    height: 32px;
    border-radius: 0.35rem;
    object-fit: cover;
}

.section-products-selector .product-tag span {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.section-products-selector .product-tag .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    margin-left: 0.25rem;
    transition: all 0.2s ease;
}

.section-products-selector .product-tag:hover .remove-btn {
    background: #c0392b;
    transform: scale(1.1);
}

/* Modal de Seleção de Produtos */
.product-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-selector-modal.active {
    opacity: 1;
    visibility: visible;
}

.product-selector-content {
    background: var(--color-card);
    border-radius: 1rem;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.product-selector-modal.active .product-selector-content {
    transform: translateY(0);
}

.product-selector-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-selector-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-selector-search {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.product-selector-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.95rem;
}

.product-selector-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    align-content: start;
}

@media (max-width: 600px) {
    .product-selector-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

.product-selector-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    position: relative;
}

.product-selector-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.product-selector-item.selected {
    background: rgba(var(--color-primary-rgb), 0.15);
    border-color: var(--color-primary);
}

.product-selector-item img {
    width: 70px;
    height: 70px;
    border-radius: 0.5rem;
    object-fit: cover;
    background: var(--color-card);
}

@media (max-width: 600px) {
    .product-selector-item img {
        width: 55px;
        height: 55px;
    }
}

.product-selector-item-info {
    width: 100%;
}

.product-selector-item-name {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-selector-item-price {
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.product-selector-item-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.product-selector-item.selected .product-selector-item-check {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.product-selector-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.75rem;
}

.product-selector-footer .btn {
    flex: 1;
}

/* ========================================
   ESTILOS PARA PÁGINAS PERSONALIZADAS
   ======================================== */

.pages-section {
    margin-top: 1rem;
}

.pages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.pages-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.pages-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.page-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}

.page-item-icon {
    width: 44px;
    height: 44px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-item-icon iconify-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.page-item-info {
    flex: 1;
    min-width: 0;
}

.page-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-item-title .badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.page-item-title .badge-menu {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

.page-item-title .badge-draft {
    background: rgba(255, 193, 7, 0.15);
    color: #d97706;
}

.page-item-slug {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.page-item-actions {
    display: flex;
    gap: 0.5rem;
}

.page-item-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-item-btn:hover {
    background: var(--primary);
    color: white;
}

.page-item-btn.delete:hover {
    background: #ef4444;
    color: white;
}

.pages-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.pages-empty iconify-icon {
    font-size: 4rem;
    opacity: 0.2;
    margin-bottom: 1rem;
}

/* Modal de Página */
.page-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.page-modal-overlay.active {
    display: flex;
}

.page-modal {
    background: var(--color-card);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.page-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-modal-close:hover {
    background: #ef4444;
    color: white;
}

.page-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.page-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.page-form-group {
    margin-bottom: 1.25rem;
}

.page-form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.page-form-group input,
.page-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.page-form-group input:focus,
.page-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.page-form-group textarea {
    min-height: 300px;
    resize: vertical;
    font-family: inherit;
}

/* Editor de Conteúdo Rico */
.content-editor-wrapper {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg);
}

.content-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--color-border);
}

.editor-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.editor-btn.active {
    background: var(--primary);
    color: white;
}

.editor-separator {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    margin: 0 0.25rem;
}

.content-editor-area {
    min-height: 350px;
    padding: 1rem;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-y: auto;
}

.content-editor-area:focus {
    background: var(--bg-card);
}

.content-editor-area h1 {
    font-size: 2rem;
    margin: 0.5em 0;
}

.content-editor-area h2 {
    font-size: 1.5rem;
    margin: 0.5em 0;
}

.content-editor-area h3 {
    font-size: 1.25rem;
    margin: 0.5em 0;
}

.content-editor-area p {
    margin: 0.5em 0;
}

.content-editor-area ul,
.content-editor-area ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.content-editor-area blockquote {
    border-left: 3px solid var(--primary);
    margin: 1em 0;
    padding-left: 1em;
    color: var(--text-secondary);
}

.content-editor-area a {
    color: var(--primary);
}

.content-editor-area img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Sistema de Edição de Imagem no Editor */
.content-editor-area img {
    cursor: pointer;
    transition: outline 0.2s;
}

.content-editor-area img.img-selected {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.content-editor-area img.img-align-left {
    display: block;
    margin-left: 0;
    margin-right: auto;
}

.content-editor-area img.img-align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.content-editor-area img.img-align-right {
    display: block;
    margin-left: auto;
    margin-right: 0;
}

/* Wrapper de imagem com redimensionamento */
.img-resize-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.img-resize-wrapper.align-left {
    display: block;
    margin-left: 0;
    margin-right: auto;
}

.img-resize-wrapper.align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.img-resize-wrapper.align-right {
    display: block;
    margin-left: auto;
    margin-right: 0;
}

.img-resize-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
}

.img-resize-wrapper.selected {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Handles de redimensionamento */
.img-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 2px;
    display: none;
    z-index: 10;
}

.img-resize-wrapper.selected .img-resize-handle {
    display: block;
}

.img-resize-handle.nw {
    top: -5px;
    left: -5px;
    cursor: nw-resize;
}

.img-resize-handle.ne {
    top: -5px;
    right: -5px;
    cursor: ne-resize;
}

.img-resize-handle.sw {
    bottom: -5px;
    left: -5px;
    cursor: sw-resize;
}

.img-resize-handle.se {
    bottom: -5px;
    right: -5px;
    cursor: se-resize;
}

.img-resize-handle.n {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.img-resize-handle.s {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.img-resize-handle.w {
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.img-resize-handle.e {
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    cursor: e-resize;
}

/* Toolbar flutuante de imagem */
.img-toolbar {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-darker);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 6px;
    display: none;
    gap: 4px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.img-resize-wrapper.selected .img-toolbar {
    display: flex;
}

.img-toolbar button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.img-toolbar button:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.img-toolbar button.active {
    background: var(--primary);
    color: white;
}

.img-toolbar .separator {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    margin: 0 4px;
}


.page-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.page-form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border-radius: 8px;
    cursor: pointer;
}

.page-form-checkbox input {
    width: auto;
    margin: 0;
}

.page-form-checkbox span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.slug-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.slug-preview code {
    background: rgba(var(--primary-rgb), 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
}

@media (max-width: 768px) {
    .page-form-row {
        grid-template-columns: 1fr;
    }

    .page-modal {
        max-height: 95vh;
    }
}

/* ========================================
   HERO IMAGES GALLERY (SLIDER)
   ======================================== */

.hero-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hero-image-item {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-darker);
    transition: all 0.2s ease;
}

.hero-image-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.hero-image-item .hero-image-number {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.hero-image-item:hover .hero-image-actions {
    opacity: 1;
}

.hero-img-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.hero-img-btn.remove {
    background: #ef4444;
    color: white;
}

.hero-img-btn.remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.hero-image-add {
    aspect-ratio: 16/9;
    border: 2px dashed var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    background: var(--bg-darker);
}

.hero-image-add:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.hero-image-add iconify-icon {
    font-size: 1.75rem;
}

.hero-image-add span {
    font-size: 0.8rem;
    font-weight: 500;
}

@media (max-width: 600px) {
    .hero-images-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}