/* ========================================
   PITAMOR - EDITOR DE PÁGINA CSS
   Estilos para la sección de edición
   ======================================== */

/* ========================================
   TABS DEL EDITOR
   ======================================== */
.editor-tabs {
    display: flex;
    gap: 6px;
    padding: 10px;
    background: white;
    border-radius: 16px;
    margin-bottom: 15px;
    box-shadow: 0 2px 15px rgba(233, 30, 120, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.editor-tab {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border: none;
    background: #f8f9fa;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: #6B6B6B;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.editor-tab i {
    font-size: 1.1rem;
}

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

.editor-tab:hover {
    background: #FFF0F5;
    color: #E91E78;
}

.editor-tab.active {
    background: var(--gradient-pink, linear-gradient(135deg, #E91E78, #FF4D9E));
    color: white;
    box-shadow: 0 4px 15px rgba(233, 30, 120, 0.3);
}

/* ========================================
   TAB CONTENT
   ======================================== */
.editor-tab-content {
    display: none;
}

.editor-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   EDITOR CARDS
   ======================================== */
.editor-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(233, 30, 120, 0.08);
    overflow: hidden;
    margin-bottom: 15px;
}

.editor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: linear-gradient(135deg, #FFF0F5, #FFF8F0);
    border-bottom: 2px solid rgba(233, 30, 120, 0.1);
}

.editor-card-header h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2D2D2D;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-card-header h3 i {
    color: #E91E78;
}

.editor-card-body {
    padding: 18px;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.editor-form-group {
    margin-bottom: 16px;
}

.editor-form-group label {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: #2D2D2D;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.editor-form-group label i {
    color: #E91E78;
    font-size: 0.85rem;
}

.editor-input,
.editor-select,
.editor-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    color: #2D2D2D;
    background: #fafafa;
    transition: all 0.3s ease;
    outline: none;
}

.editor-input:focus,
.editor-select:focus,
.editor-textarea:focus {
    border-color: #E91E78;
    background: white;
    box-shadow: 0 0 0 3px rgba(233, 30, 120, 0.1);
}

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

.editor-select {
    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='%23E91E78' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.editor-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ========================================
   BUTTONS
   ======================================== */
.editor-btn-save {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #E91E78, #FF4D9E);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(233, 30, 120, 0.3);
}

.editor-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 120, 0.4);
}

.editor-btn-save:active {
    transform: translateY(0);
}

.editor-btn-save.saving {
    opacity: 0.7;
    pointer-events: none;
}

.editor-btn-add {
    padding: 8px 14px;
    background: linear-gradient(135deg, #00BCD4, #26C6DA);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(0, 188, 212, 0.3);
}

.editor-btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
}

.editor-btn-upload {
    padding: 10px 16px;
    background: linear-gradient(135deg, #1565C0, #1E88E5);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.editor-btn-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

/* ========================================
   EDITOR LIST ITEMS
   ======================================== */
.editor-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.editor-loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-family: 'Quicksand', sans-serif;
}

.editor-loading i {
    color: #E91E78;
    margin-right: 8px;
}

.editor-list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fafafa;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    gap: 12px;
    transition: all 0.3s ease;
}

.editor-list-item:hover {
    border-color: rgba(233, 30, 120, 0.2);
    background: #FFF8F0;
}

.editor-list-item-icon {
    font-size: 1.5rem;
    min-width: 35px;
    text-align: center;
}

.editor-list-item-image {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #eee;
}

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

.editor-list-item-name {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #2D2D2D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.editor-list-item-detail {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.72rem;
    color: #999;
    margin-top: 2px;
}

.editor-list-item-price {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #E91E78;
    white-space: nowrap;
}

.editor-list-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.editor-action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.editor-action-btn.edit {
    background: rgba(21, 101, 192, 0.1);
    color: #1565C0;
}

.editor-action-btn.edit:hover {
    background: #1565C0;
    color: white;
}

.editor-action-btn.delete {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.editor-action-btn.delete:hover {
    background: #f44336;
    color: white;
}

/* ========================================
   IMAGE UPLOAD
   ======================================== */
.editor-image-upload {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.editor-image-preview {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 2px dashed #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
    flex-shrink: 0;
}

.editor-image-preview i {
    font-size: 1.5rem;
    color: #ccc;
}

.editor-image-preview span {
    font-size: 0.65rem;
    color: #ccc;
    margin-top: 4px;
}

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

.editor-image-preview.has-image {
    border-style: solid;
    border-color: #E91E78;
}

.editor-image-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-or {
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.75rem;
    color: #999;
}

/* ========================================
   PREVIEW LOGO
   ======================================== */
.editor-preview-logo {
    margin-top: 8px;
    min-height: 0;
}

.editor-preview-logo img {
    max-width: 120px;
    max-height: 80px;
    border-radius: 8px;
    border: 2px solid #eee;
}

/* ========================================
   FILTER BAR
   ======================================== */
.editor-filter-bar {
    margin-bottom: 15px;
}

.editor-filter-bar .editor-select {
    width: 100%;
}

/* ========================================
   EDITOR BADGE
   ======================================== */
.editor-badge {
    padding: 4px 10px;
    background: rgba(233, 30, 120, 0.1);
    color: #E91E78;
    border-radius: 20px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
}

/* ========================================
   EDITOR MODALS
   ======================================== */
.editor-modal .modal-content {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.editor-modal .modal-body {
    padding: 20px;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.editor-toast {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    z-index: 10000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 90%;
}

.editor-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.editor-toast.success {
    background: linear-gradient(135deg, #25d366, #34e97c);
}

.editor-toast.error {
    background: linear-gradient(135deg, #f44336, #ff5252);
}

.editor-toast.info {
    background: linear-gradient(135deg, #1565C0, #1E88E5);
}

/* ========================================
   EMPTY STATE
   ======================================== */
.editor-empty {
    text-align: center;
    padding: 30px 20px;
    color: #ccc;
}

.editor-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ddd;
}

.editor-empty p {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
}

/* ========================================
   RESPONSIVE - TABLET+
   ======================================== */
@media (min-width: 768px) {
    .editor-tabs {
        gap: 8px;
        padding: 12px;
    }

    .editor-tab {
        padding: 12px 20px;
        flex-direction: row;
        font-size: 0.85rem;
    }

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

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

    .editor-image-upload {
        flex-direction: row;
    }

    .editor-list-item {
        padding: 14px 18px;
    }

    .editor-list-item-name {
        font-size: 0.9rem;
    }
}

/* ========================================
   RESPONSIVE - EXTRA SMALL
   ======================================== */
@media (max-width: 380px) {
    .editor-tabs {
        padding: 8px;
        gap: 4px;
    }

    .editor-tab {
        padding: 8px 6px;
        min-width: 60px;
    }

    .editor-tab i {
        font-size: 0.9rem;
    }

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

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

    .editor-image-upload {
        flex-direction: column;
    }

    .editor-image-preview {
        width: 100%;
        height: 120px;
    }
}
